ad_qry_totaldpnasttypesubject.pas

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

PAS
59
字号
unit Ad_Qry_TotalDpnAstTypeSubject;

Interface

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

Type
  TFrm_Ad_Qry_TotalDpnAstTypeSubject = Class(TFrm_Base_Qry)
    AdoQry_MainAssetTypeCode: TStringField;
    AdoQry_MainAssetTypeName: TStringField;
    AdoQry_MainAssetTypeFlag: TStringField;
    AdoQry_MainKMCode: TStringField;
    AdoQry_MainKmName: TStringField;
    AdoQry_MainKmFlag: TStringField;
    AdoQry_MainSumDepreciation: TFloatField;
    AdoQry_MainDepreciationMonth: TStringField;
  private
    { Private declarations }
  public
    { Public declarations }
    procedure InitForm(AdOConnection:TAdOConnection;ShowExtendColumn:Boolean);Override;
  end;

var
  Frm_Ad_Qry_TotalDpnAstTypeSubject: TFrm_Ad_Qry_TotalDpnAstTypeSubject;

implementation

uses Sys_Global;

{$R *.DFM}

{ TFrm_Ad_Qry_TotalDpnAstTypeSubject }

procedure TFrm_Ad_Qry_TotalDpnAstTypeSubject.InitForm(
  AdOConnection: TAdOConnection; ShowExtendColumn: Boolean);
begin
  inherited;
  SelectFromSQL:='select Ad_AssetType.AssetTypeCode,Ad_AssetType.AssetTypeName, '+
                        'Ad_AssetType.AssetTypeCode+'' ''+Ad_AssetType.AssetTypeName AssetTypeFlag, '+
                        'Ad_Depreciation_Subject.KMCode,Gl_AccountSubject.KmName, '+
                        'Ad_Depreciation_Subject.KMCode+'' ''+Gl_AccountSubject.KmName KmFlag,'+
                        'Ad_Depreciation_Subject.DepreciationMonth, '+
                        'Sum(Ad_Depreciation_Subject.Depreciation) SumDepreciation  '+
                 'from Ad_Depreciation_Subject,Ad_AssetCard,Ad_AssetType,Gl_AccountSubject ';
  OrderByFields:='AssetTypeCode';
  ConditionUserDefine:=' Ad_Depreciation_Subject.KmCode=Gl_AccountSubject.KmCode '+
                 'And Ad_Depreciation_Subject.AssetCode=Ad_AssetCard.AssetCode '+
                 'And Ad_AssetCard.AssetTypeCode=Ad_AssetType.AssetTypeCode '+
                 'Group By Ad_Depreciation_Subject.KMCode,Gl_AccountSubject.KmName,Ad_AssetType.AssetTypeCode,'+
                          'Ad_AssetType.AssetTypeName,Ad_Depreciation_Subject.DepreciationMonth ';
  Act_Filter.Execute;
end;

end.

⌨️ 快捷键说明

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