管理系统使用说明书及详解Word文件下载.docx
《管理系统使用说明书及详解Word文件下载.docx》由会员分享,可在线阅读,更多相关《管理系统使用说明书及详解Word文件下载.docx(28页珍藏版)》请在冰豆网上搜索。
Dialogs,StdCtrls,unit2,DB,ADODB;
type
TForm8=class(TForm)
Label11:
TLabel;
Label1:
Label2:
Edit1:
TEdit;
Edit2:
Label3:
Button1:
TButton;
ADOConnection1:
TADOConnection;
ADOQuery1:
TADOQuery;
Button2:
procedureButton1Click(Sender:
TObject);
procedureButton2Click(Sender:
private
{Privatedeclarations}
public
{Publicdeclarations}
end;
var
Form8:
TForm8;
implementation
usesUnit1;
{$R*.dfm}
procedureTForm8.Button1Click(Sender:
begin
adoquery1.close;
adoquery1.SQL.Clear;
adoquery1.SQL.Text:
='
select*frombiao1whereusername='
'
+edit1.Text+'
andpassword='
+edit2.Text+'
;
adoquery1.Open;
ifadoquery1.Bofandadoquery1.Eofthen
begin
application.MessageBox('
用户名或密码错误'
'
出错'
mb_ok+mb_iconwarning);
edit1.SetFocus;
edit2.SelectAll;
end
else
form2.Show;
form8.Hide;
end;
procedureTForm8.Button2Click(Sender:
close;
end.
unitUnit4;
Dialogs,StdCtrls,ExtCtrls,Buttons,DB,ADODB,Grids,DBGrids;
TForm4=class(TForm)
RadioGroup1:
TRadioGroup;
GroupBox1:
TGroupBox;
DBGrid1:
TDBGrid;
DataSource1:
TDataSource;
BitBtn1:
TBitBtn;
procedureBitBtn1Click(Sender:
Form4:
TForm4;
StrSql:
string;
procedureTForm4.BitBtn1Click(Sender:
ifedit1.Text='
'
then
MessageBox(0,'
查询内容为空!
错误'
0)
iftrim(edit1.Text)<
>
caseRadioGroup1.ItemIndexof
0:
Begin
StrSql:
select*fromtable2where会员号='
+trim(edit1.Text)+'
ifADOQuery1.Activethen
ADOQuery1.Active:
=false;
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add(StrSql);
=true;
ifADOQuery1.BofandADOQuery1.Eofthen
Messagedlg('
查无此人,请从新输入会员号'
mtError,[mbok],1);
1:
select*fromtable2where会员姓名='
查无此人,请从新输入会员姓名'
2:
select*fromtable2where出生年月='
查无此人,请从新输入出生年月'
3:
select*fromtable2where车辆品牌型号='
性别输入错误,请从新输入车辆品牌型号'
4:
select*fromtable2where购车时间='
查无此人,请从新输入购车时间'
5:
select*fromtable2where电话='
查无此人,请从新输入电话'
End.
unitUnit5;
Dialogs,StdCtrls,Buttons,ComCtrls,DB,ADODB,Grids,DBGrids;
TForm5=class(TForm)
GroupBox2:
Label4:
Label5:
Label6:
Label7:
Label8:
Label9:
Label10:
Edit3:
RadioButton1:
TRadioButton;
RadioButton2:
Edit4:
DateTimePicker1:
TDateTimePicker;
Edit6:
Edit7:
Edit8:
Edit9:
Edit5:
BitBtn2:
procedureBitBtn2Click(Sender:
Form5:
TForm5;
procedureTForm5.BitBtn2Click(Sender:
ifEdit2.Text='
会员号内容不能为空!
MB_OK)
else
ADOQuery1.Close;
ADOQuery1.SQL.Text:
+edit2.text+'
ADOQuery1.Open;
ifnot(ADOQuery1.EofandADOQuery1.Bof)then
会员号不能重复!
警告'
0);
edit2.SetFocus;
exit;
select*fromtable2'
ADOQuery1.Append;
ADOQuery1.FieldByName('
会员号'
).AsString:
=edit2.Text;
会员姓名'
=edit3.Text;
ifRadioButton1.Checkedthen
性别'
男'
女'
出生年月'
).AsDateTime:
=DateTimePicker1.Date;
购车时间'
=edit5.Text;
车辆品牌型号'
=edit4.Text;
购入价格(万)'
=edit6.Text;
优惠套餐'
=edit7.Text;
电话'
=edit8.Text;
贷款套餐'
=edit9.Text;
ADOQuery1.Post;
unitUnit6;
TForm6=class(TForm)
BitBtn3:
procedureBitBtn3Click(Sender:
Form6:
TForm6;
procedureTForm6.BitBtn3Click(Sender:
ADOQuery1.close;
if(ADOQuery1.EofandADOQuery1.Bof)then
会员号不存在,不能修改!
ADOQuery1.Edit;
unitUnit7;
Dialogs,StdCtrls,Buttons,DB,ADODB,Grids,DBGrids;
TForm7=class(TForm)
BitBtn4:
procedureBitBtn4Click(Sender:
Form7:
TForm7;
procedureTForm7.BitBtn4Click(Sender:
A