pm_pc_check1_c.pas
来自「一个MRPII系统源代码版本」· PAS 代码 · 共 94 行
PAS
94 行
unit Pm_Pc_Check1_C;
Interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Base_Condition, Db, AdODB, StdCtrls, ExtEdit, linkedit;
Type
TFrm_Pm_Pc_Check1_C = Class(TFrm_Base_Condition)
Label1: TLabel;
Lbl_VendorName: TLabel;
Label2: TLabel;
CmBx_Status: TComboBox;
ExtEdt_VendorCode: TLinkEdit;
Edt_VendorName: TEdit;
procedure FormCreate(Sender: TObject);
procedure btn_okClick(Sender: TObject);
procedure ExtEdt_VendorCodeExit(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Frm_Pm_Pc_Check1_C: TFrm_Pm_Pc_Check1_C;
implementation
{$R *.DFM}
procedure TFrm_Pm_Pc_Check1_C.FormCreate(Sender: TObject);
begin
inherited;
CmBx_Status.ItemIndex:=0;
end;
procedure TFrm_Pm_Pc_Check1_C.btn_okClick(Sender: TObject);
begin
inherited;
Condition:='';
ConditionHint:='';
if ExtEdt_VendorCode.Text<>'' then
begin
Condition:='Pc.VendorCode='''+ExtEdt_VendorCode.Text+'''';
ConditionHint:='供应商:'+Lbl_VendorName.Caption;
end;
if CmBx_Status.Text='未批准' then
begin
if Condition<>'' then
begin
Condition:=Condition+' And PcLine.FormalPricePass=0';
ConditionHint:=ConditionHint+'/正式价未批准';
end
else
begin
Condition:='PcLine.FormalPricePass=0';
ConditionHint:='正式价未批准';
end;
end
else if CmBx_Status.Text='已批准' then
begin
if Condition<>'' then
begin
Condition:=Condition+' And PcLine.FormalPricePass=1';
ConditionHint:=ConditionHint+'/正式价已批准';
end
else
begin
Condition:='PcLine.FormalPricePass=1';
ConditionHint:='正式价已批准';
end;
end;
ModalResult:=mrOk;
end;
procedure TFrm_Pm_Pc_Check1_C.ExtEdt_VendorCodeExit(Sender: TObject);
begin
inherited;
FindVendorCode(Sender);
AdoQry_Tmp.Close;
AdoQry_Tmp.SQL.clear;
AdoQry_Tmp.SQL.Text := 'Select VendorName,VendorCode From Vendor Where VendorCode='''+ExtEdt_VendorCode.Text +''' And VendorUsable=1 ';
AdoQry_Tmp.Open;
Lbl_VendorName.Caption :=AdoQry_Tmp.fieldbyname('VendorName').AsString;
Edt_VendorName.Text :=AdoQry_Tmp.fieldbyname('VendorName').AsString;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?