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

📄 stk_otherprice.pas

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

Interface

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

Type
  TFrm_Stk_OtherPrice = Class(TFrm_Base_Outer)
    AdoQry_MaInvendorCode: TStringField;
    AdoQry_MainItemCode: TStringField;
    AdoQry_MaInvendorName: TStringField;
    AdoQry_MainItemName: TStringField;
    AdoQry_MainPrice: TFloatField;
    AdoQry_MainNoTaxPrice: TFloatField;
    AdoQry_MainTaxRate: TFloatField;
  private
    { Private declarations }
  public
    { Public declarations }
  procedure InitForm(AdOConnection:TAdOConnection;ReadOnly:boolean);Override;
  function SetDeleteSql:String;Override;
  
  end;
var
  Frm_Stk_OtherPrice: TFrm_Stk_OtherPrice;

implementation

uses Stk_OtherPrice_D;

{$R *.DFM}

procedure TFrm_Stk_OtherPrice.InitForm(AdOConnection: TAdOConnection;
  ReadOnly: boolean);
begin
  inherited;
  //这个参数是回传到基类后控制价格及金额的显示格式
   PriceFields:='Price,NoTaxPrice,';
  SelectFromSQL:='Select OtherPrice.VendorCode'
    +',OtherPrice.ItemCode'
    +',Vendor.VendorName'
    +',Item.ItemName'
    +',OtherPrice.Price'
    +',OtherPrice.NoTaxPrice'
    +',OtherPrice.TaxRate'
    +' From OtherPrice'
    +' Join Vendor on OtherPrice.VendorCode=Vendor.VendorCode'
    +' Join Item on OtherPrice.ItemCode=Item.ItemCode';
  OrderByFields:='VendorCode,ItemCode';
  Frm_Sys_Detail:=TFrm_Stk_OtherPrice_D.Create(Application);
  GetData;
end;

function TFrm_Stk_OtherPrice.SetDeleteSql: String;
begin
  Result:='Delete OtherPrice'
    +' Where VendorCode='''+AdoQry_Main.fieldbyname('VendorCode').AsString+''''
    +' And ItemCode= '''+AdoQry_Main.fieldbyname('ItemCode').AsString+'''';
end;

end.

⌨️ 快捷键说明

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