Unit1.pas
资源名称:xiaobai.rar [点击查看]
上传用户:autowell
上传日期:2022-06-21
资源大小:16754k
文件大小:2k
源码类别:
Delphi控件源码
开发平台:
Delphi
- unit Unit1;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls, Grids, DBGrids, Mask, DBCtrls, DB, ADODB;
- type
- TForm1 = class(TForm)
- ADOConnection1: TADOConnection;
- ADODataSet1: TADODataSet;
- DataSource1: TDataSource;
- DBEdit1: TDBEdit;
- DBEdit2: TDBEdit;
- DBGrid1: TDBGrid;
- Label1: TLabel;
- Label2: TLabel;
- Button1: TButton;
- Button2: TButton;
- Button3: TButton;
- ComboBox1: TComboBox;
- Label3: TLabel;
- Button4: TButton;
- Button5: TButton;
- Button6: TButton;
- DBEdit3: TDBEdit;
- Button7: TButton;
- Button8: TButton;
- procedure Button1Click(Sender: TObject);
- procedure Button2Click(Sender: TObject);
- procedure Button3Click(Sender: TObject);
- procedure Button5Click(Sender: TObject);
- procedure Button4Click(Sender: TObject);
- procedure Button6Click(Sender: TObject);
- procedure Button7Click(Sender: TObject);
- procedure Button8Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- Form1: TForm1;
- implementation
- {$R *.dfm}
- procedure TForm1.Button1Click(Sender: TObject);
- begin
- Adodataset1.next;
- end;
- procedure TForm1.Button2Click(Sender: TObject);
- begin
- dbedit1.ReadOnly:=false;
- dbedit2.ReadOnly:=false;
- dbedit3.ReadOnly:=false;
- dbedit3.text:=combobox1.text;
- adodataset1.Active:=true;
- adodataset1.Edit;
- adodataset1.Append;
- end;
- procedure TForm1.Button3Click(Sender: TObject);
- begin
- close;
- end;
- procedure TForm1.Button5Click(Sender: TObject);
- begin
- Adodataset1.First ;
- end;
- procedure TForm1.Button4Click(Sender: TObject);
- begin
- Adodataset1.prior;
- end;
- procedure TForm1.Button6Click(Sender: TObject);
- begin
- Adodataset1.last;
- end;
- procedure TForm1.Button7Click(Sender: TObject);
- begin
- Adodataset1.Delete;
- Adodataset1.Refresh;
- end;
- procedure TForm1.Button8Click(Sender: TObject);
- begin
- Adodataset1.Edit;
- Adodataset1.Refresh;
- end;
- end.