This commit is contained in:
gaofei
2021-08-13 11:15:59 +08:00
parent 43acc57060
commit d8dff88c39
320 changed files with 37219 additions and 4678 deletions
@@ -17,7 +17,7 @@
Title="装置/单元设置" BodyPadding="0 5 0 0" Width="300px" Layout="Fit" runat="server"
EnableCollapse="true">
<Items>
<f:Panel runat="server" ID="panel2" RegionPosition="Left" RegionSplit="true" EnableCollapse="true"
<f:Panel runat="server" ID="panel2" RegionPosition="Left" RegionSplit="true" EnableCollapse="true" Layout="Fit"
Width="400" Title="装置/单元设置" TitleToolTip="装置/单元设置" ShowBorder="true" ShowHeader="true"
BodyPadding="5px" IconFont="ArrowCircleLeft">
<Items>
@@ -281,7 +281,7 @@ namespace FineUIPro.Web.ProjectData
}
else
{
ShowNotify("总图和主项节点无法增加子级!", MessageBoxIcon.Warning);
ShowNotify("总图和末级节点无法增加子级!", MessageBoxIcon.Warning);
}
}
else
@@ -320,36 +320,12 @@ namespace FineUIPro.Web.ProjectData
}
else
{
BLL.Project_InstallationService.DeleteInstallation(id);
var installation2s = from x in Funs.DB.Project_Installation where x.SuperInstallationId == id select x;
foreach (var installation2 in installation2s)
{
BLL.Project_InstallationService.DeleteInstallation(installation2.InstallationId);
var installation3s = from x in Funs.DB.Project_Installation where x.SuperInstallationId == installation2.InstallationId select x;
foreach (var installation3 in installation3s)
{
DeleteData(installation3.InstallationId);
}
}
DeleteBaseData(id);
}
}
else
{
Model.Project_Installation installation2 = BLL.Project_InstallationService.GetInstallationByInstallationId(id);
Model.Project_Installation installation1 = BLL.Project_InstallationService.GetInstallationByInstallationId(installation2.SuperInstallationId);
if (installation1.SuperInstallationId == "0") //删除二级装置
{
BLL.Project_InstallationService.DeleteInstallation(id);
var installation3s = from x in Funs.DB.Project_Installation where x.SuperInstallationId == id select x;
foreach (var installation3 in installation3s)
{
DeleteData(installation3.InstallationId);
}
}
else //删除二级装置
{
DeleteData(id);
}
DeleteBaseData(id);
}
ShowNotify("删除成功!", MessageBoxIcon.Success);
InitTreeMenu();
@@ -370,6 +346,24 @@ namespace FineUIPro.Web.ProjectData
}
}
private void DeleteBaseData(string installationId)
{
Model.Project_Installation installation=BLL.Project_InstallationService.GetInstallationByInstallationId(installationId);
if (installation.IsEnd == false)
{
BLL.Project_InstallationService.DeleteInstallation(installationId);
var installations = from x in Funs.DB.Project_Installation where x.SuperInstallationId == installationId select x;
foreach (var item in installations)
{
DeleteBaseData(item.InstallationId);
}
}
else
{
DeleteData(installationId);
}
}
/// <summary>
/// 删除方法
/// </summary>
@@ -378,9 +372,11 @@ namespace FineUIPro.Web.ProjectData
var wbsSets = (from x in Funs.DB.Wbs_WbsSet join y in Funs.DB.WBS_CnProfession on x.CnProfessionId equals y.CnProfessionId where y.InstallationId == installationId && x.CnProfessionId != null select x).ToList();
foreach (var wbsSet in wbsSets)
{
BLL.CostControlService.DeleteCostControlByWbsSetId(wbsSet.WbsSetId); //删除费控项
BLL.WbsDetailHistoryService.DeleteWbsDetailHistoryByToWbs(wbsSet.WbsSetId); //删除进度历史版本记录
BLL.WbsDetailService.DeleteWbsDetailByToWbs(wbsSet.WbsSetId); //删除进度记录
BLL.WbsSetService.DeleteWbsSet(wbsSet.WbsSetId);
BLL.WbsSetMatchCostControlService.DeleteWbsSetMatchCostControlByWbsSetId(wbsSet.WbsSetId); //删除费控项对应关系
}
//删除单位工程及子单位工程
@@ -544,30 +540,31 @@ namespace FineUIPro.Web.ProjectData
string ppInstallationId = string.Empty;
string projectId = this.CurrUser.LoginProjectId;
string id = this.hdSelectId.Text;
Model.Project_Installation installation = BLL.Project_InstallationService.GetInstallationByInstallationId(id);
if (installation.SuperInstallationId == "0") //一级装置
{
ppInstallationId = id;
}
else
{
if (BLL.Project_InstallationService.IsCanAddInstallation(id)) //二级装置
{
pInstallationId = id;
ppInstallationId = installation.SuperInstallationId;
}
else //三级装置
{
installationId = id;
pInstallationId = installation.SuperInstallationId;
Model.Project_Installation pInstallation = BLL.Project_InstallationService.GetInstallationByInstallationId(installation.SuperInstallationId);
if (pInstallation != null)
{
ppInstallationId = pInstallation.SuperInstallationId;
}
}
}
//projectId = installation.ProjectId;
//Model.Project_Installation installation = BLL.Project_InstallationService.GetInstallationByInstallationId(id);
//if (installation.SuperInstallationId == "0") //一级装置
//{
// ppInstallationId = id;
//}
//else
//{
// if (BLL.Project_InstallationService.IsCanAddInstallation(id)) //二级装置
// {
// pInstallationId = id;
// ppInstallationId = installation.SuperInstallationId;
// }
// else //三级装置
// {
// installationId = id;
// pInstallationId = installation.SuperInstallationId;
// Model.Project_Installation pInstallation = BLL.Project_InstallationService.GetInstallationByInstallationId(installation.SuperInstallationId);
// if (pInstallation != null)
// {
// ppInstallationId = pInstallation.SuperInstallationId;
// }
// }
//}
string ids = BLL.Project_InstallationService.GetParentInstallationIds(id);
this.trProjects.Nodes.Clear();
this.trProjects.ShowBorder = false;
this.trProjects.ShowHeader = false;
@@ -596,7 +593,7 @@ namespace FineUIPro.Web.ProjectData
newNode1.EnableExpandEvent = true;
newNode1.EnableClickEvent = true;
node.Nodes.Add(newNode1);
if (installation1.InstallationId == ppInstallationId)
if (ids.Contains(installation1.InstallationId))
{
newNode1.Expanded = true;
var installation2s = from x in Funs.DB.Project_Installation where x.SuperInstallationId == installation1.InstallationId orderby x.InstallationCode select x;
@@ -609,7 +606,7 @@ namespace FineUIPro.Web.ProjectData
newNode2.EnableExpandEvent = true;
newNode2.EnableClickEvent = true;
newNode1.Nodes.Add(newNode2);
if (installation2.InstallationId == pInstallationId)
if (ids.Contains(installation2.InstallationId))
{
newNode2.Expanded = true;
var installation3s = from x in Funs.DB.Project_Installation where x.SuperInstallationId == installation2.InstallationId orderby x.InstallationCode select x;
@@ -622,6 +619,57 @@ namespace FineUIPro.Web.ProjectData
newNode3.EnableExpandEvent = true;
newNode3.EnableClickEvent = true;
newNode2.Nodes.Add(newNode3);
if (ids.Contains(installation3.InstallationId))
{
newNode3.Expanded = true;
var installation4s = from x in Funs.DB.Project_Installation where x.SuperInstallationId == installation3.InstallationId orderby x.InstallationCode select x;
foreach (var installation4 in installation4s)
{
TreeNode newNode4 = new TreeNode();
newNode4.Text = installation4.InstallationName;
newNode4.NodeID = installation4.InstallationId;
newNode4.CommandName = "installation";
newNode4.EnableExpandEvent = true;
newNode4.EnableClickEvent = true;
newNode3.Nodes.Add(newNode4);
if (ids.Contains(installation4.InstallationId))
{
newNode4.Expanded = true;
var installation5s = from x in Funs.DB.Project_Installation where x.SuperInstallationId == installation4.InstallationId orderby x.InstallationCode select x;
foreach (var installation5 in installation5s)
{
TreeNode newNode5 = new TreeNode();
newNode5.Text = installation5.InstallationName;
newNode5.NodeID = installation5.InstallationId;
newNode5.CommandName = "installation";
newNode5.EnableExpandEvent = true;
newNode5.EnableClickEvent = true;
newNode4.Nodes.Add(newNode5);
}
}
else
{
if (BLL.Project_InstallationService.IsExitsInstallationsBySuperInstallationId(installation4.InstallationId))
{
TreeNode emptyNode = new TreeNode();
emptyNode.Text = "";
emptyNode.NodeID = "";
newNode4.Nodes.Add(emptyNode);
}
}
}
}
else
{
if (BLL.Project_InstallationService.IsExitsInstallationsBySuperInstallationId(installation3.InstallationId))
{
TreeNode emptyNode = new TreeNode();
emptyNode.Text = "";
emptyNode.NodeID = "";
newNode3.Nodes.Add(emptyNode);
}
}
}
}
else
@@ -1,52 +1,50 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InstallationSave.aspx.cs" Inherits="FineUIPro.Web.ProjectData.InstallationSave" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow>
<Items>
<f:TextBox ID="txtInstallationCode" runat="server" Label="装置/单元编号" LabelWidth="140px" Required="true" ShowRedStar="true" FocusOnPageLoad="true"></f:TextBox>
<f:TextBox ID="txtInstallationName" runat="server" Label="装置/单元名称" LabelWidth="140px" Required="true" ShowRedStar="true"></f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DatePicker runat="server" Label="进度计划开始日期" ID="txtStartDate" Required="true" ShowRedStar="true" LabelWidth="140px"></f:DatePicker>
<f:DatePicker runat="server" Label="进度计划结束日期" ID="txtEndDate" Required="true" ShowRedStar="true" LabelWidth="140px"></f:DatePicker>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<%--<f:NumberBox ID="txtWeights" NoDecimal="false" NoNegative="true" MaxValue="100" Label="权重占比(%)" LabelWidth="130px"
MinValue="0" runat="server" Required="true" >
</f:NumberBox>--%>
<f:TextBox ID="txtRemark" runat="server" Label="备注" LabelWidth="140px"></f:TextBox>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存数据" ValidateForms="SimpleForm1"
OnClick="btnSave_Click" AjaxLoadingType="Mask" ShowAjaxLoadingMaskText="true" AjaxLoadingMaskText="正在拷贝单位、分部、分项工程数据,请稍候">
</f:Button>
<%--<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
</f:Button>--%>
<f:HiddenField ID="hdCompileMan" runat="server"></f:HiddenField>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
</form>
</body>
</html>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InstallationSave.aspx.cs" Inherits="FineUIPro.Web.ProjectData.InstallationSave" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow>
<Items>
<f:TextBox ID="txtInstallationCode" runat="server" Label="装置/单元编号" LabelWidth="140px" Required="true" ShowRedStar="true" FocusOnPageLoad="true"></f:TextBox>
<f:TextBox ID="txtInstallationName" runat="server" Label="装置/单元名称" LabelWidth="140px" Required="true" ShowRedStar="true"></f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DatePicker runat="server" Label="进度计划开始日期" ID="txtStartDate" Required="true" ShowRedStar="true" LabelWidth="140px"></f:DatePicker>
<f:DatePicker runat="server" Label="进度计划结束日期" ID="txtEndDate" Required="true" ShowRedStar="true" LabelWidth="140px"></f:DatePicker>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpIsEnd" runat="server" Label="是否末级" LabelAlign="Right" LabelWidth="140px">
<f:ListItem Text="是" Value="True" />
<f:ListItem Text="否" Value="False" Selected="true"/>
</f:DropDownList>
<f:TextBox ID="txtRemark" runat="server" Label="备注" LabelWidth="140px"></f:TextBox>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存数据" ValidateForms="SimpleForm1"
OnClick="btnSave_Click" AjaxLoadingType="Mask" ShowAjaxLoadingMaskText="true" AjaxLoadingMaskText="正在拷贝单位、分部、分项工程数据,请稍候">
</f:Button>
<%--<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
</f:Button>--%>
<f:HiddenField ID="hdCompileMan" runat="server"></f:HiddenField>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
@@ -62,6 +62,14 @@ namespace FineUIPro.Web.ProjectData
{
this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", installation1.EndDate);
}
if (installation1.IsEnd == true)
{
this.drpIsEnd.SelectedValue = "True";
}
else
{
this.drpIsEnd.SelectedValue = "False";
}
this.txtRemark.Text = installation1.Def;
}
}
@@ -102,103 +110,127 @@ namespace FineUIPro.Web.ProjectData
{
installation.EndDate = Convert.ToDateTime(txtEndDate.Text.Trim());
}
installation.IsEnd = Convert.ToBoolean(this.drpIsEnd.SelectedValue);
installation.Def = txtRemark.Text.Trim();
if (string.IsNullOrEmpty(id))
{
installation.InstallationId = SQLHelper.GetNewID(typeof(Model.Project_Installation));
BLL.Project_InstallationService.AddInstallation(installation);
if (parInstallation != null)
if (this.drpIsEnd.SelectedValue == "True")
{
Model.Project_Installation pparInstallation = BLL.Project_InstallationService.GetInstallationByInstallationId(parInstallation.SuperInstallationId);
if (pparInstallation != null && pparInstallation.SuperInstallationId == "0") //当前装置级别为主项,拷贝WBS数据
installationId = installation.InstallationId;
startDate = installation.StartDate;
endDate = installation.EndDate;
//拷贝专业
var cnProfessionInits = from x in Funs.DB.WBS_CnProfessionInit where x.CnProfessionId != 20 select x;
foreach (var cnProfessionInit in cnProfessionInits)
{
installationId = installation.InstallationId;
startDate = installation.StartDate;
endDate = installation.EndDate;
//拷贝专业
var cnProfessionInits = from x in Funs.DB.WBS_CnProfessionInit where x.CnProfessionId != 20 select x;
foreach (var cnProfessionInit in cnProfessionInits)
Model.WBS_CnProfession cnProfession = new Model.WBS_CnProfession();
cnProfession.CnProfessionName = cnProfessionInit.CnProfessionName;
cnProfession.CnProfessionCode = cnProfessionInit.CnProfessionCode;
cnProfession.InstallationId = installationId;
cnProfession.ProjectId = projectId;
cnProfession.StartDate = startDate;
cnProfession.EndDate = endDate;
cnProfession.OldId = cnProfessionInit.CnProfessionId;
BLL.CnProfessionService.AddCnProfession(cnProfession);
}
//拷贝单位工程及子单位工程
var unitProjectInits = from x in Funs.DB.Wbs_UnitProjectInit where x.CnProfessionId != 20 orderby x.SuperUnitProject select x;
foreach (var unitProjectInit in unitProjectInits)
{
Model.Wbs_UnitProject unitProject = new Model.Wbs_UnitProject();
unitProject.UnitProjectId = SQLHelper.GetNewID(typeof(Model.Wbs_UnitProject));
unitProject.UnitProjectCode = unitProjectInit.UnitProjectCode;
unitProject.UnitProjectName = unitProjectInit.UnitProjectName;
unitProject.InstallationId = installationId;
unitProject.SortIndex = unitProjectInit.SortIndex;
//获取对应的专业Id
string cnProfessionId = (from x in Funs.DB.WBS_CnProfession
where x.InstallationId == installationId && x.OldId == unitProjectInit.CnProfessionId
select x.CnProfessionId).FirstOrDefault();
if (unitProjectInit.SuperUnitProject == null)
{
Model.WBS_CnProfession cnProfession = new Model.WBS_CnProfession();
cnProfession.CnProfessionName = cnProfessionInit.CnProfessionName;
cnProfession.CnProfessionCode = cnProfessionInit.CnProfessionCode;
cnProfession.InstallationId = installationId;
cnProfession.ProjectId = projectId;
cnProfession.StartDate = startDate;
cnProfession.EndDate = endDate;
cnProfession.OldId = cnProfessionInit.CnProfessionId;
BLL.CnProfessionService.AddCnProfession(cnProfession);
unitProject.SuperUnitProjectId = null;
}
//拷贝单位工程及子单位工程
var unitProjectInits = from x in Funs.DB.Wbs_UnitProjectInit where x.CnProfessionId != 20 orderby x.SuperUnitProject select x;
foreach (var unitProjectInit in unitProjectInits)
else
{
Model.Wbs_UnitProject unitProject = new Model.Wbs_UnitProject();
unitProject.UnitProjectId = SQLHelper.GetNewID(typeof(Model.Wbs_UnitProject));
unitProject.UnitProjectCode = unitProjectInit.UnitProjectCode;
unitProject.UnitProjectName = unitProjectInit.UnitProjectName;
unitProject.InstallationId = installationId;
//获取对应的专业Id
string cnProfessionId = (from x in Funs.DB.WBS_CnProfession
where x.InstallationId == installationId && x.OldId == unitProjectInit.CnProfessionId
select x.CnProfessionId).FirstOrDefault();
if (unitProjectInit.SuperUnitProject == null)
{
unitProject.SuperUnitProjectId = null;
}
else
{
unitProject.SuperUnitProjectId = (from x in Funs.DB.Wbs_UnitProject
where x.UnitProjectCode == unitProjectInit.SuperUnitProject && x.CnProfessionId == cnProfessionId
select x.UnitProjectId).FirstOrDefault();
}
unitProject.ProjectId = projectId;
unitProject.CnProfessionId = cnProfessionId;
unitProject.StartDate = startDate;
unitProject.EndDate = endDate;
unitProject.Remark = unitProjectInit.Remark;
unitProject.IsIn = true;
BLL.UnitProjectService.AddUnitProject(unitProject);
unitProject.SuperUnitProjectId = (from x in Funs.DB.Wbs_UnitProject
where x.UnitProjectCode == unitProjectInit.SuperUnitProject && x.CnProfessionId == cnProfessionId
select x.UnitProjectId).FirstOrDefault();
}
//拷贝分部/子分部/分项/子分项
wbsSetInits = (from x in Funs.DB.WBS_WbsSetInit where x.CnProfessionId != 20 orderby x.SuperWbsSetCode select x).ToList();
foreach (var wbsSetInit in wbsSetInits)
unitProject.ProjectId = projectId;
unitProject.CnProfessionId = cnProfessionId;
unitProject.StartDate = startDate;
unitProject.EndDate = endDate;
unitProject.Remark = unitProjectInit.Remark;
unitProject.IsIn = true;
BLL.UnitProjectService.AddUnitProject(unitProject);
}
//拷贝分部/子分部/分项/子分项
wbsSetInits = (from x in Funs.DB.WBS_WbsSetInit where x.CnProfessionId != 20 orderby x.SuperWbsSetCode select x).ToList();
foreach (var wbsSetInit in wbsSetInits)
{
Model.Wbs_WbsSet wbsSet = new Model.Wbs_WbsSet();
wbsSet.WbsSetId = SQLHelper.GetNewID(typeof(Model.Wbs_WbsSet));
wbsSet.WbsSetCode = wbsSetInit.WbsSetCode;
wbsSet.WbsSetName = wbsSetInit.WbsSetName;
wbsSet.InstallationId = installationId;
//获取对应的专业Id
string cnProfessionId = (from x in Funs.DB.WBS_CnProfession
where x.InstallationId == installationId && x.OldId == wbsSetInit.CnProfessionId
select x.CnProfessionId).FirstOrDefault();
wbsSet.CnProfessionId = cnProfessionId;
wbsSet.UnitProjectId = (from x in Funs.DB.Wbs_UnitProject where x.UnitProjectCode == wbsSetInit.UnitProjectCode && x.CnProfessionId == cnProfessionId select x.UnitProjectId).FirstOrDefault();
if (wbsSetInit.SuperWbsSetCode == null)
{
Model.Wbs_WbsSet wbsSet = new Model.Wbs_WbsSet();
wbsSet.WbsSetId = SQLHelper.GetNewID(typeof(Model.Wbs_WbsSet));
wbsSet.WbsSetCode = wbsSetInit.WbsSetCode;
wbsSet.WbsSetName = wbsSetInit.WbsSetName;
wbsSet.InstallationId = installationId;
//获取对应的专业Id
string cnProfessionId = (from x in Funs.DB.WBS_CnProfession
where x.InstallationId == installationId && x.OldId == wbsSetInit.CnProfessionId
select x.CnProfessionId).FirstOrDefault();
wbsSet.CnProfessionId = cnProfessionId;
wbsSet.UnitProjectId = (from x in Funs.DB.Wbs_UnitProject where x.UnitProjectCode == wbsSetInit.UnitProjectCode && x.CnProfessionId == cnProfessionId select x.UnitProjectId).FirstOrDefault();
if (wbsSetInit.SuperWbsSetCode == null)
{
wbsSet.SuperWbsSetId = null;
}
else
{
wbsSet.SuperWbsSetId = (from x in Funs.DB.Wbs_WbsSet
where x.WbsSetCode == wbsSetInit.SuperWbsSetCode && x.InstallationId == installationId && x.CnProfessionId == cnProfessionId
select x.WbsSetId).FirstOrDefault();
}
if (projectId.Contains("?"))
{
projectId = projectId.Substring(0, projectId.LastIndexOf("?"));
}
wbsSet.ProjectId = projectId;
wbsSet.StartDate = startDate;
wbsSet.EndDate = endDate;
wbsSet.Flag = wbsSetInit.Flag;
wbsSet.Way = wbsSetInit.Way;
wbsSet.ControlItemDef = wbsSetInit.ControlItemDef;
wbsSet.ControlPoint = wbsSetInit.ControlPoint;
wbsSet.Remark = wbsSetInit.Remark;
wbsSet.IsIn = true;
BLL.WbsSetService.AddWbsSet(wbsSet);
wbsSet.SuperWbsSetId = null;
}
else
{
wbsSet.SuperWbsSetId = (from x in Funs.DB.Wbs_WbsSet
where x.WbsSetCode == wbsSetInit.SuperWbsSetCode && x.InstallationId == installationId && x.CnProfessionId == cnProfessionId
select x.WbsSetId).FirstOrDefault();
}
if (projectId.Contains("?"))
{
projectId = projectId.Substring(0, projectId.LastIndexOf("?"));
}
wbsSet.ProjectId = projectId;
wbsSet.StartDate = startDate;
wbsSet.EndDate = endDate;
wbsSet.Flag = wbsSetInit.Flag;
wbsSet.Way = wbsSetInit.Way;
wbsSet.Weights = wbsSetInit.Weights;
wbsSet.ControlItemDef = wbsSetInit.ControlItemDef;
wbsSet.ControlPoint = wbsSetInit.ControlPoint;
wbsSet.Remark = wbsSetInit.Remark;
wbsSet.IsIn = true;
BLL.WbsSetService.AddWbsSet(wbsSet);
}
var totalCostControlInits = from x in Funs.DB.WBS_CostControlInit orderby x.CostControlInitCode select x;
//拷贝费用清单对应关系
var wbsSetMatchCostControlInits = from x in Funs.DB.WBS_WbsSetMatchCostControlInit orderby x.WbsSetCode select x;
foreach (var wbsSetMatchCostControlInit in wbsSetMatchCostControlInits)
{
Model.WBS_WbsSetMatchCostControl wbsSetMatchCostControl = new Model.WBS_WbsSetMatchCostControl();
wbsSetMatchCostControl.WbsSetMatchCostControlId = SQLHelper.GetNewID();
wbsSetMatchCostControl.WbsSetId = (from x in Funs.DB.Wbs_WbsSet
where x.WbsSetCode == wbsSetMatchCostControlInit.WbsSetCode && x.InstallationId == installationId
select x.WbsSetId).FirstOrDefault();
wbsSetMatchCostControl.CostControlCode = wbsSetMatchCostControlInit.CostControlInitCode;
BLL.WbsSetMatchCostControlService.AddWbsSetMatchCostControl(wbsSetMatchCostControl);
//拷贝费用清单项
var costControlInits = from x in totalCostControlInits where x.CostControlInitCode == wbsSetMatchCostControlInit.CostControlInitCode orderby x.CostControlInitCode select x;
foreach (var costControlInit in costControlInits)
{
Model.WBS_CostControl costControl = new Model.WBS_CostControl();
costControl.ProjectId = projectId;
costControl.WbsSetId = wbsSetMatchCostControl.WbsSetId;
costControl.CostControlCode = costControlInit.CostControlInitCode;
costControl.CostControlName = costControlInit.CostControlInitName;
costControl.Unit = costControlInit.Unit;
BLL.CostControlService.AddCostControl(costControl);
}
}
}
@@ -212,7 +244,7 @@ namespace FineUIPro.Web.ProjectData
installation.SuperInstallationId = installation1.SuperInstallationId;
BLL.Project_InstallationService.UpdateInstallation(installation);
//更新子级WBS内容计划时间
if (!BLL.Project_InstallationService.IsExitsInstallationsBySuperInstallationId(id)) //末级装置节点
if (this.drpIsEnd.SelectedValue == "True") //末级装置节点
{
var cns = BLL.CnProfessionService.GetCnProfessionByInstallation(id);
if (cns.Count > 0)
@@ -75,6 +75,15 @@ namespace FineUIPro.Web.ProjectData {
/// </remarks>
protected global::FineUIPro.DatePicker txtEndDate;
/// <summary>
/// drpIsEnd 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpIsEnd;
/// <summary>
/// txtRemark 控件。
/// </summary>