main.~pas
资源名称:DS-1.ZIP [点击查看]
上传用户:wysk38707
上传日期:2007-06-18
资源大小:801k
文件大小:25k
源码类别:
交通/航空行业
开发平台:
Delphi
- unit main;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls, Buttons,DB, DBTables;
- type
- TForm1 = class(TForm)
- BitBtn1: TBitBtn;
- BitBtn2: TBitBtn;
- BitBtn3: TBitBtn;
- BitBtn4: TBitBtn;
- BitBtn5: TBitBtn;
- BitBtn6: TBitBtn;
- BitBtn7: TBitBtn;
- procedure BitBtn1Click(Sender: TObject);
- procedure BitBtn2Click(Sender: TObject);
- procedure BitBtn3Click(Sender: TObject);
- procedure BitBtn4Click(Sender: TObject);
- procedure BitBtn5Click(Sender: TObject);
- procedure BitBtn6Click(Sender: TObject);
- procedure BitBtn7Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- TArrayWord=array [1..100] of word;
- Carrayword=class
- warray:Tarrayword;
- Num:word;
- function getPre(Inword:word):word;//return the pre of Inword
- function getSuc(Inword:word):word;//return the suc of Inword
- function getOrder(Inword:word):word;//return the order of Inword
- function IsOrder(Pre,Suc:word):boolean;
- procedure reverse();//reverse the warray data
- end;
- Ctrain=class
- query:Tquery;
- localstation:word;
- function getRoute(trainNo:integer;var stations:Carrayword):word;
- function getArrive(SNo,DNo:word;var trains:Carrayword):word;
- function getLink(stationNo:word;var stations:Carrayword):word;
- function getPass(stationNo:word;var trains:Carrayword):word;
- function getStart(stationNo:word;var trains:Carrayword):word;
- procedure setQuery(queryname:Tquery);
- end;
- Cstation=class
- query:Tquery;
- function getName(stationNo:word):string;
- function getNo(stationName:string):word;
- procedure setQuery(queryname:Tquery);
- end;
- Cticket=class
- query:Tquery;
- tablename:string;
- localstation:word;
- myCtrain:Ctrain;
- function getTicket(SNo,DNo,trainNo:word;var ticketNo:word):word;
- function ackTicket(SNo,DNo,trainNo,ticketNo,ackNo:word;Flag:boolean):word;
- function addTicket(SNo,DNo,trainNo,ticketNo:word):word;
- function delTicket(trainNo,ticketNo:word):word;
- function addfull(StationNo,trainNo:word;ticketNo:word;Num:word):word;
- procedure setQuery(queryname:Tquery);
- procedure settable(name:string);
- end;
- ticketRec=record
- ticketNo:array[1..10]of word;
- trainNo:array[1..10]of word;
- SName:array[1..10]of string;
- DName:array[1..10]of string;
- ackNo:array[1..10]of word;
- Num:word;
- end;
- var
- Form1: TForm1;
- implementation
- {$R *.dfm}
- uses
- untchangsha,untchengdu,untchongqing,untbeijing,untwuhan,untzhuzhou,untguangzhou;
- function Carrayword.getPre(Inword:word):word;//return the pre of Inword
- var
- i:integer;
- Preword:word;
- begin
- PreWord:=Inword;//give the default value
- i:=2;
- while (i<=Num) do
- begin
- if (WArray[i]=Inword) then
- begin
- PreWord:=warray[i-1];
- i:=101;
- end
- else
- i:=i+1;
- end;
- getPre:=Preword;
- end;
- function Carrayword.getSuc(Inword:word):word;//return the suc of Inword
- var
- i:integer;
- Sucword:word;
- begin
- SucWord:=Inword;//give the default value
- i:=1;
- while (i<=Num) do
- begin
- if (WArray[i]=Inword) then
- begin
- SucWord:=warray[i+1];
- i:=101;
- end
- else
- i:=i+1;
- end;
- getSuc:=Sucword;
- end;
- function Carrayword.getOrder(Inword:word):word;//return the order of Inword
- var
- i:integer;
- order:word;
- begin
- Order:=0;//means no Inword in warray
- i:=1;
- while (i<=100) do
- begin
- if(warray[i]=Inword) then
- begin
- Order:=i;
- i:=101;
- end;
- i:=i+1;
- end;
- getOrder:=order;
- end;
- procedure Carrayword.reverse();//reverse the warray data
- var
- i:integer;
- tmp:word;
- begin
- for i:=1 to (Num div 2) do
- begin
- tmp:=warray[i];
- warray[i]:=warray[Num-i+1];
- warray[Num-i+1]:=tmp;
- end;
- end;
- function Carrayword.IsOrder(Pre,Suc:word):boolean;
- var
- i:integer;
- begin
- i:=1;
- IsOrder:=false;
- while (i<=100) do
- begin
- if(warray[i]=Pre)then
- begin
- Isorder:=true;
- i:=101;
- end
- else
- if(warray[i]=Suc)then
- begin
- Isorder:=false;
- i:=101;
- end;
- i:=i+1;
- end;
- end;
- function Ctrain.getRoute(trainNo:integer;var stations:Carrayword):word;
- var
- sqlStr:string;
- i:integer;
- reverseFlag:boolean;
- begin
- //showmessage(inttostr(trainNo));
- reverseFlag:=false;
- if ( not odd(trainNo) ) then
- begin
- TrainNo:=TrainNo-1;
- reverseFlag:=true;
- end;
- //showmessage(inttostr(trainNo));
- sqlStr:='SELECT stationNo,SOrder FROM train.db WHERE TrainNo='+inttostr(TrainNo);
- sqlStr:=sqlStr+' order BY SOrder ASC';
- //showmessage(sqlstr);
- try
- query.close;
- query.UnPrepare;
- query.Close;
- query.SQL.Clear;
- query.SQL.Add(sqlStr);
- query.Prepare;
- query.Open;
- if(query.RecordCount>=1)then
- begin
- stations.Num:=query.RecordCount;
- for i:=1 to (query.RecordCount) do
- begin
- query.RecNo:=i;
- stations.warray[i]:=query.Fields.Fields[0].AsVariant;
- //showmessage('stations'+inttostr(stations.warray[i]));
- end;
- if (reverseFlag) then stations.reverse;//deal the co-tickets
- getroute:=0;
- end
- else
- //showmessage('查无此车!');
- getroute:=2;//no answer
- except
- //showmessage('查询列车表时出错!');
- getroute:=1;
- end;
- end;
- function Ctrain.getArrive(SNo,DNo:word;var trains:Carrayword):word;
- var
- sqlStr:string;
- i:integer;
- stations:Carrayword;
- begin
- stations:=Carrayword.Create;
- sqlStr:='select distinct trainNo from train.db where stationNo='+inttostr(SNo);
- sqlStr:=sqlStr+' and trainNo IN ( select trainNo from train.db where stationNo='+inttostr(DNo)+' )';
- try
- query.Close;
- query.SQL.Clear;
- query.SQL.Add(sqlStr);
- query.Prepare;
- query.Open;
- if(query.RecordCount>=1) then
- begin
- trains.Num:=query.RecordCount;
- for i:=1 to query.RecordCount do
- begin
- query.RecNo:=i;
- trains.warray[i]:=query.Fields.Fields[0].AsVariant;
- end
- {for i:=1 to trains.Num do
- begin
- query.Close;
- sqlStr:=
- end;}
- end
- else
- //no answer here
- begin
- trains.Num:=0;
- getArrive:=1;
- end;
- except
- showmessage('查询数据时出错!');
- getArrive:=1;
- end;
- //now we should judge which trainNo is OK
- for i:=1 to trains.Num do
- begin
- try
- query.Close;
- query.UnPrepare;
- getRoute(trains.warray[i],stations);
- if( not stations.IsOrder(SNo,DNo))then
- trains.warray[i]:=trains.warray[i]+1;
- except
- end;
- end;
- stations.Free;
- getArrive:=0;
- end;
- function Ctrain.getLink(stationNo:word;var stations:Carrayword):word;
- //here the array of station should be more than 100
- var
- sqlStr:string;
- i:integer;
- begin
- sqlStr:='SELECT DISTINCT StationNo FROM train.db WHERE TrainNo IN (SELECT TrainNo FROM train.db WHERE StationNo='+inttostr(StationNo)+')';
- try
- query.Close;
- query.SQL.Clear;
- query.SQL.Add(sqlStr);
- query.Prepare;
- query.Open;
- if(query.RecordCount>=1) then
- begin
- stations.Num:=query.RecordCount;
- if (stations.Num>100) then stations.Num:=100;
- //for the array is too small
- for i:=1 to stations.Num do
- begin
- query.RecNo:=i;
- stations.warray[i]:=query.Fields.Fields[0].AsVariant;
- end
- end
- else
- //no answer here
- begin
- stations.Num:=0;
- getLink:=1;
- end;
- except
- showmessage('查询数据时出错!');
- getLink:=1;
- end;
- getLink:=0;
- end;
- function Ctrain.getPass(stationNo:word;var trains:Carrayword):word;
- var
- sqlStr:string;
- i:integer;
- begin
- sqlStr:='SELECT distinct * FROM train.db where stationNo='+inttostr(localstation);
- try
- query.Close();
- query.SQL.Clear;
- query.SQL.Add(sqlStr);
- query.Prepare;
- query.Open;
- trains.Num:=query.RecordCount;
- if(query.RecordCount>=1)then
- begin
- getPass:=0;
- for i:=1 to query.RecordCount do
- begin
- query.recNo:=i;
- trains.warray[i]:=query.Fields.Fields[0].AsVariant;
- end;
- end
- else
- getPass:=2;//no solution
- except
- //showmessage('');
- getPass:=1;//error
- end;
- end;
- function Ctrain.getStart(stationNo:word;var trains:Carrayword):word;
- var
- sqlStr:string;
- i:integer;
- begin
- sqlStr:='SELECT distinct * FROM train.db where SOrder=1 and stationNo='+inttostr(localstation);
- try
- query.Close();
- query.SQL.Clear;
- query.SQL.Add(sqlStr);
- query.Prepare;
- query.Open;
- trains.Num:=query.RecordCount;
- if(query.RecordCount>=1)then
- begin
- getStart:=0;
- for i:=1 to query.RecordCount do
- begin
- query.recNo:=i;
- trains.warray[i]:=query.Fields.Fields[0].AsVariant;
- end;
- end
- else
- getStart:=2;//no solution
- except
- //showmessage('');
- getStart:=1;//error
- end;
- {sqlStr:='SELECT distinct trainNo, FROM train.db where SOrder = 1 and stationNo='+inttostr(localstation);
- try
- query.Close();
- query.SQL.Clear;
- query.SQL.Add(sqlStr);
- query.Prepare;
- query.Open;
- trains.Num:=query.RecordCount;
- if(query.RecordCount>=1)then
- begin
- getStart:=0;
- for i:=1 to query.RecordCount do
- begin
- query.recNo:=i;
- trains.warray[i]:=query.Fields.Fields[0].AsVariant;
- end;
- end
- else
- getStart:=2;//no solution
- except
- //showmessage('');
- getStart:=1;//error
- end;}
- end;
- procedure Ctrain.setQuery(queryname:Tquery);
- begin
- query:=queryName;
- end;
- function Cstation.getName(stationNo:word):string;
- var
- sqlStr:string;
- begin
- sqlStr:='select SName from station.db where SNo='+inttostr(stationNo);
- try
- query.Close;
- query.SQL.Clear;
- query.SQL.Add(sqlStr);
- query.Prepare;
- query.Open;
- if query.RecordCount=1 then
- begin
- getName:=query.Fields.Fields[0].AsString;
- end
- else
- begin
- showmessage('查无此站,或数据库出错!');
- getName:='';
- end;
- except
- showmessage('查询站点名称时出错!');
- getName:='';
- end
- end;
- function Cstation.getNo(stationName:string):word;
- var
- sqlStr:string;
- begin
- sqlStr:='select SNo from station.db where SName='+''''+stationName+'''';
- try
- query.Close;
- query.SQL.Clear;
- query.SQL.Add(sqlStr);
- query.Prepare;
- query.Open;
- if query.RecordCount=1 then
- begin
- getNo:=query.Fields.Fields[0].AsVariant;
- end
- else
- begin
- showmessage('查无此站,或数据库出错!');
- getNo:=0;
- end;
- except
- showmessage('查询站点号码时出错!');
- getNo:=0;
- end
- end;
- procedure Cstation.setQuery(queryname:Tquery);
- begin
- query:=queryName;
- end;
- function Cticket.getTicket(SNo,DNo,trainNo:word;var ticketNo:word):word;
- var
- sqlStr:string;
- tSNo,tDNo:word;
- stations:Carrayword;
- begin
- stations:=Carrayword.Create;
- ticketNo:=0;
- tSNo:=MyCtrain.getRoute(trainNo,stations);
- tSNo:=stations.getOrder(SNo);
- tDNo:=stations.getOrder(DNo);
- sqlStr:='SELECT * FROM '+tableName+' where trainNo='+inttostr(trainNo);
- sqlStr:=sqlStr+' and flag=true and (SNo<= '+inttostr(tSNo)+') and (DNor>= '+inttostr(tDNo);
- sqlStr:=sqlStr+') order by SNo desc , DNor asc';
- //showmessage(sqlStr);
- try
- query.Close;
- query.SQL.Clear;
- query.SQL.Add(sqlStr);
- query.Prepare;
- query.Open;
- if(query.RecordCount>=1) then//at least one ticket
- begin
- query.RecNo:=1;
- tSNo:=query.Fields.Fields[1].AsVariant;
- tDNo:=query.Fields.Fields[2].AsVariant;
- ticketNo:=query.Fields.Fields[0].AsVariant;
- sqlStr:='UPDATE '+tableName+' SET FLAG=false WHERE ';
- sqlStr:=sqlStr+'trainNo='+inttostr(trainNo)+' and ticketNo='+inttostr(ticketNo);
- try
- query.Close;
- query.SQL.Clear;
- query.SQL.Add(sqlStr);
- query.Prepare;
- query.ExecSQL;
- getTicket:=localstation;//give the ackticket parameter
- except
- showmessage('无法获得票据!');
- getTicket:=0;
- end;
- end
- else if(localstation<>stations.warray[1])then//call other station for a ticket
- //if not the first station
- begin
- //we use stations.warray[1]--the first station
- //of the train to get tickets
- case stations.warray[1] of
- 1:getticket:=untchengdu.ticketclass.getticket(SNo,DNo,trainNo,ticketNo);
- 2:getticket:=untchongqing.ticketclass.getticket(SNo,DNo,trainNo,ticketNo);
- 3:getticket:=untbeijing.ticketclass.getticket(SNo,DNo,trainNo,ticketNo);
- 4:getticket:=untwuhan.ticketclass.getticket(SNo,DNo,trainNo,ticketNo);
- 5:getticket:=untchangsha.ticketclass.getticket(SNo,DNo,trainNo,ticketNo);
- 6:getticket:=untzhuzhou.ticketclass.getticket(SNo,DNo,trainNo,ticketNo);
- 7:getticket:=untguangzhou.ticketclass.getticket(SNo,DNo,trainNo,ticketNo);
- else getticket:=0;
- end;
- end
- else//there is no station now
- begin
- getTicket:=0;//no result
- end;
- except
- showmessage('数据操作出错!');
- getticket:=0;
- end;
- stations.Free;
- end;
- function Cticket.ackTicket(SNo,DNo,trainNo,ticketNo,ackNo:word;Flag:boolean):word;
- var
- sqlStr:string;
- stations:Carrayword;
- tSNo,tDNo:word;
- begin
- stations:=Carrayword.Create;
- myCtrain.getRoute(trainNo,stations);
- //get the train route in stations
- if (ackNo=localstation)then
- if(Flag=true)then
- begin
- sqlStr:='SELECT * FROM '+tableName+' WHERE trainNo='+inttostr(trainNo);
- sqlStr:=sqlStr+' and ticketNo='+inttostr(ticketNo)+' and flag=false';
- try
- query.Close;
- query.SQL.Clear;
- query.SQL.Add(sqlStr);
- query.Prepare;
- query.Open;
- if(query.RecordCount=1)then
- begin
- tSNo:=query.Fields.Fields[1].AsVariant;
- tDNo:=query.Fields.Fields[2].AsVariant;
- //order of station for the train
- //tSNo:=stations.getOrder(tSNo);
- //tDNo:=stations.getOrder(tDNo);
- //use stations.warray[1] and stations.getSuc to add tickets
- addticket(stations.warray[tSNo],SNo,trainNo,ticketNo);
- addticket(DNo,stations.warray[tDNo],trainNo,ticketNo);
- //now del the tickets
- sqlStr:='DELETE FROM '+tableName+' WHERE trainNo='+inttostr(trainNo);
- sqlStr:=sqlStr+' and ticketNo='+inttostr(ticketNo)+' and flag=false';
- try
- query.Close;
- query.SQL.Clear;
- query.SQL.Add(sqlStr);
- query.Prepare;
- query.ExecSQL;
- except
- showmessage('内部出错!');
- ackTicket:=1;
- end;
- end
- else
- begin
- showmessage('确认出错!');
- ackTicket:=1;
- end;
- except
- showmessage('ERROR');
- ackTicket:=1;
- end;
- end
- else//flag=false
- begin
- sqlStr:='UPDATE '+tablename+' set flag=true where trainNo='+inttostr(trainNo);
- sqlStr:=sqlStr+' and Flag=false and ticketNo='+inttostr(ticketNo);
- try
- query.Close;
- query.SQL.Clear;
- query.SQL.Add(sqlStr);
- query.Prepare;
- query.ExecSQL;
- ackticket:=0;
- except
- ackticket:=1;//error
- end;
- end
- else//not local station
- begin//call ackNo station to ack the ticket
- case ackNo of
- 1:ackTicket:=untchengdu.ticketclass.ackTicket(SNo,DNo,trainNo,ticketNo,ackNo,Flag);
- 2:ackTicket:=untchongqing.ticketclass.ackTicket(SNo,DNo,trainNo,ticketNo,ackNo,Flag);
- 3:ackTicket:=untbeijing.ticketclass.ackTicket(SNo,DNo,trainNo,ticketNo,ackNo,Flag);
- 4:ackTicket:=untwuhan.ticketclass.ackTicket(SNo,DNo,trainNo,ticketNo,ackNo,Flag);
- 5:ackTicket:=untchangsha.ticketclass.ackTicket(SNo,DNo,trainNo,ticketNo,ackNo,Flag);
- 6:ackTicket:=untzhuzhou.ticketclass.ackTicket(SNo,DNo,trainNo,ticketNo,ackNo,Flag);
- 7:ackTicket:=untguangzhou.ticketclass.ackTicket(SNo,DNo,trainNo,ticketNo,ackNo,Flag);
- else ackTicket:=1;//error
- end;
- end;
- stations.Free;
- end;
- function Cticket.addTicket(SNo,DNo,trainNo,ticketNo:word):word;
- var
- sqlStr:string;
- stations:Carrayword;
- tSor,tDor:word;
- begin
- if(SNo=localstation)then
- if((SNo<>DNo) and (DNo>0) and (SNo>0) )then
- begin
- stations:=Carrayword.Create;
- MyCtrain.getRoute(trainNo,stations);
- tSor:=stations.getOrder(SNo);
- tDor:=stations.getOrder(DNo);
- sqlStr:='INSERT INTO '+tableName+' (ticketNo,SNo,DNor,Flag,trainNo)';
- sqlStr:=sqlStr+' VALUES('+inttostr(ticketNo)+','+inttostr(tSor)+',';
- sqlStr:=sqlStr+inttostr(tDor)+',(True),'+inttostr(trainNo)+')';
- try
- query.Close;
- query.SQL.Clear;
- query.SQL.Add(sqlStr);
- query.Prepare;
- query.ExecSQL;
- //sqlStr:='UPDATE '
- addticket:=0;//OK
- except
- showmessage('插入票据出错!');
- addticket:=1;//error
- end;
- stations.Free;
- end
- else
- addticket:=0
- else//not local station
- begin
- case SNo of
- 1:addticket:=untchengdu.ticketclass.addTicket(SNo,DNo,trainNo,ticketNo);
- 2:addticket:=untchongqing.ticketclass.addTicket(SNo,DNo,trainNo,ticketNo);
- 3:addticket:=untbeijing.ticketclass.addTicket(SNo,DNo,trainNo,ticketNo);
- 4:addticket:=untwuhan.ticketclass.addTicket(SNo,DNo,trainNo,ticketNo);
- 5:addticket:=untchangsha.ticketclass.addTicket(SNo,DNo,trainNo,ticketNo);
- 6:addticket:=untzhuzhou.ticketclass.addTicket(SNo,DNo,trainNo,ticketNo);
- 7:addticket:=untguangzhou.ticketclass.addTicket(SNo,DNo,trainNo,ticketNo);
- end;
- end;
- end;
- function Cticket.delTicket(trainNo,ticketNo:word):word;
- var
- sqlStr:string;
- begin
- sqlStr:='DELETE FROM '+tableName+' WHERE trainNo='+inttostr(trainNo);
- sqlStr:=sqlStr+' and ticketNo='+inttostr(ticketNo)+' and flag=false';
- try
- query.Close;
- query.SQL.Clear;
- query.SQL.Add(sqlStr);
- query.Prepare;
- query.ExecSQL;
- delticket:=0; //OK
- except
- showmessage('删除票据出错!');
- delticket:=1;
- end;
- end;
- function Cticket.addfull(StationNo,trainNo:word;ticketNo:word;Num:word):word;
- var
- sqlStr:string;
- stations:Carrayword;
- i:integer;
- begin
- if(StationNo=localstation)then
- begin
- stations:=Carrayword.Create;
- MyCtrain.getRoute(trainNo,stations);
- for i:=1 to Num do
- begin
- sqlStr:='INSERT INTO '+tableName+' (ticketNo,SNo,DNor,Flag,trainNo)';
- sqlStr:=sqlStr+' VALUES('+inttostr(ticketNo+i-1)+',1,';
- sqlStr:=sqlStr+inttostr(stations.Num)+',True,'+inttostr(trainNo)+')';
- try
- query.Close;
- query.SQL.Clear;
- query.SQL.Add(sqlStr);
- query.Prepare;
- query.ExecSQL;
- //sqlStr:='UPDATE '
- addfull:=0;//OK
- except
- showmessage('插入票据出错!');
- addfull:=1;//error
- exit;//do not execute any more
- end;
- end;
- stations.Free;
- end
- else//not local station
- begin
- case StationNo of
- 1:addfull:=untchengdu.ticketclass.addfull(StationNo,trainNo,ticketNo,Num);
- 2:addfull:=untchongqing.ticketclass.addfull(StationNo,trainNo,ticketNo,Num);
- 3:addfull:=untbeijing.ticketclass.addfull(StationNo,trainNo,ticketNo,Num);
- 4:addfull:=untwuhan.ticketclass.addfull(StationNo,trainNo,ticketNo,Num);
- 5:addfull:=untchangsha.ticketclass.addfull(StationNo,trainNo,ticketNo,Num);
- 6:addfull:=untzhuzhou.ticketclass.addfull(StationNo,trainNo,ticketNo,Num);
- 7:addfull:=untguangzhou.ticketclass.addfull(StationNo,trainNo,ticketNo,Num);
- else:addfull:=1;
- end;
- //addfull:=0;
- end;
- end;
- procedure Cticket.setQuery(queryname:Tquery);
- begin
- query:=queryname;
- end;
- procedure Cticket.settable(name:string);
- begin
- tablename:=name;
- end;
- procedure TForm1.BitBtn1Click(Sender: TObject);
- begin
- frmChangsha:=TfrmChangsha.Create(form1);
- frmchangsha.Visible:=true;
- end;
- procedure TForm1.BitBtn2Click(Sender: TObject);
- begin
- frmBeijing:=TfrmBeijing.Create(form1);
- frmBeijing.Visible:=true;
- end;
- procedure TForm1.BitBtn3Click(Sender: TObject);
- begin
- frmGuangzhou:=Tfrmguangzhou.create(form1);
- frmguangzhou.Visible:=true;
- end;
- procedure TForm1.BitBtn4Click(Sender: TObject);
- begin
- frmzhuzhou:=Tfrmzhuzhou.create(form1);
- frmzhuzhou.Visible:=true;
- end;
- procedure TForm1.BitBtn5Click(Sender: TObject);
- begin
- frmchengdu:=Tfrmchengdu.create(form1);
- frmchengdu.Visible:=true;
- end;
- procedure TForm1.BitBtn6Click(Sender: TObject);
- begin
- frmwuhan:=Tfrmwuhan.create(form1);
- frmwuhan.Visible:=true;
- end;
- procedure TForm1.BitBtn7Click(Sender: TObject);
- begin
- frmchongqing:=Tfrmchongqing.create(form1);
- frmchongqing.Visible:=true;
- end;
- end.