📄 pc_qry_pc.pas
字号:
unit PC_Qry_Pc;
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_Pc_Qry_Pc = Class(TFrm_Base_Qry)
AdoQry_MainPcNo: TStringField;
AdoQry_MainPcLineId: TAutoIncField;
AdoQry_MainItemCode: TStringField;
AdoQry_MainPcTaxPrice: TFloatField;
AdoQry_MainPcNoTaxPrice: TFloatField;
AdoQry_MainPcStArtDate: TDateTimeField;
AdoQry_MainPcendDate: TDateTimeField;
AdoQry_MainPcStArtQty: TFloatField;
AdoQry_MainPcendQty: TFloatField;
AdoQry_MainPcPriceType: TIntegerField;
AdoQry_MainPCReferencedPrice: TIntegerField;
AdoQry_MaInvendorCode: TStringField;
AdoQry_MainItemName: TStringField;
AdoQry_MainUomName: TStringField;
AdoQry_MaInvendorName: TStringField;
AdoQry_MainPCTaxRate_Percent: TIntegerField;
AdoQry_MainPCStatus: TIntegerField;
AdoQry_MaincurrencyName: TStringField;
AdoQry_Mainpcdate: TDateTimeField;
procedure FormDestroy(Sender: TObject);
private
{ Private declarations }
public
procedure InitForm(AdOConnection:TAdOConnection;ShowExtendColumn:Boolean);Override;
{ Public declarations }
end;
var
Frm_Pc_Qry_Pc: TFrm_Pc_Qry_Pc;
implementation
{$R *.DFM}
{ TFrm_Pc_Qry_Pc }
procedure TFrm_Pc_Qry_Pc.InitForm(AdOConnection: TAdOConnection;
ShowExtendColumn: Boolean);
var sqltext:string;
begin
inherited;
lbl_Condition.Caption:='下单日期从'+datetimetostr(date-30)+'到'+datetimetostr(date);
sqltext:=' Select PcLine.*,pc.pcdate,Pc.VendorCode,Item.ItemName,Uom.UomName,Vendor.VendorName, '+
' Pc.PCTaxRate_Percent,currency.currencyName,Pc.PCStatus '+
' into #tmppcline'+
' From PcLine '+
' Join Item On PcLine.ItemCode=Item.ItemCode '+
' Join Pc On PcLine.PcNo=Pc.PcNo '+
' Left Join Vendor On Pc.VendorCode=Vendor.VendorCode '+
' Left Outer Join Uom On Item.UomCode=Uom.UomCode '+
' left outer join currency on pc.currencyCode=currency.currencyCode '+
' where pc.pcdate between '''+datetimetostr(date-30)+''''+' and '''+datetimetostr(date)+''''+
' Order by Pc.VendorCode,PcLine.PcNo,PcLine.PcLineId,PcLine.ItemCode ';
selectfromsql:='select * from #tmppcline';
with AdoQry_Main do
begin
Close;
sql.clear;
sql.Add(sqltext);
Prepared;
try
execsql;
except
end;
Close;
sql.clear;
sql.Add('select * from #tmppcline');
Prepared;
try
open;
except
end;
end;
end;
procedure TFrm_Pc_Qry_Pc.FormDestroy(Sender: TObject);
begin
inherited;
Frm_Pc_Qry_Pc:=nil;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -