12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- unit GatherProjInfo;
- interface
- uses
- sdDB;
- type
- TGatherProjInfo = class
- private
- FProjectID: Integer;
- FProjectName: string;
- FFileName: string;
- FProjRec: TsdDataRecord;
- FProjType: Integer;
- public
- constructor Create(ARec: TsdDataRecord; AProjType: Integer); virtual;
- destructor Destroy; override;
- property ProjectID: Integer read FProjectID;
- property ProjectName: string read FProjectName;
- property FileName: string read FFileName;
- property ProjRec: TsdDataRecord read FProjRec;
- // 值为0 普通汇总项目,值非0 项目类型根据报表
- property ProjType: Integer read FProjType;
- end;
- TSelectProjInfo = class(TGatherProjInfo)
- private
- FIsTender: Boolean;
- public
- constructor Create(ARec: TsdDataRecord; AProjType: Integer); override;
- property IsTender: Boolean read FIsTender;
- end;
- implementation
- { TGatherProjInfo }
- constructor TGatherProjInfo.Create(ARec: TsdDataRecord; AProjType: Integer);
- begin
- FProjRec := ARec;
- if Assigned(FProjRec) then
- begin
- FProjectID := FProjRec.ValueByName('ID').AsInteger;
- FProjectName := FProjRec.ValueByName('Name').AsString;
- FFileName := FProjRec.ValueByName('FileName').AsString;
- end
- else
- FProjectID := -1;
- FProjType := AProjType;
- end;
- destructor TGatherProjInfo.Destroy;
- begin
- inherited;
- end;
- { TSelectProjInfo }
- constructor TSelectProjInfo.Create(ARec: TsdDataRecord; AProjType: Integer);
- begin
- inherited;
- FIsTender := FProjRec.ValueByName('Type').AsInteger = 1;
- end;
- end.
|