火车售票系统(毕业论文) 下载本文

begin if log then

main.BitBtn2.Click else

showmessage('请先登陆!谢谢!'); end;

procedure Tmain.Button5Click(Sender: TObject); begin

GroupBOx1.Hide; GroupBOx2.Hide; end;

procedure Tmain.N6Click(Sender: TObject); begin close; end;

procedure Tmain.BitBtn4Click(Sender: TObject);

begin

ADOQuery2.Open; man.Hide; tuipiao.Show; combobox3.Clear;

combobox3.Items.Add(datetostr(date())); combobox3.Items.Add(datetostr(date()+1)); combobox3.Items.Add(datetostr(date()+2)); combobox3.ItemIndex:=0; end;

procedure Tmain.Button6Click(Sender: TObject); var Qtui:TADOQuery; begin if

(edit3.Text<>'')and

(edit4.Text<>'')and(edit5.Text<>'')and(edit6.Text<>'')and(edit7.Text<>'') then begin

Qtui:=TADOQuery.Create(nil); with Qtui do begin

Connection:=ADOConnection1; SQL.Clear;

SQL.Add('select * from tui'); Open; Append;

FieldByName('车次').AsString:=edit3.Text; FieldByName('目的站').AsString:=edit4.Text; FieldByName('发车时间').AsString:=edit7.Text; FieldByName('日期').AsString:=combobox3.Text; FieldByName('类型').AsString:=combobox4.Text; FieldValues['车厢号']:=strtoint(edit5.Text); FieldValues['座位号']:=strtoint(edit6.Text); Post; Close; end;

edit3.Clear;edit4.Clear;edit5.Clear;edit6.Clear;edit7.Clear; showmessage('你的操作已经成功!'); end else

showmessage('请认真添写!'); end;

procedure Tmain.Button7Click(Sender: TObject); begin

edit3.Clear;edit4.Clear;edit5.Clear;edit6.Clear;edit7.Clear; end;

procedure Tmain.N9Click(Sender: TObject); begin if log then

main.BitBtn4.Click else

showmessage('请先登陆!谢谢!'); end;

procedure Tmain.BitBtn9Click(Sender: TObject); begin man.Show; label30.Caption:='

'+inttostr(ADOQuery2.RecordCount)+'个操作员!'; end;