📄 dfmtfind.pas
字号:
unit dfmtfind;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ComCtrls, StdCtrls, Buttons, ExtCtrls, Grids, DBGrids, Db, DBTables, Mask;
type
Tdfm_tfind = class(TForm)
StatusBar1: TStatusBar;
DBGrid1: TDBGrid;
Panel1: TPanel;
Panel2: TPanel;
BitBtn5: TBitBtn;
Label1: TLabel;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
dstposinvy: TDataSource;
qrytposinvy: TQuery;
MaskEdit1: TMaskEdit;
RadioGroup1: TRadioGroup;
procedure BitBtn5Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure BitBtn1Click(Sender: TObject);
procedure iaskufind;
procedure iaqtyfind;
procedure RadioGroup1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
dfm_tfind: Tdfm_tfind;
implementation
{$R *.DFM}
procedure Tdfm_tfind.BitBtn5Click(Sender: TObject);
begin
close;
end;
procedure Tdfm_tfind.FormClose(Sender: TObject; var Action: TCloseAction);
begin
action:=cafree;
end;
procedure Tdfm_tfind.BitBtn1Click(Sender: TObject);
begin
{ qrytposinvy.close;
// qrytposinvy.SQL.clear;
qrytposinvy.ParamByName ('viasku').asstring:=trim(maskedit1.text)+'%';
qrytposinvy.open ;}
//
with radiogroup1 do
begin
case itemindex of
0:begin
iaskufind;
end;
1:begin
iaqtyfind;
end;
end;
end;
end;
procedure Tdfm_tfind.iaskufind;
begin
qrytposinvy.close;
qrytposinvy.SQL.clear;
qrytposinvy.SQL.add('select * from dbo.bkinvy Dbo_bkinvy');
qrytposinvy.SQL.Add('where iasku like :viasku');
qrytposinvy.SQL.Add('order by iasku');
qrytposinvy.ParamByName ('viasku').asstring:=trim(maskedit1.text)+'%';
qrytposinvy.open;
end;
procedure Tdfm_tfind.iaqtyfind;
begin
qrytposinvy.close;
qrytposinvy.SQL.clear;
qrytposinvy.SQL.add('select * from dbo.bkinvy Dbo_bkinvy');
qrytposinvy.SQL.Add('where iasku like :viasku');
qrytposinvy.SQL.Add('order by iaqty');
qrytposinvy.ParamByName ('viasku').asstring:=trim(maskedit1.text)+'%';
qrytposinvy.open;
end;
procedure Tdfm_tfind.RadioGroup1Click(Sender: TObject);
begin
with radiogroup1 do
begin
case itemindex of
0:begin
iaskufind;
end;
1:begin
iaqtyfind;
end;
end;
end;
end;
procedure Tdfm_tfind.BitBtn2Click(Sender: TObject);
begin
// ppreport1.print;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -