123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- unit rpgZoneGatherControl;
- interface
- uses
- rpgGatherControl, ReportManager, ADODB, ProjectData, rpgGatherData;
- type
- TrpgZoneGatherControl = class(TrpgGatherControl)
- private
- FHistoryBeginPhase: Integer;
- FHistoryEndPhase: Integer;
- FBeginPhase: Integer;
- FEndPhase: Integer;
- protected
- function SelectProject: Boolean; override;
- function SameSelect: Boolean; override;
- procedure RefreshGather; override;
- public
- constructor Create(AProjectData: TProjectData); override;
- end;
- implementation
- uses
- rpgZoneProjGatherSelectFrm, ProjGather, Forms, Controls, Globals, ZhAPI;
- { TrpgZoneGatherControl }
- constructor TrpgZoneGatherControl.Create(AProjectData: TProjectData);
- begin
- inherited;
- FBeginPhase := 0;
- FEndPhase := 0;
- end;
- procedure TrpgZoneGatherControl.RefreshGather;
- var
- Gather: TZoneProjGather;
- begin
- Screen.Cursor := crHourGlass;
- Gather := TZoneProjGather.Create(GatherData.WriteGatherData,
- ReportConfig.XmjCompare, ReportConfig.GclCompare);
- try
- Gather.Gather(FSelectProjs, FBeginPhase, FEndPhase);
- GatherData.LoadRelaData(ProjectData.ProjectID);
- ClearObjects(FHistroyProjs);
- FHistroyProjs.Assign(FSelectProjs);
- FHistoryBeginPhase := FBeginPhase;
- FHistoryEndPhase := FEndPhase;
- finally
- Gather.Free;
- Screen.Cursor := crDefault;
- end;
- end;
- function TrpgZoneGatherControl.SameSelect: Boolean;
- begin
- Result := inherited SameSelect;
- Result := Result and (FHistoryBeginPhase = FBeginPhase) and (FHistoryEndPhase = FEndPhase);
- end;
- function TrpgZoneGatherControl.SelectProject: Boolean;
- begin
- Result := SelectGatherProject(ProjectData.ProjectID, FSelectProjs, FBeginPhase, FEndPhase);
- end;
- end.
|