20220315 代码初始化上传

This commit is contained in:
2022-03-15 17:36:38 +08:00
commit 9dc8a7e05d
9501 changed files with 2066431 additions and 0 deletions
@@ -0,0 +1,77 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EarnedValueCurve.aspx.cs" Inherits="FineUIPro.Web.JDGL.CostAnalysis.EarnedValueCurve" %>
<%@ Register Src="~/Controls/ChartControl.ascx" TagName="ChartControl" TagPrefix="uc1" %>
<!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>
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" AjaxAspnetControls="divEV" />
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="300" Title="赢得值曲线" TitleToolTip="赢得值曲线" ShowBorder="true"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
<Toolbars>
<f:Toolbar ID="Toolbar5" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DropDownList ID="drpUnit" runat="server" Label="单位" LabelWidth="50px" Width="265px"
EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
</f:DropDownList>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Tree ID="trWBS" Width="250" EnableCollapse="true" ShowHeader="true" OnNodeCommand="trWBS_NodeCommand" EnableMultiSelect="true" KeepCurrentSelection="true"
OnNodeExpand="trWBS_NodeExpand" AutoLeafIdentification="true" runat="server">
</f:Tree>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="false"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle"
TitleToolTip="" AutoScroll="true">
<Items>
<f:Grid ID="Grid1" runat="server" Width="820px" ShowHeader="false" Height="200px" EnableColumnLines="true">
<Columns>
<f:RenderField Width="109px" ColumnID="月份" DataField="月份"
FieldType="String" HeaderText="月份" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="109px" ColumnID="计划值" DataField="计划值"
FieldType="String" HeaderText="计划值" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="109px" ColumnID="计划累积值" DataField="计划累积值"
FieldType="String" HeaderText="计划累积值" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="109px" ColumnID="完成值" DataField="完成值"
FieldType="String" HeaderText="完成值" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="109px" ColumnID="完成累积值" DataField="完成累积值"
FieldType="String" HeaderText="完成累积值" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="109px" ColumnID="实耗值" DataField="实耗值"
FieldType="String" HeaderText="实耗值" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="109px" ColumnID="实耗累积值" DataField="实耗累积值"
FieldType="String" HeaderText="实耗累积值" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
</Columns>
</f:Grid>
</Items>
<Items>
<f:ContentPanel ShowHeader="false" runat="server" ID="cpEV" Margin="0 0 0 0">
<div id="divEV">
<uc1:ChartControl ID="ChartEV" runat="server" />
</div>
</f:ContentPanel>
</Items>
</f:Panel>
</Items>
</f:Panel>
</form>
</body>
</html>
@@ -0,0 +1,496 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
namespace FineUIPro.Web.JDGL.CostAnalysis
{
public partial class EarnedValueCurve : PageBase
{
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, true);
BindChart();
InitTreeMenu();
}
}
#endregion
#region
/// <summary>
/// 加载树
/// </summary>
private void InitTreeMenu()
{
this.trWBS.Nodes.Clear();
this.trWBS.ShowBorder = false;
this.trWBS.ShowHeader = false;
this.trWBS.EnableIcons = true;
this.trWBS.AutoScroll = true;
var installations = from x in Funs.DB.Project_Installation where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperInstallationId == "0" orderby x.InstallationCode select x;
foreach (var installation in installations)
{
TreeNode rootNode = new TreeNode();
rootNode.Text = installation.InstallationName;
rootNode.NodeID = installation.InstallationId;
rootNode.CommandName = "installation";
rootNode.CommandArgument = installation.UnitId;
rootNode.ToolTip = installation.InstallationCode;
rootNode.EnableClickEvent = true;
if (installation.InstallationName != "总图")
{
rootNode.Expanded = true;
}
else
{
rootNode.EnableExpandEvent = true;
}
this.trWBS.Nodes.Add(rootNode);
var installation1s = from x in Funs.DB.Project_Installation
where x.SuperInstallationId == installation.InstallationId
orderby x.InstallationCode
select x;
if (installation1s.Count() > 0)
{
foreach (var installation1 in installation1s)
{
TreeNode newNode = new TreeNode();
newNode.Text = installation1.InstallationName;
newNode.NodeID = installation1.InstallationId;
newNode.CommandName = "installation";
newNode.CommandArgument = installation1.Weights == null ? null : installation1.Weights.ToString();
newNode.ToolTip = installation1.InstallationCode;
newNode.EnableClickEvent = true;
newNode.Expanded = true;
rootNode.Nodes.Add(newNode);
var installation2s = from x in Funs.DB.Project_Installation
where x.SuperInstallationId == installation1.InstallationId
orderby x.InstallationCode
select x;
foreach (var installation2 in installation2s)
{
TreeNode newNode2 = new TreeNode();
newNode2.Text = installation2.InstallationName;
newNode2.NodeID = installation2.InstallationId;
newNode2.CommandName = "installation";
newNode2.CommandArgument = installation2.Weights == null ? null : installation2.Weights.ToString();
newNode2.ToolTip = installation2.InstallationCode;
newNode2.EnableClickEvent = true;
newNode2.Expanded = true;
newNode.Nodes.Add(newNode2);
var cnProfessions = from x in Funs.DB.WBS_CnProfession where x.InstallationId == installation2.InstallationId orderby x.OldId select x;
foreach (var cnProfession in cnProfessions)
{
var unitProjects = from x in Funs.DB.Wbs_UnitProject where x.CnProfessionId == cnProfession.CnProfessionId && x.IsApprove == true select x;
if (unitProjects.Count() > 0)
{
TreeNode newNode3 = new TreeNode();
newNode3.Text = cnProfession.CnProfessionName;
newNode3.NodeID = cnProfession.CnProfessionId;
newNode3.CommandName = "cnProfession";
newNode3.CommandArgument = cnProfession.UnitId;
newNode3.ToolTip = cnProfession.CnProfessionCode;
newNode3.EnableExpandEvent = true;
newNode3.EnableClickEvent = true;
newNode2.Nodes.Add(newNode3);
TreeNode emptyNode = new TreeNode();
emptyNode.Text = "";
emptyNode.NodeID = "";
newNode3.Nodes.Add(emptyNode);
}
}
}
}
}
else
{
TreeNode emptyNode = new TreeNode();
emptyNode.Text = "";
emptyNode.NodeID = "";
rootNode.Nodes.Add(emptyNode);
}
}
}
#endregion
#region Tree展开事件
/// <summary>
/// 树展开事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void trWBS_NodeExpand(object sender, TreeNodeEventArgs e)
{
BindChart();
e.Node.Nodes.Clear();
if (e.Node.CommandName == "installation") //展开装置/单元节点
{
var installations = from x in Funs.DB.Project_Installation
where x.SuperInstallationId == e.Node.NodeID
orderby x.InstallationCode
select x;
if (installations.Count() > 0)
{
foreach (var installation in installations)
{
TreeNode newNode = new TreeNode();
newNode.Text = installation.InstallationName;
newNode.NodeID = installation.InstallationId;
newNode.CommandName = "installation";
newNode.CommandArgument = installation.Weights == null ? null : installation.Weights.ToString();
newNode.ToolTip = installation.InstallationCode;
newNode.EnableExpandEvent = true;
newNode.EnableClickEvent = true;
e.Node.Nodes.Add(newNode);
TreeNode emptyNode = new TreeNode();
emptyNode.Text = "";
emptyNode.NodeID = "";
newNode.Nodes.Add(emptyNode);
}
}
else
{
var cnProfessions = from x in Funs.DB.WBS_CnProfession where x.InstallationId == e.Node.NodeID orderby x.OldId select x;
if (cnProfessions.Count() > 0) //普通装置主项
{
foreach (var cnProfession in cnProfessions)
{
var unitProjects = from x in Funs.DB.Wbs_UnitProject where x.CnProfessionId == cnProfession.CnProfessionId && x.IsApprove == true select x;
if (unitProjects.Count() > 0)
{
TreeNode newNode = new TreeNode();
newNode.Text = cnProfession.CnProfessionName;
newNode.NodeID = cnProfession.CnProfessionId;
newNode.CommandName = "cnProfession";
newNode.CommandArgument = cnProfession.Weights == null ? null : cnProfession.Weights.ToString();
newNode.ToolTip = cnProfession.CnProfessionCode;
newNode.EnableExpandEvent = true;
newNode.EnableClickEvent = true;
e.Node.Nodes.Add(newNode);
TreeNode emptyNode = new TreeNode();
emptyNode.Text = "";
emptyNode.NodeID = "";
newNode.Nodes.Add(emptyNode);
}
}
}
else //总图
{
var unitProjects = from x in Funs.DB.Wbs_UnitProject where x.InstallationId == e.Node.NodeID && x.SuperUnitProjectId == null orderby x.SortIndex, x.UnitProjectCode select x;
foreach (var unitProject in unitProjects)
{
var wbsSets = from x in Funs.DB.Wbs_WbsSet where x.UnitProjectId == unitProject.UnitProjectId && x.IsApprove == true select x;
if (wbsSets.Count() > 0)
{
TreeNode newNode = new TreeNode();
newNode.Text = unitProject.UnitProjectName;
newNode.NodeID = unitProject.UnitProjectId;
newNode.CommandName = "unitProject";
newNode.CommandArgument = unitProject.Weights == null ? null : unitProject.Weights.ToString();
newNode.ToolTip = unitProject.UnitProjectCode;
newNode.EnableExpandEvent = true;
newNode.EnableClickEvent = true;
e.Node.Nodes.Add(newNode);
TreeNode emptyNode = new TreeNode();
emptyNode.Text = "";
emptyNode.NodeID = "";
newNode.Nodes.Add(emptyNode);
}
}
}
}
}
else if (e.Node.CommandName == "cnProfession") //展开专业节点
{
var unitProjects = from x in Funs.DB.Wbs_UnitProject where x.CnProfessionId == e.Node.NodeID && x.SuperUnitProjectId == null && x.IsApprove == true orderby x.SortIndex, x.UnitProjectCode select x;
foreach (var unitProject in unitProjects)
{
TreeNode newNode = new TreeNode();
newNode.Text = unitProject.UnitProjectName;
newNode.NodeID = unitProject.UnitProjectId;
newNode.CommandName = "unitProject";
newNode.CommandArgument = unitProject.Weights == null ? null : unitProject.Weights.ToString();
newNode.ToolTip = unitProject.UnitProjectCode;
newNode.EnableExpandEvent = true;
newNode.EnableClickEvent = true;
e.Node.Nodes.Add(newNode);
TreeNode emptyNode = new TreeNode();
emptyNode.Text = "";
emptyNode.NodeID = "";
newNode.Nodes.Add(emptyNode);
}
}
else if (e.Node.CommandName == "unitProject") //展开单位工程节点
{
var childUnitProjects = from x in Funs.DB.Wbs_UnitProject where x.SuperUnitProjectId == e.Node.NodeID && x.IsApprove == true orderby x.SortIndex, x.UnitProjectCode select x;
if (childUnitProjects.Count() > 0) //存在子单位工程
{
foreach (var childUnitProject in childUnitProjects)
{
TreeNode newNode = new TreeNode();
newNode.Text = childUnitProject.UnitProjectName;
newNode.NodeID = childUnitProject.UnitProjectId;
newNode.CommandName = "childUnitProject";
newNode.CommandArgument = childUnitProject.Weights == null ? null : childUnitProject.Weights.ToString();
newNode.ToolTip = childUnitProject.UnitProjectCode;
newNode.EnableExpandEvent = true;
newNode.EnableClickEvent = true;
e.Node.Nodes.Add(newNode);
TreeNode emptyNode = new TreeNode();
emptyNode.Text = "";
emptyNode.NodeID = "";
newNode.Nodes.Add(emptyNode);
}
}
else //不存在子单位工程,加载分部工程
{
var wbsSet1s = from x in Funs.DB.Wbs_WbsSet where x.Flag == 1 && x.UnitProjectId == e.Node.NodeID && x.IsApprove == true && x.NoShow == null orderby x.SortIndex, x.WbsSetCode select x;
if (wbsSet1s.Count() > 0)
{
foreach (var wbsSet1 in wbsSet1s)
{
TreeNode newNode = new TreeNode();
newNode.Text = wbsSet1.WbsSetName;
newNode.NodeID = wbsSet1.WbsSetId;
newNode.CommandName = "wbsSet";
newNode.CommandArgument = wbsSet1.Weights == null ? null : wbsSet1.Weights.ToString();
newNode.ToolTip = wbsSet1.WbsSetCode;
newNode.EnableExpandEvent = true;
newNode.EnableClickEvent = true;
e.Node.Nodes.Add(newNode);
var childWbsSets2 = BLL.WbsSetService.GetApproveWbsSetsBySuperWbsSetId(newNode.NodeID);
if (childWbsSets2.Count() > 0)
{
TreeNode emptyNode = new TreeNode();
emptyNode.Text = "";
emptyNode.NodeID = "";
newNode.Nodes.Add(emptyNode);
}
}
}
else //单位工程下直接是分项内容,如质量行为
{
var wbsSet3s = from x in Funs.DB.Wbs_WbsSet where x.Flag == 3 && x.UnitProjectId == e.Node.NodeID && x.IsApprove == true && x.NoShow == null orderby x.SortIndex, x.WbsSetCode select x;
if (wbsSet3s.Count() > 0)
{
foreach (var wbsSet3 in wbsSet3s)
{
TreeNode newNode = new TreeNode();
newNode.Text = wbsSet3.WbsSetName;
newNode.NodeID = wbsSet3.WbsSetId;
newNode.CommandName = "wbsSet";
newNode.CommandArgument = wbsSet3.Weights == null ? null : wbsSet3.Weights.ToString();
newNode.ToolTip = wbsSet3.WbsSetCode;
newNode.EnableExpandEvent = true;
newNode.EnableClickEvent = true;
e.Node.Nodes.Add(newNode);
var childWbsSets2 = BLL.WbsSetService.GetApproveWbsSetsBySuperWbsSetId(newNode.NodeID);
if (childWbsSets2.Count() > 0)
{
TreeNode emptyNode = new TreeNode();
emptyNode.Text = "";
emptyNode.NodeID = "";
newNode.Nodes.Add(emptyNode);
}
}
}
}
}
}
else if (e.Node.CommandName == "childUnitProject") //展开子单位工程节点
{
var wbsSet1s = from x in Funs.DB.Wbs_WbsSet where x.Flag == 1 && x.UnitProjectId == e.Node.NodeID && x.IsApprove == true && x.NoShow == null orderby x.SortIndex, x.WbsSetCode select x;
foreach (var wbsSet1 in wbsSet1s)
{
TreeNode newNode = new TreeNode();
newNode.Text = wbsSet1.WbsSetName;
newNode.NodeID = wbsSet1.WbsSetId;
newNode.CommandName = "wbsSet";
newNode.CommandArgument = wbsSet1.Weights == null ? null : wbsSet1.Weights.ToString();
newNode.ToolTip = wbsSet1.WbsSetCode;
newNode.EnableExpandEvent = true;
newNode.EnableClickEvent = true;
e.Node.Nodes.Add(newNode);
var childWbsSets2 = BLL.WbsSetService.GetApproveWbsSetsBySuperWbsSetId(newNode.NodeID);
if (childWbsSets2.Count() > 0)
{
TreeNode emptyNode = new TreeNode();
emptyNode.Text = "";
emptyNode.NodeID = "";
newNode.Nodes.Add(emptyNode);
}
}
}
else if (e.Node.CommandName == "wbsSet") //展开分部/子分部/分项/子分项工程节点
{
var childWbsSets = BLL.WbsSetService.GetApproveWbsSetsBySuperWbsSetId(e.Node.NodeID);
foreach (var wbsSet in childWbsSets)
{
TreeNode newNode = new TreeNode();
newNode.Text = wbsSet.WbsSetName;
newNode.NodeID = wbsSet.WbsSetId;
newNode.CommandName = "wbsSet";
newNode.CommandArgument = wbsSet.Weights == null ? null : wbsSet.Weights.ToString();
newNode.ToolTip = wbsSet.WbsSetCode;
newNode.EnableExpandEvent = true;
newNode.EnableClickEvent = true;
e.Node.Nodes.Add(newNode);
var childWbsSets2 = BLL.WbsSetService.GetApproveWbsSetsBySuperWbsSetId(newNode.NodeID);
if (childWbsSets2.Count() > 0)
{
TreeNode emptyNode = new TreeNode();
emptyNode.Text = "";
emptyNode.NodeID = "";
newNode.Nodes.Add(emptyNode);
}
}
}
}
#endregion
#region
/// <summary>
/// 单位下拉选择事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e)
{
List<string> nodeIds = new List<string>();
if (this.drpUnit.SelectedValue != BLL.Const._Null)
{
foreach (var item in this.trWBS.Nodes)
{
if (item.CommandArgument == this.drpUnit.SelectedValue)
{
nodeIds.Add(item.NodeID);
}
foreach (var item1 in item.Nodes)
{
foreach (var item2 in item1.Nodes)
{
foreach (var item3 in item2.Nodes)
{
if (item3.CommandArgument == this.drpUnit.SelectedValue)
{
nodeIds.Add(item3.NodeID);
}
}
}
}
}
}
this.trWBS.SelectedNodeIDArray = nodeIds.ToArray();
BindChart();
}
#endregion
#region Tree点击事件
/// <summary>
/// Tree点击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void trWBS_NodeCommand(object sender, TreeCommandEventArgs e)
{
BindChart();
}
#endregion
#region
/// <summary>
/// 数据绑定
/// </summary>
private void BindChart()
{
string[] nodeIds = this.trWBS.SelectedNodeIDArray;
string toWbs = string.Empty;
foreach (var nodeId in nodeIds)
{
toWbs += nodeId + ",";
}
string strSql = "select distinct (cast(YEAR(Months) as varchar(4))+'.'+cast(MONTH(Months) as varchar(2))) as 月份,t.Months, (select SUM(PlanValue) from dbo.WbsDetail where Months=t.Months and CHARINDEX(ToWbs,@ToWbs)>0) as 计划值," +
"(select SUM(PlanValue) from dbo.WbsDetail where Months<=t.Months and CHARINDEX(ToWbs,@ToWbs)>0) as 计划累积值 ," +
"(select SUM(CompleteValue) from dbo.WbsDetail where Months=t.Months and CHARINDEX(ToWbs,@ToWbs)>0) as 完成值," +
"(select SUM(CompleteValue) from dbo.WbsDetail where Months<=t.Months and CHARINDEX(ToWbs,@ToWbs)>0) as 完成累积值," +
"(select SUM(RealValue) from dbo.WbsDetail where Months=t.Months and CHARINDEX(ToWbs,@ToWbs)>0) as 实耗值," +
"(select SUM(RealValue) from dbo.WbsDetail where Months<=t.Months and CHARINDEX(ToWbs,@ToWbs)>0) as 实耗累积值 " +
"from dbo.WbsDetail as t where CHARINDEX(t.ToWbs,@ToWbs)>0 order by t.Months";
string date = DateTime.Now.Year + "-" + DateTime.Now.Month + "-01";
SqlParameter[] parameter = new SqlParameter[]
{
new SqlParameter("@ToWbs",toWbs),
new SqlParameter("@Months",date),
};
DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);
this.Grid1.DataSource = dt;
this.Grid1.DataBind();
this.ChartEV.CreateMaryChart(dt, 820, 320, null);
}
#endregion
#region DataTable行列转换
/// <summary>
/// 将DataTable行列转换
/// </summary>
/// <param name="src">要转换的DataTable</param>
/// <param name="columnHead">要作为Column的哪列</param>
/// <returns></returns>
private DataTable Col2Row(DataTable src, int columnHead)
{
DataTable result = new DataTable();
DataColumn myHead = src.Columns[columnHead];
result.Columns.Add(myHead.ColumnName);
FineUIPro.RenderField bf;
bf = new FineUIPro.RenderField();
bf.ColumnID = myHead.ColumnName;
bf.DataField = myHead.ColumnName;
bf.HeaderText = myHead.ColumnName;
Grid1.Columns.Add(bf);
for (int i = 0; i < src.Rows.Count; i++)
{
result.Columns.Add(src.Rows[i][myHead].ToString());
bf = new FineUIPro.RenderField();
bf.ColumnID = src.Rows[i][myHead].ToString();
bf.DataField = src.Rows[i][myHead].ToString();
bf.HeaderText = src.Rows[i][myHead].ToString();
Grid1.Columns.Add(bf);
}
Grid1.DataKeyNames = new string[] { "月份" };
foreach (DataColumn col in src.Columns)
{
if (col == myHead)
continue;
object[] newRow = new object[src.Rows.Count + 1];
newRow[0] = col.ColumnName;
for (int i = 0; i < src.Rows.Count; i++)
{
newRow[i + 1] = src.Rows[i][col];
}
result.Rows.Add(newRow);
}
return result;
}
private DataTable Col2Row(DataTable src, string columnHead)
{
for (int i = 0; i < src.Columns.Count; i++)
{
if (src.Columns[i].ColumnName.ToUpper() == columnHead.ToUpper())
return Col2Row(src, i);
}
return new DataTable();
}
#endregion
}
}
@@ -0,0 +1,114 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.JDGL.CostAnalysis {
public partial class EarnedValueCurve {
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// Toolbar5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar5;
/// <summary>
/// drpUnit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpUnit;
/// <summary>
/// trWBS 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tree trWBS;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// cpEV 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel cpEV;
/// <summary>
/// ChartEV 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::Web.Controls.ChartControl ChartEV;
}
}
@@ -0,0 +1,184 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PlanAdjust.aspx.cs" Inherits="FineUIPro.Web.JDGL.CostAnalysis.PlanAdjust" %>
<!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>
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.f-grid-row.yellow {
background-color: yellow;
background-image: none;
}
.f-grid-row.red {
background-color: #FF7575;
background-image: none;
}
.f-grid-row .f-grid-cell-inner {
white-space: normal;
word-break: break-all;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" />
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="计划调整及纠偏措施设置" Width="1800px"
Height="500px" runat="server" EnableCollapse="true" DataKeyNames="Id,Name" EnableTree="true"
EnableColumnLines="true" TreeColumn="Name" DataIDField="Id" DataParentIDField="SupId"
ExpandAllTreeNodes="true" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
<Items>
<f:DropDownList ID="drpRectificationMeasureType" runat="server" Label="纠偏类型" EnableEdit="false" LabelWidth="90px" LabelAlign="Right" Width="180px"
ForceSelection="false">
<f:ListItem Value="1" Text="进度纠偏" />
<f:ListItem Value="2" Text="费用纠偏" />
</f:DropDownList>
<f:Label ID="Label1" runat="server" Text="前"></f:Label>
<f:NumberBox ID="nbMaxValue" NoDecimal="true" NoNegative="false" Width="50px"
MinValue="0" runat="server" Required="true" ShowRedStar="true">
</f:NumberBox>
<f:Label ID="Label4" runat="server" Text="项" Width="50px"></f:Label>
<f:Label ID="Label33" runat="server" Text="装置/单元:">
</f:Label>
<f:DropDownBox runat="server" ID="DropDownBox1" DataControlID="drpInstallation" EnableMultiSelect="true"
Width="300px">
<PopPanel>
<f:SimpleForm ID="SimpleForm2" BodyPadding="10px" runat="server" AutoScroll="true"
ShowBorder="True" ShowHeader="false" Hidden="true">
<Items>
<f:Label ID="Label2" runat="server" Text="请选择装置/单元:">
</f:Label>
<f:CheckBoxList ID="drpInstallation" ColumnNumber="1" runat="server">
</f:CheckBoxList>
</Items>
</f:SimpleForm>
</PopPanel>
</f:DropDownBox>
<f:Label ID="Label5" runat="server" Text="专业:">
</f:Label>
<f:DropDownBox runat="server" ID="DropDownBox2" DataControlID="drpCnProfession" EnableMultiSelect="true"
Width="300px">
<PopPanel>
<f:SimpleForm ID="SimpleForm1" runat="server" AutoScroll="true" ShowBorder="True"
Width="500px" ShowHeader="false" Hidden="true">
<Items>
<f:Label ID="Label3" runat="server" Text="请选择专业:">
</f:Label>
<f:CheckBoxList ID="drpCnProfession" ColumnNumber="1" runat="server">
</f:CheckBoxList>
</Items>
</f:SimpleForm>
</PopPanel>
</f:DropDownBox>
</Items>
</f:Toolbar>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server">
<Items>
<f:CheckBoxList ID="CheckBoxList1" runat="server" OnSelectedIndexChanged="CheckBoxList1_SelectedIndexChanged"
AutoPostBack="true">
<f:CheckItem Text="单位工程" Value="1" />
</f:CheckBoxList>
<f:CheckBoxList ID="CheckBoxList2" runat="server" OnSelectedIndexChanged="CheckBoxList2_SelectedIndexChanged"
AutoPostBack="true">
<f:CheckItem Text="子单位工程" Value="2" />
</f:CheckBoxList>
<f:CheckBoxList ID="CheckBoxList3" runat="server" OnSelectedIndexChanged="CheckBoxList3_SelectedIndexChanged"
AutoPostBack="true">
<f:CheckItem Text="分部工程" Value="3" />
</f:CheckBoxList>
<f:CheckBoxList ID="CheckBoxList4" runat="server" OnSelectedIndexChanged="CheckBoxList4_SelectedIndexChanged"
AutoPostBack="true">
<f:CheckItem Text="子分部工程" Value="4" />
</f:CheckBoxList>
<f:CheckBoxList ID="CheckBoxList5" runat="server" OnSelectedIndexChanged="CheckBoxList5_SelectedIndexChanged"
AutoPostBack="true">
<f:CheckItem Text="分项工程" Value="5" />
</f:CheckBoxList>
<f:CheckBoxList ID="CheckBoxList6" runat="server" OnSelectedIndexChanged="CheckBoxList6_SelectedIndexChanged"
AutoPostBack="true">
<f:CheckItem Text="子分项工程" Value="6" />
</f:CheckBoxList>
<f:Button ID="Button1" Text="查询" MarginLeft="40px" EnablePostBack="true" runat="server"
OnClick="btnNew_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:RowNumberField />
<f:GroupField EnableLock="true" HeaderText="装置全专业所有单位工程进度测量汇总表" TextAlign="Center">
<Columns>
<f:BoundField Width="150px" ColumnID="Name" ExpandUnusedSpace="true" DataField="Name"
HeaderTextAlign="Center" HeaderText="装置/单元" DataToolTipField="RectificationMeasureNames" />
</Columns>
</f:GroupField>
<f:GroupField EnableLock="true" HeaderText="测量标志(权重)" TextAlign="Center">
<Columns>
<f:BoundField Width="100px" DataField="Weights" HeaderText="占比" DataToolTipField="RectificationMeasureNames" TextAlign="Center" />
<f:BoundField Width="100px" DataField="WeightsMoneyTotal" HeaderText="费用(万元)" DataToolTipField="RectificationMeasureNames" TextAlign="Center" />
</Columns>
</f:GroupField>
<f:GroupField EnableLock="true" HeaderText="完成值(万元)(BCWP" TextAlign="Center">
<Columns>
<f:BoundField Width="100px" DataField="CompleteValue" HeaderText="月费用" DataToolTipField="RectificationMeasureNames" TextAlign="Center" />
<f:BoundField Width="100px" DataField="CompleteValueTotal" HeaderText="累计费用" DataToolTipField="RectificationMeasureNames" TextAlign="Center" />
<f:BoundField Width="100px" DataField="CompleteValuePercentage" HeaderText="累计%" DataToolTipField="RectificationMeasureNames"
TextAlign="Center" />
</Columns>
</f:GroupField>
<f:GroupField EnableLock="true" HeaderText="实耗值(万元)(ACWP" TextAlign="Center">
<Columns>
<f:BoundField Width="100px" DataField="RealValue" HeaderText="月实耗" DataToolTipField="RectificationMeasureNames" TextAlign="Center" />
<f:BoundField Width="100px" DataField="RealValueTotal" HeaderText="累计实耗" DataToolTipField="RectificationMeasureNames" TextAlign="Center" />
</Columns>
</f:GroupField>
<f:GroupField EnableLock="true" HeaderText="赢的值(EV)" TextAlign="Center">
<Columns>
<f:GroupField EnableLock="true" HeaderText="进度(SV" TextAlign="Center">
<Columns>
<f:BoundField Width="100px" DataField="SVCost" HeaderText="费用(万元)" TextAlign="Center" />
</Columns>
</f:GroupField>
<f:GroupField EnableLock="true" HeaderText="费用(CV" TextAlign="Center">
<Columns>
<f:BoundField Width="100px" DataField="CVCost" HeaderText="费用(万元)" TextAlign="Center" />
</Columns>
</f:GroupField>
</Columns>
</f:GroupField>
<f:GroupField EnableLock="true" HeaderText="进度计划" TextAlign="Center">
<Columns>
<f:BoundField Width="100px" DataField="StartDate" HeaderText="开始日期" DataToolTipField="RectificationMeasureNames" TextAlign="Center" />
<f:BoundField Width="100px" DataField="EndDate" HeaderText="结束日期" DataToolTipField="RectificationMeasureNames" TextAlign="Center" />
</Columns>
</f:GroupField>
<f:GroupField EnableLock="true" HeaderText="计划值(BCWS)(万元)" TextAlign="Center">
<Columns>
<f:BoundField Width="100px" DataField="PlanValue" HeaderText="月计划" DataToolTipField="RectificationMeasureNames" TextAlign="Center" />
<f:BoundField Width="100px" DataField="PlanValueTotal" HeaderText="累计计划" DataToolTipField="RectificationMeasureNames" TextAlign="Center" />
<f:BoundField Width="100px" DataField="PlanValuePercentage" HeaderText="月计划%" DataToolTipField="RectificationMeasureNames" TextAlign="Center" />
<f:BoundField Width="100px" DataField="PlanValueRateTotal" HeaderText="累计计划%" DataToolTipField="RectificationMeasureNames" TextAlign="Center" />
</Columns>
</f:GroupField>
<f:RenderField Width="10px" ColumnID="IsLeaf" DataField="IsLeaf" Hidden="true" FieldType="String"
HeaderText="是否末级节点" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
</Columns>
</f:Grid>
<f:Window ID="Window1" Title="调整页面" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="false"
Width="1140px" Height="560px">
</f:Window>
<f:Window ID="Window2" Title="纠偏措施设置页面" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="true" runat="server" OnClose="Window2_Close" IsModal="false"
Width="840px" Height="260px">
</f:Window>
</form>
</body>
</html>
@@ -0,0 +1,308 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.JDGL.CostAnalysis
{
public partial class PlanAdjust : PageBase
{
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.drpInstallation.DataTextField = "InstallationName";
this.drpInstallation.DataValueField = "InstallationId";
this.drpInstallation.DataSource = (from x in Funs.DB.Project_Installation where x.ProjectId == this.CurrUser.LoginProjectId orderby x.InstallationCode select x).ToList();
drpInstallation.DataBind();
this.drpCnProfession.DataTextField = "CnProfessionName";
this.drpCnProfession.DataValueField = "CnProfessionId";
this.drpCnProfession.DataSource = BLL.CnProfessionService.GetCnProfessionDropDownList();
drpCnProfession.DataBind();
}
}
private void GetNewGrid()
{
int year;
int month;
string[] installationId = null;
string[] cnProfessionId = null;
int marking2 = 0;
year = DateTime.Now.Year;
month = DateTime.Now.Month;
if (this.CheckBoxList1.SelectedValueArray.Length > 0)
{
marking2 = 3;
}
if (this.CheckBoxList2.SelectedValueArray.Length > 0)
{
marking2 = 4;
}
if (this.CheckBoxList3.SelectedValueArray.Length > 0)
{
marking2 = 5;
}
if (this.CheckBoxList4.SelectedValueArray.Length > 0)
{
marking2 = 6;
}
if (this.CheckBoxList5.SelectedValueArray.Length > 0)
{
marking2 = 7;
}
if (this.CheckBoxList6.SelectedValueArray.Length > 0)
{
marking2 = 8;
}
installationId = this.drpInstallation.SelectedValueArray;
cnProfessionId = this.drpCnProfession.SelectedValueArray;
DataTable table = BLL.WBSReportService.GetTreeDataTable(this.CurrUser.LoginProjectId, year, month, installationId, cnProfessionId, marking2, drpRectificationMeasureType.SelectedValue);
Grid1.DataSource = table;
Grid1.DataBind();
List<string> list1 = new List<string>(); //进度纠偏最大值集合
List<string> list2 = new List<string>(); //费用纠偏最大值集合
for (int i = 0; i < Grid1.Rows.Count; i++)
{
if (drpRectificationMeasureType.SelectedValue == "1") //进度纠偏
{
if (!string.IsNullOrEmpty(Grid1.Rows[i].Values[15].ToString()))
{
if (Convert.ToDecimal(Grid1.Rows[i].Values[15].ToString()) < 0)
{
Grid1.Rows[i].RowCssClass = "yellow";
if (Grid1.Rows[i].Values[26].ToString() == "true")
{
list1.Add(Grid1.Rows[i].Values[15].ToString() + "," + i);
}
}
}
}
else //费用纠偏
{
if (!string.IsNullOrEmpty(Grid1.Rows[i].Values[17].ToString()))
{
if (Convert.ToDecimal(Grid1.Rows[i].Values[17].ToString()) < 0)
{
Grid1.Rows[i].RowCssClass = "yellow";
if (Grid1.Rows[i].Values[26].ToString() == "true")
{
list2.Add(Grid1.Rows[i].Values[17].ToString() + "," + i);
}
}
}
}
}
if (drpRectificationMeasureType.SelectedValue == "1") //进度纠偏
{
if (list1.Count > 0)
{
list1 = (from x in list1 orderby Convert.ToDecimal(x.Split(',')[0]) select x).ToList();
int value = Convert.ToInt32(nbMaxValue.Text.Trim()) >= list1.Count ? list1.Count : Convert.ToInt32(nbMaxValue.Text.Trim());
for (int i = 0; i < value; i++)
{
Grid1.Rows[Convert.ToInt32(list1[i].Split(',')[1])].RowCssClass = "red";
}
}
}
else
{
if (list2.Count > 0)
{
list2 = (from x in list2 orderby Convert.ToDecimal(x.Split(',')[0]) select x).ToList();
int value = Convert.ToInt32(nbMaxValue.Text.Trim()) >= list2.Count ? list2.Count : Convert.ToInt32(nbMaxValue.Text.Trim());
for (int i = 0; i < value; i++)
{
Grid1.Rows[Convert.ToInt32(list2[i].Split(',')[1])].RowCssClass = "red";
}
}
}
}
#endregion
#region
/// <summary>
/// 查询按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnNew_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(nbMaxValue.Text.Trim()))
{
ShowNotify("请先输入要查询的项数!", MessageBoxIcon.Warning);
return;
}
GetNewGrid();
}
#endregion
#region CheckBoxList选择事件
/// <summary>
/// 单位工程选择事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void CheckBoxList1_SelectedIndexChanged(object sender, EventArgs e)
{
if (CheckBoxList1.SelectedValueArray.Length == 0)
{
CheckBoxList2.SelectedValueArray = new string[] { };
CheckBoxList3.SelectedValueArray = new string[] { };
CheckBoxList4.SelectedValueArray = new string[] { };
CheckBoxList5.SelectedValueArray = new string[] { };
CheckBoxList6.SelectedValueArray = new string[] { };
}
}
/// <summary>
/// 子单位工程选择事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void CheckBoxList2_SelectedIndexChanged(object sender, EventArgs e)
{
if (CheckBoxList2.SelectedValueArray.Length > 0)
{
CheckBoxList1.SelectedValueArray = new string[] { "1" };
}
else
{
CheckBoxList3.SelectedValueArray = new string[] { };
CheckBoxList4.SelectedValueArray = new string[] { };
CheckBoxList5.SelectedValueArray = new string[] { };
CheckBoxList6.SelectedValueArray = new string[] { };
}
}
/// <summary>
/// 分部工程选择事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void CheckBoxList3_SelectedIndexChanged(object sender, EventArgs e)
{
if (CheckBoxList3.SelectedValueArray.Length > 0)
{
CheckBoxList1.SelectedValueArray = new string[] { "1" };
CheckBoxList2.SelectedValueArray = new string[] { "2" };
}
else
{
CheckBoxList4.SelectedValueArray = new string[] { };
CheckBoxList5.SelectedValueArray = new string[] { };
CheckBoxList6.SelectedValueArray = new string[] { };
}
}
/// <summary>
/// 子分部工程选择事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void CheckBoxList4_SelectedIndexChanged(object sender, EventArgs e)
{
if (CheckBoxList4.SelectedValueArray.Length > 0)
{
CheckBoxList1.SelectedValueArray = new string[] { "1" };
CheckBoxList2.SelectedValueArray = new string[] { "2" };
CheckBoxList3.SelectedValueArray = new string[] { "3" };
}
else
{
CheckBoxList5.SelectedValueArray = new string[] { };
CheckBoxList6.SelectedValueArray = new string[] { };
}
}
/// <summary>
/// 分项工程选择事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void CheckBoxList5_SelectedIndexChanged(object sender, EventArgs e)
{
if (CheckBoxList5.SelectedValueArray.Length > 0)
{
CheckBoxList1.SelectedValueArray = new string[] { "1" };
CheckBoxList2.SelectedValueArray = new string[] { "2" };
CheckBoxList3.SelectedValueArray = new string[] { "3" };
CheckBoxList4.SelectedValueArray = new string[] { "4" };
}
else
{
CheckBoxList6.SelectedValueArray = new string[] { };
}
}
/// <summary>
/// 子分项工程选择事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void CheckBoxList6_SelectedIndexChanged(object sender, EventArgs e)
{
if (CheckBoxList6.SelectedValueArray.Length > 0)
{
CheckBoxList1.SelectedValueArray = new string[] { "1" };
CheckBoxList2.SelectedValueArray = new string[] { "2" };
CheckBoxList3.SelectedValueArray = new string[] { "3" };
CheckBoxList4.SelectedValueArray = new string[] { "4" };
CheckBoxList5.SelectedValueArray = new string[] { "5" };
}
}
#endregion
#region Grid行双击事件
/// <summary>
/// Grid行双击事件(最新动态)
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.PlanAdjustMenuId, Const.BtnSave))
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../WBSPlan/WBSPlanSet.aspx?ToWbs={0}", Grid1.SelectedRowID, "编辑 - ")));
}
else
{
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
#endregion
#region
/// <summary>
/// 关闭窗口
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Window1_Close(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("RectificationMeasureSet.aspx?ToWbs={0}&Type={1}", Grid1.SelectedRowID, drpRectificationMeasureType.SelectedValue, "编辑 - ")));
}
/// <summary>
/// 关闭窗口
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Window2_Close(object sender, EventArgs e)
{
GetNewGrid();
}
#endregion
}
}
@@ -0,0 +1,267 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.JDGL.CostAnalysis {
public partial class PlanAdjust {
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// drpRectificationMeasureType 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpRectificationMeasureType;
/// <summary>
/// Label1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label1;
/// <summary>
/// nbMaxValue 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox nbMaxValue;
/// <summary>
/// Label4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label4;
/// <summary>
/// Label33 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label33;
/// <summary>
/// DropDownBox1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownBox DropDownBox1;
/// <summary>
/// SimpleForm2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.SimpleForm SimpleForm2;
/// <summary>
/// Label2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label2;
/// <summary>
/// drpInstallation 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBoxList drpInstallation;
/// <summary>
/// Label5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label5;
/// <summary>
/// DropDownBox2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownBox DropDownBox2;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.SimpleForm SimpleForm1;
/// <summary>
/// Label3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label3;
/// <summary>
/// drpCnProfession 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBoxList drpCnProfession;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// CheckBoxList1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBoxList CheckBoxList1;
/// <summary>
/// CheckBoxList2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBoxList CheckBoxList2;
/// <summary>
/// CheckBoxList3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBoxList CheckBoxList3;
/// <summary>
/// CheckBoxList4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBoxList CheckBoxList4;
/// <summary>
/// CheckBoxList5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBoxList CheckBoxList5;
/// <summary>
/// CheckBoxList6 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBoxList CheckBoxList6;
/// <summary>
/// Button1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button Button1;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Window2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window2;
}
}
@@ -0,0 +1,58 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RectificationMeasureSet.aspx.cs" Inherits="FineUIPro.Web.JDGL.CostAnalysis.RectificationMeasureSet" %>
<!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>
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
</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"
Layout="VBox" BodyPadding="10px" runat="server" RedStarPosition="BeforeText"
LabelAlign="Right">
<Rows>
<f:FormRow>
<Items>
<f:DropDownBox runat="server" ID="DropDownBox1" DataControlID="drpRectificationMeasure" EnableMultiSelect="true" Label="纠偏措施" LabelWidth="130"
Width="600px">
<PopPanel>
<f:SimpleForm ID="SimpleForm2" BodyPadding="10px" runat="server" AutoScroll="true"
ShowBorder="True" ShowHeader="false" Hidden="true">
<Items>
<f:Label ID="Label4" runat="server" Text="请选择纠偏措施:">
</f:Label>
<f:CheckBoxList ID="drpRectificationMeasure" ColumnNumber="4" runat="server" Required="true" ShowRedStar="true">
</f:CheckBoxList>
</Items>
</f:SimpleForm>
</PopPanel>
</f:DropDownBox>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="25% 20% 55%">
<Items>
<f:NumberBox ID="nbRemindDay" NoDecimal="true" NoNegative="false" Label="提醒周期为每" LabelWidth="130" Width="250"
MinValue="0" MaxValue="30" runat="server" Required="true" ShowRedStar="true">
</f:NumberBox>
<f:Label ID="Label3" runat="server" Text="天提醒一次"></f:Label>
<f:Label ID="Label2" runat="server" Hidden="true"></f:Label>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" ToolbarAlign="Right" runat="server">
<Items>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存数据" ValidateForms="SimpleForm1"
OnClick="btnSave_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
</form>
</body>
</html>
@@ -0,0 +1,72 @@
using BLL;
using System;
namespace FineUIPro.Web.JDGL.CostAnalysis
{
public partial class RectificationMeasureSet : PageBase
{
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (!string.IsNullOrEmpty(Request.Params["Type"]))
{
if (Request.Params["Type"] == "1")
{
DropDownBox1.Label = "进度纠偏措施";
}
else
{
DropDownBox1.Label = "费用纠偏措施";
}
this.drpRectificationMeasure.DataTextField = "RectificationMeasureName";
this.drpRectificationMeasure.DataValueField = "RectificationMeasureId";
this.drpRectificationMeasure.DataSource = BLL.RectificationMeasureService.GetRectificationMeasureDropDownListByType(Request.Params["Type"]);
drpRectificationMeasure.DataBind();
}
}
}
#endregion
#region
/// <summary>
/// 保存按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
Model.WBSRectificationMeasureSet wBSRectificationMeasureSet = new Model.WBSRectificationMeasureSet();
wBSRectificationMeasureSet.WBSRectificationMeasureSetId = SQLHelper.GetNewID(typeof(Model.WBSRectificationMeasureSet));
wBSRectificationMeasureSet.ProjectId = this.CurrUser.LoginProjectId;
wBSRectificationMeasureSet.ToWbs = Request.Params["ToWbs"];
string ids = string.Empty;
foreach (var item in this.drpRectificationMeasure.SelectedValueArray)
{
ids += item + ",";
}
if (!string.IsNullOrEmpty(ids))
{
ids = ids.Substring(0, ids.LastIndexOf(","));
}
wBSRectificationMeasureSet.RectificationMeasureIds = ids;
wBSRectificationMeasureSet.RectificationMeasureType = Request.Params["Type"];
if (!string.IsNullOrEmpty(this.nbRemindDay.Text.Trim()))
{
wBSRectificationMeasureSet.RemindDay = Convert.ToInt32(this.nbRemindDay.Text.Trim());
}
wBSRectificationMeasureSet.CompileMan = this.CurrUser.UserId;
wBSRectificationMeasureSet.CompileDate = DateTime.Now;
BLL.WBSRectificationMeasureSetService.AddWBSRectificationMeasureSet(wBSRectificationMeasureSet);
BLL.LogService.AddSys_Log(this.CurrUser, wBSRectificationMeasureSet.ToWbs, wBSRectificationMeasureSet.WBSRectificationMeasureSetId, BLL.Const.RectificationMeasureMenuId, "添加纠偏措施");
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
#endregion
}
}
@@ -0,0 +1,123 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.JDGL.CostAnalysis {
public partial class RectificationMeasureSet {
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// DropDownBox1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownBox DropDownBox1;
/// <summary>
/// SimpleForm2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.SimpleForm SimpleForm2;
/// <summary>
/// Label4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label4;
/// <summary>
/// drpRectificationMeasure 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBoxList drpRectificationMeasure;
/// <summary>
/// nbRemindDay 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox nbRemindDay;
/// <summary>
/// Label3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label3;
/// <summary>
/// Label2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label2;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
}
}