📄 ap_qry_invoicepay_condition.pas
字号:
unit Ap_Qry_InvoicePay_Condition;
//
Interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Base_Dialog, Db, AdODB, StdCtrls, Mask, ExtEdit;
Type
TFrm_Ap_Qry_InvoicePay_Condition = Class(TFrm_Base_Dialog)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Extedt_VendorCode: TExtEdit;
Medt_begindate: TMaskEdit;
Medt_Enddate: TMaskEdit;
Lbl_VendorName: TLabel;
Label5: TLabel;
procedure FormCreate(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure btn_okClick(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure Extedt_VendorCodeExit(Sender: TObject);
procedure Medt_begindateExit(Sender: TObject);
procedure Medt_EnddateExit(Sender: TObject);
private
{ Private declarations }
procedure SetDialog;
public
VendorCode:string;
beginDate,endDate:string;
{ Public declarations }
end;
var
Frm_Ap_Qry_InvoicePay_Condition: TFrm_Ap_Qry_InvoicePay_Condition;
implementation
{$R *.DFM}
procedure TFrm_Ap_Qry_InvoicePay_Condition.FormCreate(Sender: TObject);
begin
inherited;
Extedt_VendorCode.Text:='';
Lbl_VendorName.Caption := '';
VendorCode:='';
beginDate:=FormatDateTime('yyyy.mm.dd',now()-15);
endDate:=FormatDateTime('yyyy.mm.dd',date);
end;
procedure TFrm_Ap_Qry_InvoicePay_Condition.SetDialog;
begin
Medt_begindate.Text:=begindate;
Medt_EndDate.Text:=endDate;
if VendorCode<>'' then
begin
Extedt_VendorCode.Text:=VendorCode;
GetVendorName(Extedt_VendorCode);
end;
end;
procedure TFrm_Ap_Qry_InvoicePay_Condition.FormActivate(Sender: TObject);
begin
inherited;
SetDialog;
end;
procedure TFrm_Ap_Qry_InvoicePay_Condition.btn_okClick(Sender: TObject);
begin
inherited;
VendorCode:=Extedt_VendorCode.Text;
begindate:=Medt_begindate.Text;
endDate:=Medt_EndDate.Text;
end;
procedure TFrm_Ap_Qry_InvoicePay_Condition.FormDestroy(Sender: TObject);
begin
inherited;
Frm_Ap_Qry_InvoicePay_Condition:=nil;
end;
procedure TFrm_Ap_Qry_InvoicePay_Condition.Extedt_VendorCodeExit(
Sender: TObject);
begin
// inherited;
if Extedt_VendorCode.Text<>'' then VendorCodeCheck(Extedt_VendorCode);
end;
procedure TFrm_Ap_Qry_InvoicePay_Condition.Medt_begindateExit(
Sender: TObject);
begin
if Medt_begindate.Text<>' . . ' then
DateCheck(Medt_begindate);
// try
// DateSeparator:='.';
// Shortdateformat:='yyyy.mm.dd';
// StrToDateTime(Medt_begindate.Text);
// except
// Application.MessageBox(' 日期非法! ','信息提示',mb_ok);
// Medt_begindate.SetFocus;
// Abort;
// end;
end;
procedure TFrm_Ap_Qry_InvoicePay_Condition.Medt_EnddateExit(
Sender: TObject);
begin
// inherited;
if Medt_Enddate.Text<>' . . ' then
DateCheck(Medt_Enddate);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -