mrp_qry_informaltotalmrp_item.pas

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

PAS
65
字号
unit Mrp_Qry_InformalTotalMrp_Item;

Interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Base_Qry, Db, Menus, ExtPrintReport, ActnList, AdODB, Grids, DBGridEh,
  StdCtrls, ExtCtrls, ComCtrls, ToolWin;

Type
  TFrm_Mrp_Qry_InformalTotalMrp_Item = Class(TFrm_Base_Qry)
    AdoQry_MainItemCode: TStringField;
    AdoQry_MainItemName: TStringField;
    AdoQry_MainItemType: TIntegerField;
    AdoQry_MainMAXQTY: TFloatField;
    AdoQry_MainMINQTY: TFloatField;
    AdoQry_MainPURCHLDTIME: TFloatField;
    AdoQry_MainMNLDTIME: TFloatField;
    AdoQry_MainPmCode: TIntegerField;
    AdoQry_MainBatchStrat: TIntegerField;
    AdoQry_MainUomName: TStringField;
    AdoQry_MainPmBatch: TIntegerField;
    AdoQry_MainItemflag: TStringField;
    AdoQry_MainPrepareLT: TIntegerField;
    AdoQry_MainRunLT: TIntegerField;
    AdoQry_MainQcLT: TIntegerField;
    procedure FormDestroy(Sender: TObject);
  private
    { Private declarations }
  public
    ItemCode:string;
    procedure InitForm(AdOConnection:TAdOConnection;ShowExtendColumn:Boolean);Override;
    { Public declarations }
  end;

var
  Frm_Mrp_Qry_InformalTotalMrp_Item: TFrm_Mrp_Qry_InformalTotalMrp_Item;

implementation

{$R *.DFM}

{ TFrm_Mrp_Qry_InformalTotalMrp_Item }

procedure TFrm_Mrp_Qry_InformalTotalMrp_Item.InitForm(
  AdOConnection: TAdOConnection; ShowExtendColumn: Boolean);
begin
  inherited;
selectfromsql:='select Item.*,Uom.UomName,Itemflag=ItemCode+'' ''+ItemName'+
               '   from Item,Uom '+
               ' where Item.UomCode=Uom.UomCode '+
               '   and Item.ItemCode in (select ite_ItemCode  '+
               '                           from Bom '+
               '                          where Bom.ItemCode='+quotedstr(ItemCode)+')';
getdata;
end;

procedure TFrm_Mrp_Qry_InformalTotalMrp_Item.FormDestroy(Sender: TObject);
begin
  inherited;
  Frm_Mrp_Qry_InformalTotalMrp_Item:=nil;
end;

end.

⌨️ 快捷键说明

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