📄 inv_poheadhint.pas
字号:
unit Inv_PoHeadHint;
Interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Base_Dialog, Grids, DBGridEh, Db, AdODB, StdCtrls;
Type
TFrm_Inv_PoHeadHint = Class(TFrm_Base_Dialog)
DBGridEh1: TDBGridEh;
DataSource1: TDataSource;
Label1: TLabel;
procedure btn_okClick(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure DBGridEh1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure DBGridEh1DblClick(Sender: TObject);
private
{ Private declarations }
public
procedure initform(VendorCode:string;POType:String; AdoConnection:tAdoConnection);
{ Public declarations }
end;
var
Frm_Inv_PoHeadHint: TFrm_Inv_PoHeadHint;
implementation
{$R *.DFM}
procedure TFrm_Inv_PoHeadHint.initform(VendorCode:string;PoType:String;AdoConnection:tAdoConnection);
begin
AdoQry_tmp.Connection:=AdoConnection;
AdoQry_tmp.Close;
AdoQry_tmp.sql.clear;
If PoType='' then
AdoQry_tmp.sql.text:=
' select pono,podate,PoType,poremArk '+
' from po '+
' where VendorCode='''+VendorCode+''''+
' Order by Podate DESC '
Else
AdoQry_tmp.sql.text:=
' select pono,podate,PoType,poremArk '+
' from po '+
' where VendorCode='''+VendorCode+''' and '+
' poType='+PoType+
' Order by Podate DESC ';
AdoQry_tmp.open;
dataSource1.DataSet :=AdoQry_tmp;
end;
procedure TFrm_Inv_PoHeadHint.btn_okClick(Sender: TObject);
begin
inherited;
modalResult:=mrok;
end;
procedure TFrm_Inv_PoHeadHint.FormActivate(Sender: TObject);
begin
inherited;
dbgrideh1.setfocus;
end;
procedure TFrm_Inv_PoHeadHint.DBGridEh1KeyDown(Sender: TObject;
var Key: Word; Shift: TShiftState);
begin
inherited;
if key=vk_return then btn_ok.Click;
end;
procedure TFrm_Inv_PoHeadHint.DBGridEh1DblClick(Sender: TObject);
begin
inherited;
btn_ok.Click;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -