2023年-仓库管理系统delphi源码.docx
《2023年-仓库管理系统delphi源码.docx》由会员分享,可在线阅读,更多相关《2023年-仓库管理系统delphi源码.docx(65页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、unit Unitl;interfaceusesWindows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, DB, ADODB, jpeg, ExtCtrls;typeTForm 1 = class(TForm)ADOConnection 1: TADOConnection;ADOQuery 1: TADOQuery;Editl: TEdit;Edit2: TEdit;Button 1: TButton;Button2: TButton;ADOTablel: TADO
2、Table;Image 1: TImage;Label 1: TLabel;Label 2: TLabel;Label3: TLabel;Label4: TLabel;Button3: TButton;procedure Button 1 Click(Sender: TObject);procedure Button2Click(Sender: TObject);procedure Button3Click(Sender: TObject);private Private declarations publiccount:integer; Public declarations end;var
3、Form 1: TForm 1;implementationuses Unitl2,Unitl9;$R*.dfmprocedure TForm 1 .Button 1 Click(Sender: TObject);varend;if (combobox3.Itemlndex= 1) thenbeginadotablel .Filtered:=false;/ 解除过滤temp:=trim(%+juti+%);adotable 1 .Filter:=商品名称 like n,+temp+n;adotable l.Filtered:=true;end;if (combobox3 .Itemlndex=
4、2) thenbeginadotable 1.Filtered:=false;adotable 1 .Filters型号二+juti+”“;adotable l.Filtered:=true;end;if (combobox3.1temlndex=3) thenbeginadotable l.Filtered:=false;adotablel .Filter:=仓库名称廿+juti+”;adotablel .Filtered:=true;end;end;end;procedure TForm3.Button5Click(Sender: TObject);beginadotable l.Filt
5、ered:=false;adotablel.Close;adotablel.Open;end;procedure TForm3.Button6Click(Sender: TObject);beginif (editl.Textn) and (edit2.Textn) and (edit3.Textn) and (edit4.Textn) and (edit5.Textn) and (edit6.Textn) and (edit7.Texton) and (combobox 1 .Textn) and (combobox2.TextH) thenbeginif application.Messa
6、geBox。确定要添加?超市仓库管理系统,mb_iconinformation + mb_yesno) = idyes thenbeginadotable 1 .InsertRecord(editl .Text,edit2.Text,edit3.Text,combobox 1 .Text,edit4.Text,edit5 .Text,co mbobox2.Text,edit6.Text,edit7.Text);adotablel.Close;adotablel.Open;showmessageC新商品添加成功);end;endelseshowmessage。信息未填全);end;end.uni
7、t Unit4;interfaceusesWindows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ADODB, DB, StdCtrls, Grids, DBGrids, jpeg, ExtCtrls;typeTForm4 = class(TForm)Image 1: TImage;Label 1: TLabel;GroupBoxl: TGroupBox;GroupBox2: TGroupBox;DBGridkTDBGrid;DBGrid2: TDBGrid;Button 1: TB
8、utton;Button2: TButton;Button3: TButton;Button4: TButton;Editl: TEdit;Edit2: TEdit;Edit3: TEdit;Edit4: TEdit;Edit5: TEdit;DataSource 1: TDataSource;DataSource2: TDataSource;ADOConnection 1: TADOConnection;ADOTablel: TADOTable;ADOQueryl: TADOQuery;ADOQuery2: TADOQuery;ADOQuery3: TADOQuery;Label2: TLa
9、bel;Label 3: TLabel;Label4: TLabel;Label5: TLabel;Label6: TLabel;procedure Button 1 Click(Sender: TObject);procedure Button2Click(Sender: TObject);procedure Button3Click(Sender: TObject);procedure Button4Click(Sender: TObject);procedure Edit3KeyUp(Sender: TObject; var Key: Word;Shift: TShiftState);p
10、rocedure DBGrid 1 CellClick(Column: TColumn);procedure FormShow(Sender: TObject);private Private declarations public Public declarations end;varForm4: TForm4;implementation$R*.dfmprocedure TForm4.Button 1 Click(Sender: TObject);beginif叩plication.MessageBoxf请确认是否要删除超市仓库管理系统,mb_iconinformation + mb_ye
11、sno) = idyes thenbeginadotablel .Delete;end;end;procedure TForm4.Button2Click(Sender: TObject);beginadotablel.Edit;end;procedure TForm4.Button3Click(Sender: TObject);beginadotablel.Post;showmessage(修改成功);end;procedure TForm4.Button4Click(Sender: TObject);varcangku,dizhi,bianhaorstring;beginif (editl
12、 .Textn) and (edit2.Texton) and (edit3.Text) thenbegincangku:=editl .Text;dizhi:=edit2.Text;bianhao:=edit3.Text;adoqueryl.Close;adoqueryl.SQL.Text := Select * from 仓库信息表 where 仓库名称二+cangku+” ; adoqueryl.open;if not adoqueryl.Eof thenbeginMessageBox(handleJ此仓库名已存在!提示: mb_lconlnformation + mb_Ok);exit
13、;end;adoqueryl.Close;adoquery 1 .SQL.Text := select * from 员工信息表 where 编号=+bianhao+”;adoqueryl.open;if adoquery 1 .RecordCount = 0 thenbeginshowmessage,不存在此用户,请重新输入);edit3.SetFocus;exit;end;if application.MessageBox(确定要添加新仓库?超市仓库管理系统,mb_iconinformation + mb_yesno) = idyes thenbeginadotablel .InsertR
14、ecord(cangku,dizhi,bianhao);adotablel.Close;adotablel.Open;showmessageC新仓库添加成功);end;endelseshowmessage(信息未填全);end;procedure TForm4.Edit3KeyUp(Sender: TObject; var Key: Word;Shift: TShiftState);varbianhao:string;beginbianhaoedit3.Text;with adoquery2 dobeginclose;sql.clear;sql.add(!select 姓名 from 员工信息
15、表 where 编号=+bianhao+);open;edit4.Text:二Fieldbyname。姓名)AsString;close;sql.clear;sql.addCelect 电话 from 员工信息表 where 编号=+bianhao+);open;edit5.Text:=Fieldbyname(电话)AsString;end;end;procedure TForm4.DBGrid 1 CellClick(Column: TColumn);vartemp:variant;workerld:string;begintemp:二DataSourcel. DataSet. FieldV
16、alues负责人编号workerlD:=VarToStr(temp);adoquery3.Close;adoquery3.SQL.Clear;adoquery3.SQL.Text:=,select编号,姓名,性别,电话,地址,出生日期,部门,职务from员工信息 表 where 编号=+workerid+”;adoquery3.Open;dbgrid2.Columns0.Width:=100;dbgrid2.Columns 1 .Width:=100;dbgrid2.Columns2 .Width:=100;dbgrid2.Columns3.Width:=100;dbgrid2.Columns
17、 4 .Width:=l 00;dbgrid2.Columns5.Width:=100;dbgrid2.Columns6.Width:=100;dbgrid2.Columns7.Width:=100;end;procedure TForm4.FormShow(Sender: TObject);beginadoconnection 1 TADOConnection.Create(nil);adoconnectionl.LoginPrompt:=false;adoconnection 1 .Connected:=false;adoconnection 1 .ConnectionString:=,P
18、rovider=SQLOLEDB.l ;Password=411114;Persist SecurityInfo=True;User ID=sa;Initial Catalog=天天;Data Source=win-rnskltmak91;Use Procedure for Prepare= 1;Auto Translate=True;Packet Size=4096;Workstation ID=WIN-RNSK 1TMAK9L1; adoconnection 1 .Connected:=true;adotablel:=TADOTable.Create(nil);adotablel .Con
19、nection:=adoconnectionl;adotable 1 .TableN ame:二仓库信息表; adotablel.Open;datasource 1 .DataSet:=adotablel;adoquery 1 :=TADOQuery.Create(nil);adoquery 1 .Connection:=adoconnection 1;adoquery2:=TADOQuery.Create(nil);adoquery2.Connection:=adoconnection 1;adoquery3.Connection:=adoconnectionl; end;end.unit
20、Unit5;interfaceusesWindows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Grids, DBGrids, ComCtrls, DBCtrls, DB, ADODBJPEG, ExtCtrls;typeTForm5 = class(TForm) GroupBoxl: TGroupBox;Label 1: TLabel;DBGridkTDBGrid;Buttonl: TButton;GroupBox2: TGroupBox;Label2: TLab
21、el;Editl: TEdit;Label 3: TLabel;RadioButton 1: TRadioButton;RadioButton2: TRadioButton;Label4: TLabel;Edit2: TEdit;Label5: TLabel;Edit3: TEdit;Label6: TLabel;DateTimePickerl: TDateTimePicker;Label?: TLabel;ComboBoxl: TComboBox;Label8: TLabel;Edit4: TEdit;Label9: TLabel;GroupBox3: TGroupBox;Label 10:
22、 TLabel;ComboBox2: TComboBox;Edit5: TEdit;Button2: TButton;Button3: TButton;ADOConnection 1: TADOConnection;ADOTablel:TADOTable;DataSource 1: TDataSource;OpenDialogl: TOpenDialog;Button5: TButton;Button6: TButton;Edit6: TEdit;Image 1: TImage;Image2: TImage;Label 11: TLabel;Button4: TButton;Button?:
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 2023 仓库 管理 系统 delphi 源码
限制150内