mrp_qry_analyzermrpmo_mo.pas
来自「一个MRPII系统源代码版本」· PAS 代码 · 共 75 行
PAS
75 行
unit Mrp_Qry_AnalyzerMrpMo_Mo;
Interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Base_Qry, Menus, ExtPrintReport, Db, ActnList, AdODB, Grids, DBGridEh,
StdCtrls, ExtCtrls, ComCtrls, ToolWin;
Type
TFrm_Mrp_Qry_AnalyzerMrpMo_Mo = Class(TFrm_Base_Qry)
AdoQry_MainDeptflag: TStringField;
AdoQry_MainMONO: TStringField;
AdoQry_MainMoLineNO: TIntegerField;
AdoQry_MainItemCode: TStringField;
AdoQry_MainMOQTY: TFloatField;
AdoQry_MainMoLineDATE: TDateTimeField;
AdoQry_MainMoNoFinishQTY: TFloatField;
AdoQry_MainMoLineSTATUS: TIntegerField;
AdoQry_MainMOStArtWorkDate: TDateTimeField;
AdoQry_MainMoRealInQty: TFloatField;
AdoQry_MainMoInQty: TFloatField;
AdoQry_MainItemflag: TStringField;
procedure FormDestroy(Sender: TObject);
private
{ Private declarations }
public
procedure InitForm(AdOConnection:TAdOConnection;ReadOnly:Boolean);Override;
{ Public declarations }
end;
var
Frm_Mrp_Qry_AnalyzerMrpMo_Mo: TFrm_Mrp_Qry_AnalyzerMrpMo_Mo;
implementation
uses Mrp_Qry_AnalyzerMrpMo;
{$R *.DFM}
{ TFrm_Mrp_Qry_AnalyzerMrpMo_Mo }
procedure TFrm_Mrp_Qry_AnalyzerMrpMo_Mo.InitForm(
AdOConnection: TAdOConnection; ReadOnly: Boolean);
var sqltext:string;
begin
inherited;
freefields:='moqty,MoNoFinishqty,';
sqltext:='select Deptflag=mo.DeptCode+'' ''+Dept.DeptName, '
+' MoLine.*,Itemflag=MoLine.ItemCode+'' ''+Item.ItemName '
+' from mo,MoLine,Dept,Item '
+' where mo.mono=MoLine.mono '
+' and mo.DeptCode*=Dept.DeptCode '
+' and MoLine.ItemCode=Item.ItemCode '
+' and MoLine.MoLinestatus=6 '
+' and MoLine.MoNoFinishqty>0 '
+' and MoLine.ItemCode='''+ItemCodemo+''''
+' and MoLine.MoLinedate<='''+requiredatemo+'''';
with AdoQry_Main do
begin
Close;
sql.clear;
sql.Add(sqltext);
Prepared;
open;
end;
end;
procedure TFrm_Mrp_Qry_AnalyzerMrpMo_Mo.FormDestroy(Sender: TObject);
begin
inherited;
Frm_Mrp_Qry_AnalyzerMrpMo_Mo:=nil;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?