仓库管理系统delphi源码.doc

仓库管理系统delphi源码.doc

ID:51643755

大小:260.50 KB

页数:68页

时间:2020-03-14

仓库管理系统delphi源码.doc_第1页
仓库管理系统delphi源码.doc_第2页
仓库管理系统delphi源码.doc_第3页
仓库管理系统delphi源码.doc_第4页
仓库管理系统delphi源码.doc_第5页
资源描述:

《仓库管理系统delphi源码.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、unitUnit1;interfaceusesWindows,Messages,SysUtils,Variants,Classes,Graphics,Controls,Forms,Dialogs,StdCtrls,DB,ADODB,jpeg,ExtCtrls;typeTForm1=class(TForm)ADOConnection1:TADOConnection;ADOQuery1:TADOQuery;Edit1:TEdit;Edit2:TEdit;Button1:TButton;Button2:TButton;ADOT

2、able1:TADOTable;Image1:TImage;Label1:TLabel;Label2:TLabel;Label3:TLabel;Label4:TLabel;Button3:TButton;procedureButton1Click(Sender:TObject);procedureButton2Click(Sender:TObject);procedureButton3Click(Sender:TObject);private{Privatedeclarations}publiccount:integer

3、;{Publicdeclarations}end;varForm1:TForm1;implementationusesUnit12,Unit19;{$R*.dfm}procedureTForm1.Button1Click(Sender:TObject);varyonghu:string;beginyonghu:=trim(edit1.Text);//trim去除字符串空格count:=count+1;//登陆次数withadoquery1dobeginClose;SQL.Clear;SQL.text:='select*f

4、rom用户信息表where用户名='''+yonghu+'''';open;if(adoQuery1.RecordCount<>0)and(edit2.Text<>'')and(adoQuery1.FieldByName('密码').AsString=edit2.Text)thenbeginifadoQuery1.FieldByName('是否管理员').AsString='True'thenbeginform12.SpeedButton1.Visible:=true;form12.Button13.Visible:=t

5、rue;application.MessageBox('密码正确,即将进入系统。','提示',mb_ok);form1.Hide;form12.Show;endelsebeginform12.SpeedButton1.Visible:=false;form12.Button13.Visible:=false;application.MessageBox('密码正确,即将进入系统。','提示',mb_ok);form1.Hide;form12.Show;end;endelsebeginif(count=1)thenbegi

6、napplication.MessageBox('用户名或密码错误,还剩2次机会','提示',mb_ok);edit1.SetFocus;//光标是向左对齐的也就是在编辑框的最左边end;if(count=2)thenbeginapplication.MessageBox('您还有最后一次机会,请仔细核对用户名和密码','提示',mb_ok);edit1.Clear;edit2.clear;edit1.SetFocus;end;if(count=3)thenbeginapplication.MessageBox('密码错

7、误超过三次系统即将关闭','提示',mb_ok);application.Terminate;//退出程序end;end;end;end;procedureTForm1.Button2Click(Sender:TObject);beginapplication.Terminate;end;procedureTForm1.Button3Click(Sender:TObject);beginform19.ShowModal;end;End.unitUnit2;interfaceusesWindows,Messages,Sys

8、Utils,Variants,Classes,Graphics,Controls,Forms,Dialogs,StdCtrls,Grids,DBGrids,jpeg,ExtCtrls,DB,ADODB;typeTForm2=class(TForm)Image1:TImage;Label1:TLabel;GroupBo

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。