|
|
@@ -87,6 +87,8 @@ type
|
|
|
procedure CloseAllData;
|
|
|
procedure OpenAllData;
|
|
|
|
|
|
+ procedure InnerSave;
|
|
|
+
|
|
|
function GetMainFileName: string;
|
|
|
procedure SetPhaseIndex(const Value: Integer);
|
|
|
function GetTempPath: string;
|
|
|
@@ -496,46 +498,9 @@ end;
|
|
|
procedure TProjectData.Save;
|
|
|
begin
|
|
|
try
|
|
|
- UpdateSysProgress(5, '正在保存数据');
|
|
|
- SaveLastestPhaseMainData;
|
|
|
- UpdateSysProgress(10, '正在保存数据');
|
|
|
- if (FPhaseData.Active) and (FPhaseIndex = ProjProperties.PhaseCount) then
|
|
|
- FPhaseData.Save;
|
|
|
- UpdateSysProgress(40, '正在保存数据');
|
|
|
- FMainListData.Save;
|
|
|
- FDealPaymentData.Save;
|
|
|
- UpdateSysProgress(50, '正在保存数据');
|
|
|
- FStaffData.Save;
|
|
|
- UpdateSysProgress(60, '正在保存数据');
|
|
|
- FBGLData.Save;
|
|
|
- UpdateSysProgress(70, '正在保存数据');
|
|
|
- FDealBillsData.Save;
|
|
|
- UpdateSysProgress(80, '正在保存数据');
|
|
|
-
|
|
|
- FProjectGLData.Save;
|
|
|
- FDetailGLData.Save;
|
|
|
- UpdateSysProgress(100, '正在保存数据');
|
|
|
-
|
|
|
- FBillsCompileData.ReLockBaseData;
|
|
|
- UpdateSysProgress(110, '正在保存数据');
|
|
|
- FBillsData.Save;
|
|
|
- UpdateSysProgress(165, '正在保存数据');
|
|
|
-
|
|
|
- FOtherMeasureOnceData.Save;
|
|
|
- FOtherMeasurePhaseData.Save;
|
|
|
- UpdateSysProgress(170, '正在保存数据');
|
|
|
-
|
|
|
- FProjProperties.AuditCompany := FStaffData.FinalStaffCompany;
|
|
|
- FProjProperties.Save;
|
|
|
- UpdateSysProgress(180, '正在保存数据');
|
|
|
- FConnection.Save;
|
|
|
- UpdateSysProgress(190, '正在保存数据');
|
|
|
-
|
|
|
+ InnerSave;
|
|
|
ZipFolder(FTempFolder, FileName);
|
|
|
SaveInfoToManager;
|
|
|
- UpdateSysProgress(200, '就绪');
|
|
|
-
|
|
|
- ProjectManager.AddSaveTenderBackup(FProjectID);
|
|
|
except
|
|
|
ErrorMessage('保存数据出错。请重试,或联系纵横客服:企业QQ:800003850 客服热线:(0756)3850888');
|
|
|
end;
|
|
|
@@ -2138,8 +2103,12 @@ begin
|
|
|
begin
|
|
|
ErrorMessage('保存数据出错。请重试,或联系纵横客服:企业QQ:800003850 客服热线:(0756)3850888');
|
|
|
Abort;
|
|
|
- end;
|
|
|
- end;
|
|
|
+ end
|
|
|
+ else
|
|
|
+ ProjectManager.AddSaveTenderBackup(FProjectID);
|
|
|
+ end
|
|
|
+ else
|
|
|
+ ProjectManager.AddSaveTenderBackup(FProjectID);
|
|
|
end;
|
|
|
|
|
|
function TProjectData.CheckLastPhaseFileExist: Boolean;
|
|
|
@@ -2150,4 +2119,46 @@ begin
|
|
|
Result := True;
|
|
|
end;
|
|
|
|
|
|
+procedure TProjectData.InnerSave;
|
|
|
+begin
|
|
|
+ try
|
|
|
+ UpdateSysProgress(5, '正在保存数据');
|
|
|
+ SaveLastestPhaseMainData;
|
|
|
+ UpdateSysProgress(10, '正在保存数据');
|
|
|
+ if (FPhaseData.Active) and (FPhaseIndex = ProjProperties.PhaseCount) then
|
|
|
+ FPhaseData.Save;
|
|
|
+ UpdateSysProgress(40, '正在保存数据');
|
|
|
+ FMainListData.Save;
|
|
|
+ FDealPaymentData.Save;
|
|
|
+ UpdateSysProgress(50, '正在保存数据');
|
|
|
+ FStaffData.Save;
|
|
|
+ UpdateSysProgress(60, '正在保存数据');
|
|
|
+ FBGLData.Save;
|
|
|
+ UpdateSysProgress(70, '正在保存数据');
|
|
|
+ FDealBillsData.Save;
|
|
|
+ UpdateSysProgress(80, '正在保存数据');
|
|
|
+
|
|
|
+ FProjectGLData.Save;
|
|
|
+ FDetailGLData.Save;
|
|
|
+ UpdateSysProgress(100, '正在保存数据');
|
|
|
+
|
|
|
+ FBillsCompileData.ReLockBaseData;
|
|
|
+ UpdateSysProgress(110, '正在保存数据');
|
|
|
+ FBillsData.Save;
|
|
|
+ UpdateSysProgress(165, '正在保存数据');
|
|
|
+
|
|
|
+ FOtherMeasureOnceData.Save;
|
|
|
+ FOtherMeasurePhaseData.Save;
|
|
|
+ UpdateSysProgress(170, '正在保存数据');
|
|
|
+
|
|
|
+ FProjProperties.AuditCompany := FStaffData.FinalStaffCompany;
|
|
|
+ FProjProperties.Save;
|
|
|
+ UpdateSysProgress(180, '正在保存数据');
|
|
|
+ FConnection.Save;
|
|
|
+ UpdateSysProgress(200, '就绪');
|
|
|
+ except
|
|
|
+ ErrorMessage('保存数据出错。请重试,或联系纵横客服:企业QQ:800003850 客服热线:(0756)3850888');
|
|
|
+ end;
|
|
|
+end;
|
|
|
+
|
|
|
end.
|