public void CreateSubProject() { var status = ProjectStatus.UnKnown; var proj = new ProjectInfo(); var listProj = new List <ProjectInfo>(); if (!(ChangeRedLineType.HasValue && ChangeRedLineType.Value)) { status = ProjectStatus.Finished; } listProj.Add(proj.GenerateSubProject(FlowCode.MajorLease_LegalReview, ProjectId, USCode, NodeCode.Start, AssetActorAccount)); listProj.Add(proj.GenerateSubProject(FlowCode.MajorLease_FinanceAnalysis, ProjectId, USCode, NodeCode.Start, FinanceAccount)); listProj.Add(proj.GenerateSubProject(FlowCode.MajorLease_ConsInfo, ProjectId, USCode, NodeCode.Start, PMAccount, status)); listProj.Add(proj.GenerateSubProject(FlowCode.MajorLease_Package, ProjectId, USCode, NodeCode.Start, AssetActorAccount)); listProj.Add(proj.GenerateSubProject(FlowCode.MajorLease_ContractInfo, ProjectId, USCode, NodeCode.Start, CreateUserAccount)); listProj.Add(proj.GenerateSubProject(FlowCode.MajorLease_SiteInfo, ProjectId, USCode, NodeCode.Start, PMAccount)); listProj.Add(proj.GenerateSubProject(FlowCode.MajorLease_ConsInvtChecking, ProjectId, USCode, NodeCode.Start, PMAccount, status)); listProj.Add(proj.GenerateSubProject(FlowCode.MajorLease_GBMemo, ProjectId, USCode, NodeCode.Start, PMAccount)); ProjectInfo.Add(listProj.ToArray()); var flowCodeList = new List <string>() { FlowCode.MajorLease_LegalReview, FlowCode.MajorLease_FinanceAnalysis, FlowCode.MajorLease_ConsInfo }; foreach (var flowCode in flowCodeList) { var wfEntity = GetEmptyWorkflowEntity(flowCode); wfEntity.GenerateDefaultWorkflowInfo(ProjectId); } var projectContractInfo = ProjectContractInfo.GetContractWithHistory(ProjectId).Current; projectContractInfo.Add(); }
public void CreateSubProject() { var proj = new ProjectInfo(); var listProj = new List <ProjectInfo>(); listProj.Add(proj.GenerateSubProject(FlowCode.Rebuild_LegalReview, ProjectId, USCode, NodeCode.Start, AssetActorAccount)); listProj.Add(proj.GenerateSubProject(FlowCode.Rebuild_FinanceAnalysis, ProjectId, USCode, NodeCode.Start, FinanceAccount)); listProj.Add(proj.GenerateSubProject(FlowCode.Rebuild_ConsInfo, ProjectId, USCode, NodeCode.Start, PMAccount)); listProj.Add(proj.GenerateSubProject(FlowCode.Rebuild_Package, ProjectId, USCode, NodeCode.Start, AssetActorAccount)); listProj.Add(proj.GenerateSubProject(FlowCode.Rebuild_ContractInfo, ProjectId, USCode, NodeCode.Start, CreateUserAccount)); listProj.Add(proj.GenerateSubProject(FlowCode.Rebuild_SiteInfo, ProjectId, USCode, NodeCode.Start, PMAccount)); listProj.Add(proj.GenerateSubProject(FlowCode.Rebuild_ConsInvtChecking, ProjectId, USCode, NodeCode.Start, PMAccount)); listProj.Add(proj.GenerateSubProject(FlowCode.Rebuild_TempClosureMemo, ProjectId, USCode, NodeCode.Start, CreateUserAccount)); listProj.Add(proj.GenerateSubProject(FlowCode.Rebuild_GBMemo, ProjectId, USCode, NodeCode.Start, PMAccount)); listProj.Add(proj.GenerateSubProject(FlowCode.Rebuild_ReopenMemo, ProjectId, USCode, NodeCode.Start, CreateUserAccount)); ProjectInfo.Add(listProj.ToArray()); var flowCodeList = new List <string>() { FlowCode.Rebuild_LegalReview, FlowCode.Rebuild_FinanceAnalysis, FlowCode.Rebuild_ConsInfo }; foreach (var flowCode in flowCodeList) { var wfEntity = GetEmptyWorkflowEntity(flowCode); wfEntity.GenerateDefaultWorkflowInfo(ProjectId); } var projectContractInfo = ProjectContractInfo.GetContractWithHistory(ProjectId).Current; projectContractInfo.Add(); }