unit GatherProjInfo;

interface

uses
  sdDB;

type
  TGatherProjInfo = class
  private
    FProjectID: Integer;
    FProjectName: string;
    FFileName: string;

    FProjRec: TsdDataRecord;

    {FIsPD: Boolean;
    FIsCDD: Boolean;
    FIsAB: Boolean;
    FIsDeal: Boolean;}
  public
    constructor Create(ARec: TsdDataRecord); virtual;
    destructor Destroy; override;

    property ProjectID: Integer read FProjectID;
    property ProjectName: string read FProjectName;
    property FileName: string read FFileName;

    property ProjRec: TsdDataRecord read FProjRec;

    {// 初步设计(概算)项目
    property IsPD: Boolean read FIsPD write FIsPD;
    // 施工图设计(预算)项目
    property IsCDD: Boolean read FIsCDD write FIsCDD;
    // 批准概算项目
    property IsAB: Boolean read FIsAB write FIsAB;
    // 多合同项目（二三部分，土地征拆、监理等）
    property IsDeal: Boolean read FIsDeal write FIsDeal;}
  end;

  TSelectProjInfo = class(TGatherProjInfo)
  private
    FIsTender: Boolean;
  public
    constructor Create(ARec: TsdDataRecord); override;

    property IsTender: Boolean read FIsTender;
  end;

implementation

{ TGatherProjInfo }

constructor TGatherProjInfo.Create(ARec: TsdDataRecord);
begin
  FProjRec := ARec;
  FProjectID := FProjRec.ValueByName('ID').AsInteger;
  FProjectName := FProjRec.ValueByName('Name').AsString;
  FFileName := FProjRec.ValueByName('FileName').AsString;
end;

destructor TGatherProjInfo.Destroy;
begin
  inherited;
end;

{ TSelectProjInfo }

constructor TSelectProjInfo.Create(ARec: TsdDataRecord);
begin
  inherited;
  FIsTender := FProjRec.ValueByName('Type').AsInteger = 1;
end;

end.
