inv_opvendorsum_c.pas

来自「一个MRPII系统源代码版本」· PAS 代码 · 共 72 行

PAS
72
字号
unit Inv_OpVendorSum_C;

Interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Base_Condition, StdCtrls, Mask, Db, AdODB;

Type
  TFrm_Inv_OpVendorSum_C = Class(TFrm_Base_Condition)
    medt_Month: TMaskEdit;
    Label3: TLabel;
    procedure btn_okClick(Sender: TObject);
    procedure medt_MonthExit(Sender: TObject);
    procedure FormActivate(Sender: TObject);
  private
    { Private declarations }
  public
    onlyQuery:boolean;
    procedure InitForm(Adocnnct:tAdoConnection;UserCode:String;LoginDate:string);
    { Public declarations }
  end;

var
  Frm_Inv_OpVendorSum_C: TFrm_Inv_OpVendorSum_C;

implementation

uses Sys_Global,Inv_Global;

{$R *.DFM}

procedure TFrm_Inv_OpVendorSum_C.InitForm(Adocnnct:tAdoConnection;UserCode:String;LoginDate:string);
begin
  onlyQuery:=False;
  AdoQry_Tmp.Connection:=Adocnnct;
  medt_Month.text:=LoginDate;
end;

procedure TFrm_Inv_OpVendorSum_C.btn_okClick(Sender: TObject);
begin
  //inherited;
  if Trim(medt_Month.text)<>'' then
  begin
     condition:=' InvMonth='''+medt_Month.text+'''';
  end;
  onlyQuery:=False;
  ConditionHint:='月份:'+medt_Month.text;
  modalResult:=mrok;
end;

procedure TFrm_Inv_OpVendorSum_C.medt_MonthExit(Sender: TObject);
begin
  inherited;
  if activecontrol.Name='btn_Cancel' then
     exit;
  InvdataChangecheck(AdoQry_tmp,medt_Month.text);
  selectnext(activecontrol,True,True);
  btn_ok.ControlStyle :=[cSclickEvents];
  btn_ok.ControlState :=[cSclicked];
  btn_ok.SetFocus ;
end;

procedure TFrm_Inv_OpVendorSum_C.FormActivate(Sender: TObject);
begin
  inherited;
  medt_Month.Text:=formatdatetime('yyyy.mm',incMonth(now,-1));
  medt_Month.SetFocus ;  
end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?