0813
This commit is contained in:
@@ -19,21 +19,7 @@ namespace FineUIPro.Web.JDGL.WBS
|
||||
LoadData();
|
||||
string id = Request.Params["Id"];
|
||||
string type = Request.Params["Type"];
|
||||
if (type == "childUnitProject")
|
||||
{
|
||||
Model.Wbs_UnitProject unitProject = BLL.UnitProjectService.GetUnitProjectByUnitProjectId(id);
|
||||
if (unitProject != null)
|
||||
{
|
||||
txtCode.Text = unitProject.UnitProjectCode;
|
||||
if (unitProject.StartDate != null)
|
||||
{
|
||||
txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", unitProject.StartDate);
|
||||
txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", unitProject.EndDate);
|
||||
}
|
||||
txtRemark.Text = unitProject.Remark;
|
||||
}
|
||||
}
|
||||
else if (type == "wbsSet")
|
||||
if (type == "wbsSet")
|
||||
{
|
||||
Model.Wbs_WbsSet wbsSet = BLL.WbsSetService.GetWbsSetByWbsSetId(id);
|
||||
if (wbsSet != null)
|
||||
@@ -90,226 +76,188 @@ namespace FineUIPro.Web.JDGL.WBS
|
||||
string updateId = string.Empty;
|
||||
string id = Request.Params["Id"];
|
||||
string type = Request.Params["Type"];
|
||||
if (type == "childUnitProject")
|
||||
{
|
||||
Model.Wbs_UnitProject childUnitProject = BLL.UnitProjectService.GetUnitProjectByUnitProjectId(id);
|
||||
childUnitProject.IsSelected = true;
|
||||
childUnitProject.IsApprove = true;
|
||||
BLL.UnitProjectService.UpdateUnitProject(childUnitProject);
|
||||
var noShowWbsSet1s = from x in Funs.DB.Wbs_WbsSet where x.Flag == 1 && x.UnitProjectId == childUnitProject.UnitProjectId && x.NoShow == true orderby x.WbsSetCode select x;
|
||||
if (noShowWbsSet1s.Count() == 0) //首次拷贝
|
||||
{
|
||||
noShowWbsSet1s = from x in Funs.DB.Wbs_WbsSet where x.Flag == 1 && x.UnitProjectId == childUnitProject.UnitProjectId orderby x.WbsSetCode select x;
|
||||
foreach (var noShowWbsSet1 in noShowWbsSet1s)
|
||||
{
|
||||
noShowWbsSet1.NoShow = true;
|
||||
BLL.WbsSetService.UpdateWbsSet(noShowWbsSet1);
|
||||
}
|
||||
Model.Wbs_WbsSet newWbsSet1 = new Model.Wbs_WbsSet();
|
||||
newWbsSet1.WbsSetId = SQLHelper.GetNewID(typeof(Model.Wbs_WbsSet));
|
||||
updateId = newWbsSet1.WbsSetId;
|
||||
newWbsSet1.WbsSetCode = this.txtCode.Text.Trim();
|
||||
newWbsSet1.WbsSetName = this.txtName.Text.Trim();
|
||||
newWbsSet1.CnProfessionId = childUnitProject.CnProfessionId;
|
||||
newWbsSet1.UnitProjectId = childUnitProject.UnitProjectId;
|
||||
newWbsSet1.InstallationId = childUnitProject.InstallationId;
|
||||
newWbsSet1.SuperWbsSetId = null;
|
||||
newWbsSet1.ProjectId = childUnitProject.ProjectId;
|
||||
newWbsSet1.StartDate = Convert.ToDateTime(txtStartDate.Text.Trim());
|
||||
newWbsSet1.EndDate = Convert.ToDateTime(txtEndDate.Text.Trim());
|
||||
if (!string.IsNullOrEmpty(txtSortIndex.Text.Trim()))
|
||||
{
|
||||
newWbsSet1.SortIndex = Convert.ToInt32(this.txtSortIndex.Text.Trim());
|
||||
}
|
||||
newWbsSet1.Flag = 1;
|
||||
newWbsSet1.Remark = this.txtRemark.Text.Trim();
|
||||
newWbsSet1.IsIn = false;
|
||||
newWbsSet1.IsSelected = true;
|
||||
newWbsSet1.IsApprove = true;
|
||||
BLL.WbsSetService.AddWbsSet(newWbsSet1);
|
||||
noShowWbsSet1s = from x in Funs.DB.Wbs_WbsSet where x.Flag == 1 && x.UnitProjectId == childUnitProject.UnitProjectId && x.NoShow == true orderby x.WbsSetCode select x;
|
||||
foreach (var noShowWbsSet1 in noShowWbsSet1s)
|
||||
{
|
||||
Model.Wbs_WbsSet newWbsSet2 = new Model.Wbs_WbsSet();
|
||||
newWbsSet2.WbsSetId = SQLHelper.GetNewID(typeof(Model.Wbs_WbsSet));
|
||||
newWbsSet2.WbsSetCode = GetReplaceCode(noShowWbsSet1.WbsSetCode, childUnitProject.UnitProjectCode);
|
||||
newWbsSet2.WbsSetName = noShowWbsSet1.WbsSetName;
|
||||
newWbsSet2.CnProfessionId = noShowWbsSet1.CnProfessionId;
|
||||
newWbsSet2.UnitProjectId = childUnitProject.UnitProjectId;
|
||||
newWbsSet2.InstallationId = noShowWbsSet1.InstallationId;
|
||||
newWbsSet2.SuperWbsSetId = newWbsSet1.WbsSetId;
|
||||
newWbsSet2.Weights = noShowWbsSet1.Weights;
|
||||
newWbsSet2.ProjectId = noShowWbsSet1.ProjectId;
|
||||
newWbsSet2.StartDate = noShowWbsSet1.StartDate;
|
||||
newWbsSet2.EndDate = noShowWbsSet1.EndDate;
|
||||
newWbsSet1.SortIndex = noShowWbsSet1.SortIndex;
|
||||
newWbsSet2.Flag = 2;
|
||||
newWbsSet2.Remark = noShowWbsSet1.Remark;
|
||||
newWbsSet2.IsIn = false;
|
||||
newWbsSet2.IsSelected = true;
|
||||
newWbsSet2.IsApprove = true;
|
||||
BLL.WbsSetService.AddWbsSet(newWbsSet2);
|
||||
}
|
||||
}
|
||||
else //后续拷贝
|
||||
{
|
||||
Model.Wbs_WbsSet newWbsSet1 = new Model.Wbs_WbsSet();
|
||||
newWbsSet1.WbsSetId = SQLHelper.GetNewID(typeof(Model.Wbs_WbsSet));
|
||||
updateId = newWbsSet1.WbsSetId;
|
||||
newWbsSet1.WbsSetCode = this.txtCode.Text.Trim();
|
||||
newWbsSet1.WbsSetName = this.txtName.Text.Trim();
|
||||
newWbsSet1.CnProfessionId = childUnitProject.CnProfessionId;
|
||||
newWbsSet1.UnitProjectId = childUnitProject.UnitProjectId;
|
||||
newWbsSet1.InstallationId = childUnitProject.InstallationId;
|
||||
newWbsSet1.SuperWbsSetId = null;
|
||||
newWbsSet1.ProjectId = childUnitProject.ProjectId;
|
||||
newWbsSet1.StartDate = Convert.ToDateTime(txtStartDate.Text.Trim());
|
||||
newWbsSet1.EndDate = Convert.ToDateTime(txtEndDate.Text.Trim());
|
||||
if (!string.IsNullOrEmpty(txtSortIndex.Text.Trim()))
|
||||
{
|
||||
newWbsSet1.SortIndex = Convert.ToInt32(this.txtSortIndex.Text.Trim());
|
||||
}
|
||||
newWbsSet1.Flag = 1;
|
||||
newWbsSet1.Remark = this.txtRemark.Text.Trim();
|
||||
newWbsSet1.IsIn = false;
|
||||
newWbsSet1.IsSelected = true;
|
||||
newWbsSet1.IsApprove = true;
|
||||
BLL.WbsSetService.AddWbsSet(newWbsSet1);
|
||||
foreach (var noShowWbsSet1 in noShowWbsSet1s)
|
||||
{
|
||||
Model.Wbs_WbsSet newWbsSet2 = new Model.Wbs_WbsSet();
|
||||
newWbsSet2.WbsSetId = SQLHelper.GetNewID(typeof(Model.Wbs_WbsSet));
|
||||
newWbsSet2.WbsSetCode = GetReplaceCode(noShowWbsSet1.WbsSetCode, childUnitProject.UnitProjectCode);
|
||||
newWbsSet2.WbsSetName = noShowWbsSet1.WbsSetName;
|
||||
newWbsSet2.CnProfessionId = noShowWbsSet1.CnProfessionId;
|
||||
newWbsSet2.UnitProjectId = childUnitProject.UnitProjectId;
|
||||
newWbsSet2.InstallationId = noShowWbsSet1.InstallationId;
|
||||
newWbsSet2.SuperWbsSetId = newWbsSet1.WbsSetId;
|
||||
newWbsSet2.ProjectId = noShowWbsSet1.ProjectId;
|
||||
newWbsSet2.Weights = noShowWbsSet1.Weights;
|
||||
newWbsSet2.StartDate = noShowWbsSet1.StartDate;
|
||||
newWbsSet2.EndDate = noShowWbsSet1.EndDate;
|
||||
newWbsSet2.SortIndex = noShowWbsSet1.SortIndex;
|
||||
newWbsSet2.Flag = 2;
|
||||
newWbsSet2.Remark = noShowWbsSet1.Remark;
|
||||
newWbsSet2.IsIn = false;
|
||||
newWbsSet2.IsSelected = true;
|
||||
newWbsSet2.IsApprove = true;
|
||||
BLL.WbsSetService.AddWbsSet(newWbsSet2);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (type == "wbsSet")
|
||||
if (type == "wbsSet")
|
||||
{
|
||||
Model.Wbs_WbsSet wbsSet = BLL.WbsSetService.GetWbsSetByWbsSetId(id);
|
||||
wbsSet.IsSelected = true;
|
||||
wbsSet.IsApprove = true;
|
||||
BLL.WbsSetService.UpdateWbsSet(wbsSet);
|
||||
var noShowWbsSets = from x in Funs.DB.Wbs_WbsSet where x.SuperWbsSetId == id && x.NoShow == true orderby x.WbsSetCode select x;
|
||||
if (noShowWbsSets.Count() == 0) //首次拷贝
|
||||
//wbsSet.IsSelected = true;
|
||||
//wbsSet.IsApprove = true;
|
||||
//BLL.WbsSetService.UpdateWbsSet(wbsSet);
|
||||
var wbsSets = from x in Funs.DB.Wbs_WbsSet where x.SuperWbsSetId == id orderby x.WbsSetCode select x;
|
||||
Model.Wbs_WbsSet newWbsSet1 = new Model.Wbs_WbsSet();
|
||||
newWbsSet1.WbsSetId = SQLHelper.GetNewID(typeof(Model.Wbs_WbsSet));
|
||||
updateId = newWbsSet1.WbsSetId;
|
||||
newWbsSet1.WbsSetCode = this.txtCode.Text.Trim();
|
||||
newWbsSet1.WbsSetName = this.txtName.Text.Trim();
|
||||
newWbsSet1.CnProfessionId = wbsSet.CnProfessionId;
|
||||
newWbsSet1.UnitProjectId = wbsSet.UnitProjectId;
|
||||
newWbsSet1.InstallationId = wbsSet.InstallationId;
|
||||
newWbsSet1.SuperWbsSetId = wbsSet.SuperWbsSetId;
|
||||
newWbsSet1.ProjectId = wbsSet.ProjectId;
|
||||
newWbsSet1.StartDate = Convert.ToDateTime(txtStartDate.Text.Trim());
|
||||
newWbsSet1.EndDate = Convert.ToDateTime(txtEndDate.Text.Trim());
|
||||
if (!string.IsNullOrEmpty(txtSortIndex.Text.Trim()))
|
||||
{
|
||||
noShowWbsSets = from x in Funs.DB.Wbs_WbsSet where x.SuperWbsSetId == id orderby x.WbsSetCode select x;
|
||||
foreach (var noShowWbsSet in noShowWbsSets)
|
||||
newWbsSet1.SortIndex = Convert.ToInt32(this.txtSortIndex.Text.Trim());
|
||||
}
|
||||
newWbsSet1.Remark = this.txtRemark.Text.Trim();
|
||||
newWbsSet1.IsIn = false;
|
||||
//newWbsSet1.IsSelected = true;
|
||||
//newWbsSet1.IsApprove = true;
|
||||
BLL.WbsSetService.AddWbsSet(newWbsSet1);
|
||||
var totalWbsSetMatchCostControlInits = from x in Funs.DB.WBS_WbsSetMatchCostControlInit orderby x.WbsSetCode select x;
|
||||
var totalCostControlInits = from x in Funs.DB.WBS_CostControlInit orderby x.CostControlInitCode select x;
|
||||
foreach (var noShowWbsSet1 in wbsSets)
|
||||
{
|
||||
Model.Wbs_WbsSet newWbsSet2 = new Model.Wbs_WbsSet();
|
||||
newWbsSet2.WbsSetId = SQLHelper.GetNewID(typeof(Model.Wbs_WbsSet));
|
||||
newWbsSet2.WbsSetCode = GetReplaceCode(noShowWbsSet1.WbsSetCode, wbsSet.WbsSetCode);
|
||||
newWbsSet2.WbsSetName = noShowWbsSet1.WbsSetName;
|
||||
newWbsSet2.CnProfessionId = noShowWbsSet1.CnProfessionId;
|
||||
newWbsSet2.UnitProjectId = noShowWbsSet1.UnitProjectId;
|
||||
newWbsSet2.InstallationId = noShowWbsSet1.InstallationId;
|
||||
newWbsSet2.SuperWbsSetId = newWbsSet1.WbsSetId;
|
||||
newWbsSet2.ProjectId = noShowWbsSet1.ProjectId;
|
||||
newWbsSet2.Weights = noShowWbsSet1.Weights;
|
||||
newWbsSet2.StartDate = noShowWbsSet1.StartDate;
|
||||
newWbsSet2.EndDate = noShowWbsSet1.EndDate;
|
||||
newWbsSet2.SortIndex = noShowWbsSet1.SortIndex;
|
||||
newWbsSet2.Remark = noShowWbsSet1.Remark;
|
||||
newWbsSet2.IsIn = false;
|
||||
//newWbsSet2.IsSelected = true;
|
||||
//newWbsSet2.IsApprove = true;
|
||||
BLL.WbsSetService.AddWbsSet(newWbsSet2);
|
||||
//拷贝费用清单对应关系
|
||||
var wbsSetMatchCostControlInits = from x in totalWbsSetMatchCostControlInits where x.WbsSetCode == noShowWbsSet1.WbsSetCode orderby x.WbsSetCode select x;
|
||||
foreach (var wbsSetMatchCostControlInit in wbsSetMatchCostControlInits)
|
||||
{
|
||||
noShowWbsSet.NoShow = true;
|
||||
BLL.WbsSetService.UpdateWbsSet(noShowWbsSet);
|
||||
}
|
||||
Model.Wbs_WbsSet newWbsSet1 = new Model.Wbs_WbsSet();
|
||||
newWbsSet1.WbsSetId = SQLHelper.GetNewID(typeof(Model.Wbs_WbsSet));
|
||||
updateId = newWbsSet1.WbsSetId;
|
||||
newWbsSet1.WbsSetCode = this.txtCode.Text.Trim();
|
||||
newWbsSet1.WbsSetName = this.txtName.Text.Trim();
|
||||
newWbsSet1.CnProfessionId = wbsSet.CnProfessionId;
|
||||
newWbsSet1.UnitProjectId = wbsSet.UnitProjectId;
|
||||
newWbsSet1.InstallationId = wbsSet.InstallationId;
|
||||
newWbsSet1.SuperWbsSetId = id;
|
||||
newWbsSet1.ProjectId = wbsSet.ProjectId;
|
||||
newWbsSet1.StartDate = Convert.ToDateTime(txtStartDate.Text.Trim());
|
||||
newWbsSet1.EndDate = Convert.ToDateTime(txtEndDate.Text.Trim());
|
||||
if (!string.IsNullOrEmpty(txtSortIndex.Text.Trim()))
|
||||
{
|
||||
newWbsSet1.SortIndex = Convert.ToInt32(this.txtSortIndex.Text.Trim());
|
||||
}
|
||||
newWbsSet1.Flag = wbsSet.Flag + 1;
|
||||
newWbsSet1.Remark = this.txtRemark.Text.Trim();
|
||||
newWbsSet1.IsIn = false;
|
||||
newWbsSet1.IsSelected = true;
|
||||
newWbsSet1.IsApprove = true;
|
||||
BLL.WbsSetService.AddWbsSet(newWbsSet1);
|
||||
noShowWbsSets = from x in Funs.DB.Wbs_WbsSet where x.SuperWbsSetId == id && x.NoShow == true orderby x.WbsSetCode select x;
|
||||
foreach (var noShowWbsSet1 in noShowWbsSets)
|
||||
{
|
||||
Model.Wbs_WbsSet newWbsSet2 = new Model.Wbs_WbsSet();
|
||||
newWbsSet2.WbsSetId = SQLHelper.GetNewID(typeof(Model.Wbs_WbsSet));
|
||||
newWbsSet2.WbsSetCode = GetReplaceCode(noShowWbsSet1.WbsSetCode, wbsSet.WbsSetCode);
|
||||
newWbsSet2.WbsSetName = noShowWbsSet1.WbsSetName;
|
||||
newWbsSet2.CnProfessionId = noShowWbsSet1.CnProfessionId;
|
||||
newWbsSet2.UnitProjectId = noShowWbsSet1.UnitProjectId;
|
||||
newWbsSet2.InstallationId = noShowWbsSet1.InstallationId;
|
||||
newWbsSet2.SuperWbsSetId = newWbsSet1.WbsSetId;
|
||||
newWbsSet2.ProjectId = noShowWbsSet1.ProjectId;
|
||||
newWbsSet2.Weights = noShowWbsSet1.Weights;
|
||||
newWbsSet2.StartDate = noShowWbsSet1.StartDate;
|
||||
newWbsSet2.EndDate = noShowWbsSet1.EndDate;
|
||||
newWbsSet2.SortIndex = noShowWbsSet1.SortIndex;
|
||||
newWbsSet2.Flag = newWbsSet1.Flag + 1;
|
||||
newWbsSet2.Remark = noShowWbsSet1.Remark;
|
||||
newWbsSet2.IsIn = false;
|
||||
newWbsSet2.IsSelected = true;
|
||||
newWbsSet2.IsApprove = true;
|
||||
BLL.WbsSetService.AddWbsSet(newWbsSet2);
|
||||
}
|
||||
}
|
||||
else //后续拷贝
|
||||
{
|
||||
Model.Wbs_WbsSet newWbsSet1 = new Model.Wbs_WbsSet();
|
||||
newWbsSet1.WbsSetId = SQLHelper.GetNewID(typeof(Model.Wbs_WbsSet));
|
||||
updateId = newWbsSet1.WbsSetId;
|
||||
newWbsSet1.WbsSetCode = this.txtCode.Text.Trim();
|
||||
newWbsSet1.WbsSetName = this.txtName.Text.Trim();
|
||||
newWbsSet1.CnProfessionId = wbsSet.CnProfessionId;
|
||||
newWbsSet1.UnitProjectId = wbsSet.UnitProjectId;
|
||||
newWbsSet1.InstallationId = wbsSet.InstallationId;
|
||||
newWbsSet1.SuperWbsSetId = id;
|
||||
newWbsSet1.ProjectId = wbsSet.ProjectId;
|
||||
newWbsSet1.StartDate = Convert.ToDateTime(txtStartDate.Text.Trim());
|
||||
newWbsSet1.EndDate = Convert.ToDateTime(txtEndDate.Text.Trim());
|
||||
if (!string.IsNullOrEmpty(txtSortIndex.Text.Trim()))
|
||||
{
|
||||
newWbsSet1.SortIndex = Convert.ToInt32(this.txtSortIndex.Text.Trim());
|
||||
}
|
||||
newWbsSet1.Flag = wbsSet.Flag + 1;
|
||||
newWbsSet1.Remark = this.txtRemark.Text.Trim();
|
||||
newWbsSet1.IsIn = false;
|
||||
newWbsSet1.IsSelected = true;
|
||||
newWbsSet1.IsApprove = true;
|
||||
BLL.WbsSetService.AddWbsSet(newWbsSet1);
|
||||
foreach (var noShowWbsSet1 in noShowWbsSets)
|
||||
{
|
||||
Model.Wbs_WbsSet newWbsSet2 = new Model.Wbs_WbsSet();
|
||||
newWbsSet2.WbsSetId = SQLHelper.GetNewID(typeof(Model.Wbs_WbsSet));
|
||||
newWbsSet2.WbsSetCode = GetReplaceCode(noShowWbsSet1.WbsSetCode, wbsSet.WbsSetCode);
|
||||
newWbsSet2.WbsSetName = noShowWbsSet1.WbsSetName;
|
||||
newWbsSet2.CnProfessionId = noShowWbsSet1.CnProfessionId;
|
||||
newWbsSet2.UnitProjectId = noShowWbsSet1.UnitProjectId;
|
||||
newWbsSet2.InstallationId = noShowWbsSet1.InstallationId;
|
||||
newWbsSet2.SuperWbsSetId = newWbsSet1.WbsSetId;
|
||||
newWbsSet2.ProjectId = noShowWbsSet1.ProjectId;
|
||||
newWbsSet2.Weights = noShowWbsSet1.Weights;
|
||||
newWbsSet2.StartDate = noShowWbsSet1.StartDate;
|
||||
newWbsSet2.EndDate = noShowWbsSet1.EndDate;
|
||||
newWbsSet2.SortIndex = noShowWbsSet1.SortIndex;
|
||||
newWbsSet2.Flag = newWbsSet1.Flag + 1;
|
||||
newWbsSet2.Remark = noShowWbsSet1.Remark;
|
||||
newWbsSet2.IsIn = false;
|
||||
newWbsSet2.IsSelected = true;
|
||||
newWbsSet2.IsApprove = true;
|
||||
BLL.WbsSetService.AddWbsSet(newWbsSet2);
|
||||
Model.WBS_WbsSetMatchCostControl wbsSetMatchCostControl = new Model.WBS_WbsSetMatchCostControl();
|
||||
wbsSetMatchCostControl.WbsSetMatchCostControlId = SQLHelper.GetNewID();
|
||||
wbsSetMatchCostControl.WbsSetId = newWbsSet2.WbsSetId;
|
||||
wbsSetMatchCostControl.CostControlCode = wbsSetMatchCostControlInit.CostControlInitCode;
|
||||
BLL.WbsSetMatchCostControlService.AddWbsSetMatchCostControl(wbsSetMatchCostControl);
|
||||
//拷贝费用清单项
|
||||
var costControlInits = from x in totalCostControlInits where x.CostControlInitCode == wbsSetMatchCostControl.CostControlCode select x;
|
||||
foreach (var costControlInit in costControlInits)
|
||||
{
|
||||
Model.WBS_CostControl costControl = new Model.WBS_CostControl();
|
||||
costControl.ProjectId = noShowWbsSet1.ProjectId;
|
||||
costControl.WbsSetId = newWbsSet2.WbsSetId;
|
||||
costControl.CostControlCode = costControlInit.CostControlInitCode;
|
||||
costControl.CostControlName = costControlInit.CostControlInitName;
|
||||
costControl.Unit = costControlInit.Unit;
|
||||
BLL.CostControlService.AddCostControl(costControl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//if (noShowWbsSets.Count() == 0) //首次拷贝
|
||||
//{
|
||||
// noShowWbsSets = from x in Funs.DB.Wbs_WbsSet where x.SuperWbsSetId == id orderby x.WbsSetCode select x;
|
||||
// foreach (var noShowWbsSet in noShowWbsSets)
|
||||
// {
|
||||
// noShowWbsSet.NoShow = true;
|
||||
// BLL.WbsSetService.UpdateWbsSet(noShowWbsSet);
|
||||
// }
|
||||
// Model.Wbs_WbsSet newWbsSet1 = new Model.Wbs_WbsSet();
|
||||
// newWbsSet1.WbsSetId = SQLHelper.GetNewID(typeof(Model.Wbs_WbsSet));
|
||||
// updateId = newWbsSet1.WbsSetId;
|
||||
// newWbsSet1.WbsSetCode = this.txtCode.Text.Trim();
|
||||
// newWbsSet1.WbsSetName = this.txtName.Text.Trim();
|
||||
// newWbsSet1.CnProfessionId = wbsSet.CnProfessionId;
|
||||
// newWbsSet1.UnitProjectId = wbsSet.UnitProjectId;
|
||||
// newWbsSet1.InstallationId = wbsSet.InstallationId;
|
||||
// newWbsSet1.SuperWbsSetId = id;
|
||||
// newWbsSet1.ProjectId = wbsSet.ProjectId;
|
||||
// newWbsSet1.StartDate = Convert.ToDateTime(txtStartDate.Text.Trim());
|
||||
// newWbsSet1.EndDate = Convert.ToDateTime(txtEndDate.Text.Trim());
|
||||
// if (!string.IsNullOrEmpty(txtSortIndex.Text.Trim()))
|
||||
// {
|
||||
// newWbsSet1.SortIndex = Convert.ToInt32(this.txtSortIndex.Text.Trim());
|
||||
// }
|
||||
// newWbsSet1.Flag = wbsSet.Flag + 1;
|
||||
// newWbsSet1.Remark = this.txtRemark.Text.Trim();
|
||||
// newWbsSet1.IsIn = false;
|
||||
// newWbsSet1.IsSelected = true;
|
||||
// newWbsSet1.IsApprove = true;
|
||||
// BLL.WbsSetService.AddWbsSet(newWbsSet1);
|
||||
// noShowWbsSets = from x in Funs.DB.Wbs_WbsSet where x.SuperWbsSetId == id && x.NoShow == true orderby x.WbsSetCode select x;
|
||||
// foreach (var noShowWbsSet1 in noShowWbsSets)
|
||||
// {
|
||||
// Model.Wbs_WbsSet newWbsSet2 = new Model.Wbs_WbsSet();
|
||||
// newWbsSet2.WbsSetId = SQLHelper.GetNewID(typeof(Model.Wbs_WbsSet));
|
||||
// newWbsSet2.WbsSetCode = GetReplaceCode(noShowWbsSet1.WbsSetCode, wbsSet.WbsSetCode);
|
||||
// newWbsSet2.WbsSetName = noShowWbsSet1.WbsSetName;
|
||||
// newWbsSet2.CnProfessionId = noShowWbsSet1.CnProfessionId;
|
||||
// newWbsSet2.UnitProjectId = noShowWbsSet1.UnitProjectId;
|
||||
// newWbsSet2.InstallationId = noShowWbsSet1.InstallationId;
|
||||
// newWbsSet2.SuperWbsSetId = newWbsSet1.WbsSetId;
|
||||
// newWbsSet2.ProjectId = noShowWbsSet1.ProjectId;
|
||||
// newWbsSet2.Weights = noShowWbsSet1.Weights;
|
||||
// newWbsSet2.StartDate = noShowWbsSet1.StartDate;
|
||||
// newWbsSet2.EndDate = noShowWbsSet1.EndDate;
|
||||
// newWbsSet2.SortIndex = noShowWbsSet1.SortIndex;
|
||||
// newWbsSet2.Flag = newWbsSet1.Flag + 1;
|
||||
// newWbsSet2.Remark = noShowWbsSet1.Remark;
|
||||
// newWbsSet2.IsIn = false;
|
||||
// newWbsSet2.IsSelected = true;
|
||||
// newWbsSet2.IsApprove = true;
|
||||
// BLL.WbsSetService.AddWbsSet(newWbsSet2);
|
||||
// }
|
||||
//}
|
||||
//else //后续拷贝
|
||||
//{
|
||||
// Model.Wbs_WbsSet newWbsSet1 = new Model.Wbs_WbsSet();
|
||||
// newWbsSet1.WbsSetId = SQLHelper.GetNewID(typeof(Model.Wbs_WbsSet));
|
||||
// updateId = newWbsSet1.WbsSetId;
|
||||
// newWbsSet1.WbsSetCode = this.txtCode.Text.Trim();
|
||||
// newWbsSet1.WbsSetName = this.txtName.Text.Trim();
|
||||
// newWbsSet1.CnProfessionId = wbsSet.CnProfessionId;
|
||||
// newWbsSet1.UnitProjectId = wbsSet.UnitProjectId;
|
||||
// newWbsSet1.InstallationId = wbsSet.InstallationId;
|
||||
// newWbsSet1.SuperWbsSetId = id;
|
||||
// newWbsSet1.ProjectId = wbsSet.ProjectId;
|
||||
// newWbsSet1.StartDate = Convert.ToDateTime(txtStartDate.Text.Trim());
|
||||
// newWbsSet1.EndDate = Convert.ToDateTime(txtEndDate.Text.Trim());
|
||||
// if (!string.IsNullOrEmpty(txtSortIndex.Text.Trim()))
|
||||
// {
|
||||
// newWbsSet1.SortIndex = Convert.ToInt32(this.txtSortIndex.Text.Trim());
|
||||
// }
|
||||
// newWbsSet1.Flag = wbsSet.Flag + 1;
|
||||
// newWbsSet1.Remark = this.txtRemark.Text.Trim();
|
||||
// newWbsSet1.IsIn = false;
|
||||
// newWbsSet1.IsSelected = true;
|
||||
// newWbsSet1.IsApprove = true;
|
||||
// BLL.WbsSetService.AddWbsSet(newWbsSet1);
|
||||
// foreach (var noShowWbsSet1 in noShowWbsSets)
|
||||
// {
|
||||
// Model.Wbs_WbsSet newWbsSet2 = new Model.Wbs_WbsSet();
|
||||
// newWbsSet2.WbsSetId = SQLHelper.GetNewID(typeof(Model.Wbs_WbsSet));
|
||||
// newWbsSet2.WbsSetCode = GetReplaceCode(noShowWbsSet1.WbsSetCode, wbsSet.WbsSetCode);
|
||||
// newWbsSet2.WbsSetName = noShowWbsSet1.WbsSetName;
|
||||
// newWbsSet2.CnProfessionId = noShowWbsSet1.CnProfessionId;
|
||||
// newWbsSet2.UnitProjectId = noShowWbsSet1.UnitProjectId;
|
||||
// newWbsSet2.InstallationId = noShowWbsSet1.InstallationId;
|
||||
// newWbsSet2.SuperWbsSetId = newWbsSet1.WbsSetId;
|
||||
// newWbsSet2.ProjectId = noShowWbsSet1.ProjectId;
|
||||
// newWbsSet2.Weights = noShowWbsSet1.Weights;
|
||||
// newWbsSet2.StartDate = noShowWbsSet1.StartDate;
|
||||
// newWbsSet2.EndDate = noShowWbsSet1.EndDate;
|
||||
// newWbsSet2.SortIndex = noShowWbsSet1.SortIndex;
|
||||
// newWbsSet2.Flag = newWbsSet1.Flag + 1;
|
||||
// newWbsSet2.Remark = noShowWbsSet1.Remark;
|
||||
// newWbsSet2.IsIn = false;
|
||||
// newWbsSet2.IsSelected = true;
|
||||
// newWbsSet2.IsApprove = true;
|
||||
// BLL.WbsSetService.AddWbsSet(newWbsSet2);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
//BLL.Sys_LogService.AddLog(BLL.Const.System_1, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "拷贝单位、分部、分项工程");
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(updateId) + ActiveWindow.GetHidePostBackReference());
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(updateId) + ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user