?? kaoqinchaxun.pas
字號:
unit kaoqinchaxun;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, ADODB, Buttons, StdCtrls, Grids, DBGrids, ExtCtrls;
type
TForm5 = class(TForm)
DBGrid1: TDBGrid;
BitBtn1: TBitBtn;
ADOConnection1: TADOConnection;
ADOTable1: TADOTable;
DataSource1: TDataSource;
Label2: TLabel;
SpeedButton1: TSpeedButton;
GroupBox2: TGroupBox;
BitBtn3: TBitBtn;
Edit1: TEdit;
RadioGroup1: TRadioGroup;
BitBtn2: TBitBtn;
procedure Button1Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
procedure BitBtn3Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form5: TForm5;
implementation
uses kaoqinxiugai, Unit1;
{$R *.dfm}
procedure TForm5.Button1Click(Sender: TObject);
begin
if form5.RadioGroup1.ItemIndex=0 then
begin
IF NOT form5.ADOTable1.Locate('員工ID',EDIT1.Text,[loPartialKey]) THEN
SHOWMESSAGE('沒有這個人!');
end
else if form5.RadioGroup1.ItemIndex=1 then
begin
IF NOT form5.ADOTable1.Locate('員工姓名',EDIT1.Text,[loPartialKey]) THEN
SHOWMESSAGE('沒有這個人!');
end
end;
procedure TForm5.BitBtn1Click(Sender: TObject);
begin
close;
end;
procedure TForm5.SpeedButton1Click(Sender: TObject);
begin
form6.show;
end;
procedure TForm5.BitBtn3Click(Sender: TObject);
begin
if form5.RadioGroup1.ItemIndex=0 then
begin
IF NOT form5.ADOTable1.Locate('員工ID',EDIT1.Text,[loPartialKey]) THEN
SHOWMESSAGE('沒有這個人!');
end
else if form5.RadioGroup1.ItemIndex=1 then
begin
IF NOT form5.ADOTable1.Locate('員工姓名',EDIT1.Text,[loPartialKey]) THEN
SHOWMESSAGE('沒有這個人!');
end
end;
procedure TForm5.BitBtn2Click(Sender: TObject);
begin
QuickReport1.Preview ;
end;
end.
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -