⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 inv_backpricedefine_c.pas

📁 一个MRPII系统源代码版本
💻 PAS
字号:
unit Inv_BackPriceDefine_C;

Interface

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

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

var
  Frm_Inv_BackPriceDefine_C: TFrm_Inv_BackPriceDefine_C;

implementation

uses Sys_Global;

{$R *.DFM}

procedure TFrm_Inv_BackPriceDefine_C.InitForm(Adocnnct:tAdoConnection;UserCode:String;LoginDate:string);
begin
  onlyQuery:=False;
  AdoQry_Tmp.Connection:=Adocnnct;
  with AdoQry_tmp do
  begin
    Close;
    sql.Text:='select left(convert(varchAr,Invstatus),7) Month from Invstatus where InvstatusName='''+'clsperiod'+'''';
    open;
    bigMonth:=formatdatetime('yyyy.mm',incMonth(strtodatetime(fieldbyname('Month').asstring+'.01'),1));
  end;
  medt_Month.Text :=bigMonth;
end;

procedure TFrm_Inv_BackPriceDefine_C.btn_okClick(Sender: TObject);
begin
  inherited;
  modalResult:=mrok;
end;


procedure TFrm_Inv_BackPriceDefine_C.medt_MonthExit(Sender: TObject);
begin
  inherited;
  onlyQuery:=False;
  if activecontrol.Name='btn_Cancel' then
     abort;
  MonthCheck(sender);
  if strtodate(medt_Month.Text+'.01')>strtodate(bigMonth+'.01') then
  begin
    DispInfo(bigMonth+'月份还未结帐,不能处理'+medt_Month.text+'月份!',3);
    medt_Month.SetFocus ;
  end
  else
  if strtodate(medt_Month.Text+'.01')<strtodate(bigMonth+'.01') then
  begin
    DispInfo('该月份已经结帐,只能查询!',3);
    onlyQuery:=True;
  end;
end;

end.

⌨️ 快捷键说明

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