public ProjectWholeInfoViewModelHis() { projectBasicinfoHistory = new ProjectInfoHistory(); projectBasicFileHistory = new ProjectFileHistory(); projectTestBasicinfoListHistory = new List <TestBasicInfoHistory>(); projectTestChemicalReportListHistory = new List <TestChemicalReportListHistory>(); }
protected void MoveProjectData(string projectNumber) { var infomodel = new ProjectInfo(); infomodel = this.IDKLManagerService.GetProjectInfo(projectNumber); if (infomodel != null) { ProjectInfoHistory history = ProjectInfoHistory.Clone(infomodel); history.ProjectRealClosingDate = DateTime.Now; this.IDKLManagerService.AddProjectInfoHistory(history); } this.IDKLManagerService.DeleteProjectInfo(projectNumber); var valueInfo = new ValueBasicInfo(); valueInfo = this.IDKLManagerService.GetVlaueProjectBasicInfo(projectNumber); if (valueInfo != null) { ValueBasicInfoHistory history = ValueBasicInfoHistory.Clone(valueInfo); this.IDKLManagerService.AddVlaueProjectBasicInfoHistory(history); } this.IDKLManagerService.DeleteVlaueProjectBasicInfo(projectNumber); var testChemical = new SampleRegisterTable(); testChemical = this.IDKLManagerService.GetSampleRegisterTables(projectNumber); if (testChemical != null) { TestChemicalReportListHistory chemicalHistory = TestChemicalReportListHistory.Clone(testChemical); this.IDKLManagerService.AddTestChemicalReportListHistory(chemicalHistory); } this.IDKLManagerService.DeleteTestChemicalReport(projectNumber); var testInfo = new TestBasicInfo(); testInfo = this.IDKLManagerService.GetProjectTestBasicInfo(projectNumber); if (testInfo != null) { TestBasicInfoHistory history = TestBasicInfoHistory.Clone(testInfo); this.IDKLManagerService.AddProjectTestBasicInfoHistory(history); } this.IDKLManagerService.DeleteProjectTestBasicInfo(projectNumber); var consultInfo = new ConsultBasicInfo(); consultInfo = this.IDKLManagerService.GetConsultBasicInfo(projectNumber); if (consultInfo != null) { ConsultBasicInfoHistory history = ConsultBasicInfoHistory.Clone(consultInfo); this.IDKLManagerService.AddConsultBasicInfoHistory(history); } this.IDKLManagerService.DeleteConsultBasicInfo(projectNumber); var fileInfo = new ProjectFile(); fileInfo = this.IDKLManagerService.GetProjectFile(projectNumber); if (fileInfo != null) { ProjectFileHistory history = ProjectFileHistory.Clone(fileInfo); this.IDKLManagerService.AddProjectFileHistory(history); } this.IDKLManagerService.DeleteProjectFile(projectNumber); var docList = this.IDKLManagerService.GetProjectDocFileList(projectNumber); ProjectDocFileHistory docHistory = new ProjectDocFileHistory(); foreach (var doc in docList) { docHistory = ProjectDocFileHistory.Clone(doc); this.IDKLManagerService.AddProjectDocFileHistory(docHistory); } this.IDKLManagerService.DeleteProjectDocFile(projectNumber); }