20250116 key Quantity、项目状态修改
This commit is contained in:
@@ -135,20 +135,20 @@
|
||||
</Items>
|
||||
<Items>
|
||||
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" Title="Key Quantity" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="KeyQuantityId" AllowCellEditing="true" EnableColumnLines="true" DataIDField="KeyQuantityId" AllowSorting="true" SortField="DepartName,DisciplinesWBSName"
|
||||
runat="server" BoxFlex="1" DataKeyNames="KeyQuantityId" AllowCellEditing="true" EnableColumnLines="true" DataIDField="KeyQuantityId" AllowSorting="true" SortField="Identifier,Descipline"
|
||||
SortDirection="ASC" OnSort="Grid2_Sort"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid2_PageIndexChange" EnableTextSelection="true">
|
||||
<Columns>
|
||||
<f:RenderField Width="140px" ColumnID="ProjectControl_JobNo" DataField="ProjectControl_JobNo" SortField="ProjectControl_JobNo"
|
||||
FieldType="String" HeaderText="Job No" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="DepartName" DataField="DepartName" SortField="DepartName"
|
||||
<%--<f:RenderField Width="100px" ColumnID="DepartName" DataField="DepartName" SortField="DepartName"
|
||||
FieldType="String" HeaderText="Type" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>--%>
|
||||
<f:RenderField Width="80px" ColumnID="Identifier" DataField="Identifier"
|
||||
SortField="Identifier" FieldType="String" HeaderText="Identifier" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="80px" ColumnID="DisciplinesWBSCode" DataField="DisciplinesWBSCode"
|
||||
SortField="DisciplinesWBSCode" FieldType="String" HeaderText="Identifier" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="180px" ColumnID="DisciplinesWBSName" DataField="DisciplinesWBSName"
|
||||
<f:RenderField Width="180px" ColumnID="Descipline" DataField="Descipline"
|
||||
FieldType="String" HeaderText="Descipline" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="QuantityDesctiption" DataField="QuantityDesctiption"
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" BodyPadding="10px" Margin="0 5px 0 0" AutoScroll="true" runat="server" EnableCollapse="true" Title="FCR Log" ShowHeader="false">
|
||||
<f:Panel ID="Panel1" BodyPadding="10px" Margin="5px 5px 5px 5px" AutoScroll="true" runat="server" EnableCollapse="true" Title="FCR Log" ShowHeader="false">
|
||||
<Items>
|
||||
<f:Form ID="Form2" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
runat="server" RedStarPosition="BeforeText" LabelAlign="Right" BodyPadding="10px">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownBox runat="server" ID="drpKeyId" LabelWidth="120px" EmptyText="请从下拉表格中选择" Label="Type" MatchFieldWidth="false" AutoPostBack="true" OnTextChanged="drpKeyId_TextChanged">
|
||||
<%--<f:DropDownBox runat="server" ID="drpKeyId" LabelWidth="120px" EmptyText="请从下拉表格中选择" Label="Type" MatchFieldWidth="false" AutoPostBack="true" OnTextChanged="drpKeyId_TextChanged">
|
||||
<PopPanel>
|
||||
<f:Grid ID="Grid1" Width="650px" Height="300px" Hidden="true"
|
||||
DataIDField="KeyId" DataTextField="DepartName"
|
||||
@@ -55,32 +55,28 @@
|
||||
</Toolbars>
|
||||
</f:Grid>
|
||||
</PopPanel>
|
||||
</f:DropDownBox>
|
||||
<f:TextBox ID="txtIdentifier" runat="server" Label="Identifier" LabelWidth="200px" Readonly="true"></f:TextBox>
|
||||
</f:DropDownBox>--%>
|
||||
<f:DropDownList ID="drpIdentifier" runat="server" Label="Identifier" LabelWidth="200px" AutoPostBack="true" OnSelectedIndexChanged="drpIdentifier_SelectedIndexChanged" EnableEdit="true"></f:DropDownList>
|
||||
<f:DropDownList ID="drpDescipline" runat="server" Label="Descipline" LabelWidth="200px" AutoPostBack="true" OnSelectedIndexChanged="drpDescipline_SelectedIndexChanged" EnableEdit="true"></f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtDescipline" runat="server" Label="Descipline" LabelWidth="120px" Readonly="true"></f:TextBox>
|
||||
<f:TextBox ID="txtQuantityDesctiption" runat="server" Label="Quantity Desctiption" LabelWidth="200px" Readonly="true"></f:TextBox>
|
||||
<f:DropDownList ID="drpQuantityDesctiption" runat="server" Label="Quantity Desctiption" LabelWidth="200px" AutoPostBack="true" OnSelectedIndexChanged="drpQuantityDesctiption_SelectedIndexChanged" EnableEdit="true"></f:DropDownList>
|
||||
<f:DropDownList ID="drpPlanMHRsUnit" runat="server" Label="Plan MHRs/Unit" LabelWidth="200px" EnableEdit="true"></f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox ID="txtInputQuantity" runat="server" Label="Input Quantity" LabelWidth="120px" NoNegative="true" AutoPostBack="true" OnTextChanged="txtInputQuantity_TextChanged"></f:NumberBox>
|
||||
<f:NumberBox ID="txtPlanMHRsUnit" runat="server" Label="Plan MHRs/Unit" LabelWidth="200px" Readonly="true"></f:NumberBox>
|
||||
<f:NumberBox ID="txtInputQuantity" runat="server" Label="Input Quantity" LabelWidth="200px" NoNegative="true" AutoPostBack="true" OnTextChanged="txtInputQuantity_TextChanged"></f:NumberBox>
|
||||
<%--<f:NumberBox ID="txtPlanMHRsUnit" runat="server" Label="Plan MHRs/Unit" LabelWidth="200px" Readonly="true"></f:NumberBox>--%>
|
||||
<f:NumberBox ID="txtPlanMHRs" runat="server" Label="Plan MHRs" LabelWidth="200px" Readonly="true"></f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox ID="txtPlanMHRs" runat="server" Label="Plan MHRs" LabelWidth="120px" Readonly="true"></f:NumberBox>
|
||||
<f:NumberBox ID="txtPlanMHRsSummary" runat="server" Label="Plan MHRs Summary" LabelWidth="200px" Readonly="true"></f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox ID="txtActualMHRs" runat="server" Label="Actual MHRs" LabelWidth="120px" Readonly="true"></f:NumberBox>
|
||||
<f:Label ID="Label1" runat="server"></f:Label>
|
||||
<f:NumberBox ID="txtActualMHRs" runat="server" Label="Actual MHRs" LabelWidth="200px" Readonly="true"></f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace FineUIPro.Web.EditorManage
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
BindGrid();
|
||||
//BindGrid();
|
||||
string view = Request.Params["view"];
|
||||
if (view == "1")
|
||||
{
|
||||
@@ -63,6 +63,12 @@ namespace FineUIPro.Web.EditorManage
|
||||
{
|
||||
GetButtonPower();
|
||||
}
|
||||
|
||||
BLL.QuantityDesctiptionService.InitIdentifierDropDownList(this.drpIdentifier, true);
|
||||
Funs.FineUIPleaseSelect(this.drpDescipline);
|
||||
Funs.FineUIPleaseSelect(this.drpQuantityDesctiption);
|
||||
Funs.FineUIPleaseSelect(this.drpPlanMHRsUnit);
|
||||
|
||||
this.ProjectId = Request.Params["eProjectId"];
|
||||
this.KeyQuantityId = Request.Params["keyQuantityId"];
|
||||
if (!string.IsNullOrEmpty(this.KeyQuantityId))
|
||||
@@ -71,31 +77,64 @@ namespace FineUIPro.Web.EditorManage
|
||||
if (keyQuantity != null)
|
||||
{
|
||||
this.ProjectId = keyQuantity.EProjectId;
|
||||
this.drpKeyId.Value = keyQuantity.KeyId;
|
||||
var key = BLL.QuantityDesctiptionService.GetQuantityDesctiptionById(this.drpKeyId.Value);
|
||||
if (key != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(key.DisciplinesWBSId))
|
||||
{
|
||||
var wbs = BLL.DisciplinesWBSService.GetDisciplinesWBSById(key.DisciplinesWBSId);
|
||||
if (wbs != null)
|
||||
{
|
||||
this.txtIdentifier.Text = wbs.DisciplinesWBSCode;
|
||||
this.txtDescipline.Text = wbs.DisciplinesWBSName;
|
||||
}
|
||||
//this.drpKeyId.Value = keyQuantity.KeyId;
|
||||
//var key = BLL.QuantityDesctiptionService.GetQuantityDesctiptionById(this.drpKeyId.Value);
|
||||
//if (key != null)
|
||||
//{
|
||||
// if (!string.IsNullOrEmpty(key.DisciplinesWBSId))
|
||||
// {
|
||||
// var wbs = BLL.DisciplinesWBSService.GetDisciplinesWBSById(key.DisciplinesWBSId);
|
||||
// if (wbs != null)
|
||||
// {
|
||||
// this.txtIdentifier.Text = wbs.DisciplinesWBSCode;
|
||||
// this.txtDescipline.Text = wbs.DisciplinesWBSName;
|
||||
// }
|
||||
|
||||
this.txtPlanMHRsSummary.Text = BLL.KeyQuantityService.GetSumPlanMHRsByKeyId(this.drpKeyId.Value).ToString();
|
||||
double? actualHoursSum = (from x in Funs.DB.ManHours_Actual
|
||||
where x.EProjectId == this.ProjectId
|
||||
&& x.Discipline == wbs.DisciplinesWBSName
|
||||
select x.Hours).Sum();
|
||||
this.txtActualMHRs.Text = actualHoursSum.ToString();
|
||||
// this.txtPlanMHRsSummary.Text = BLL.KeyQuantityService.GetSumPlanMHRsByKeyId(this.drpKeyId.Value).ToString();
|
||||
// double? actualHoursSum = (from x in Funs.DB.ManHours_Actual
|
||||
// where x.EProjectId == this.ProjectId
|
||||
// && x.Discipline == wbs.DisciplinesWBSName
|
||||
// select x.Hours).Sum();
|
||||
// this.txtActualMHRs.Text = actualHoursSum.ToString();
|
||||
// }
|
||||
// txtQuantityDesctiption.Text = key.QuantityDesctiption;
|
||||
// txtPlanMHRsUnit.Text = key.PlanMHRsUnit.HasValue ? key.PlanMHRsUnit.ToString() : "";
|
||||
//}
|
||||
if (!string.IsNullOrEmpty(keyQuantity.Identifier))
|
||||
{
|
||||
this.drpIdentifier.Items.Clear();
|
||||
BLL.QuantityDesctiptionService.InitIdentifierDropDownList(this.drpIdentifier, true);
|
||||
this.drpIdentifier.SelectedValue = keyQuantity.Identifier;
|
||||
|
||||
if (!string.IsNullOrEmpty(keyQuantity.Descipline))
|
||||
{
|
||||
this.drpDescipline.Items.Clear();
|
||||
BLL.QuantityDesctiptionService.InitDesciplineDropDownList(this.drpDescipline, true, keyQuantity.Identifier);
|
||||
this.drpDescipline.SelectedValue = keyQuantity.Descipline;
|
||||
|
||||
if (!string.IsNullOrEmpty(keyQuantity.QuantityDesctiption))
|
||||
{
|
||||
this.drpQuantityDesctiption.Items.Clear();
|
||||
BLL.QuantityDesctiptionService.InitQuantityDesctiptionDropDownList(this.drpQuantityDesctiption, true, keyQuantity.Identifier, keyQuantity.Descipline);
|
||||
this.drpQuantityDesctiption.SelectedValue = keyQuantity.QuantityDesctiption;
|
||||
|
||||
if (keyQuantity.PlanMHRsUnit.HasValue)
|
||||
{
|
||||
this.drpPlanMHRsUnit.Items.Clear();
|
||||
BLL.QuantityDesctiptionService.InitPlanMHRsUnitDropDownList(this.drpPlanMHRsUnit, true, keyQuantity.Identifier, keyQuantity.Descipline, keyQuantity.QuantityDesctiption);
|
||||
this.drpPlanMHRsUnit.SelectedValue = keyQuantity.PlanMHRsUnit.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
txtQuantityDesctiption.Text = key.QuantityDesctiption;
|
||||
txtPlanMHRsUnit.Text = key.PlanMHRsUnit.HasValue ? key.PlanMHRsUnit.ToString() : "";
|
||||
}
|
||||
this.txtPlanMHRsSummary.Text = BLL.KeyQuantityService.GetSumPlanMHRsByKeyId(keyQuantity.EProjectId,keyQuantity.Identifier, keyQuantity.Descipline).ToString();
|
||||
this.txtInputQuantity.Text = keyQuantity.InputQuantity.HasValue ? keyQuantity.InputQuantity.ToString() : "";
|
||||
this.txtPlanMHRs.Text = keyQuantity.PlanMHRs.HasValue ? keyQuantity.PlanMHRs.ToString() : "";
|
||||
double? actualHoursSum = (from x in Funs.DB.ManHours_Actual
|
||||
where x.EProjectId == this.ProjectId
|
||||
&& x.Discipline == keyQuantity.Descipline
|
||||
select x.Hours).Sum();
|
||||
this.txtActualMHRs.Text = actualHoursSum.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -106,34 +145,34 @@ namespace FineUIPro.Web.EditorManage
|
||||
/// <summary>
|
||||
/// 数据绑定
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT qd.KeyId,
|
||||
qd.DepartId,
|
||||
qd.DisciplinesWBSId,
|
||||
qd.QuantityDesctiption,
|
||||
qd.PlanMHRsUnit,
|
||||
d.DepartName,
|
||||
wbs.DisciplinesWBSCode,
|
||||
wbs.DisciplinesWBSName
|
||||
FROM Base_QuantityDesctiption qd
|
||||
left join Base_Depart as d on qd.DepartId = d.DepartId
|
||||
left join Base_DisciplinesWBS as wbs on wbs.DisciplinesWBSId = qd.DisciplinesWBSId WHERE 1=1";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (!string.IsNullOrEmpty(this.txtSearch.Text.Trim()))
|
||||
{
|
||||
strSql += " AND d.DepartName like @DepartName ";
|
||||
listStr.Add(new SqlParameter("@DepartName", "%" + this.txtSearch.Text.Trim() + "%"));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
// 2.获取当前分页数据
|
||||
//var table = this.GetPagedDataTable(Grid1, tb1);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
//private void BindGrid()
|
||||
//{
|
||||
// string strSql = @"SELECT qd.KeyId,
|
||||
// qd.DepartId,
|
||||
// qd.DisciplinesWBSId,
|
||||
// qd.QuantityDesctiption,
|
||||
// qd.PlanMHRsUnit,
|
||||
// d.DepartName,
|
||||
// wbs.DisciplinesWBSCode,
|
||||
// wbs.DisciplinesWBSName
|
||||
// FROM Base_QuantityDesctiption qd
|
||||
// left join Base_Depart as d on qd.DepartId = d.DepartId
|
||||
// left join Base_DisciplinesWBS as wbs on wbs.DisciplinesWBSId = qd.DisciplinesWBSId WHERE 1=1";
|
||||
// List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
// if (!string.IsNullOrEmpty(this.txtSearch.Text.Trim()))
|
||||
// {
|
||||
// strSql += " AND d.DepartName like @DepartName ";
|
||||
// listStr.Add(new SqlParameter("@DepartName", "%" + this.txtSearch.Text.Trim() + "%"));
|
||||
// }
|
||||
// SqlParameter[] parameter = listStr.ToArray();
|
||||
// DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
// // 2.获取当前分页数据
|
||||
// //var table = this.GetPagedDataTable(Grid1, tb1);
|
||||
// Grid1.RecordCount = tb.Rows.Count;
|
||||
// var table = this.GetPagedDataTable(Grid1, tb);
|
||||
// Grid1.DataSource = table;
|
||||
// Grid1.DataBind();
|
||||
//}
|
||||
#endregion
|
||||
|
||||
#region 分页、排序
|
||||
@@ -142,59 +181,73 @@ namespace FineUIPro.Web.EditorManage
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
Grid1.PageIndex = e.NewPageIndex;
|
||||
BindGrid();
|
||||
}
|
||||
//protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
//{
|
||||
// Grid1.PageIndex = e.NewPageIndex;
|
||||
// BindGrid();
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 分页显示条数下拉框
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
}
|
||||
//protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
//{
|
||||
// Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
// BindGrid();
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
||||
{
|
||||
Grid1.SortDirection = e.SortDirection;
|
||||
Grid1.SortField = e.SortField;
|
||||
BindGrid();
|
||||
}
|
||||
//protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
||||
//{
|
||||
// Grid1.SortDirection = e.SortDirection;
|
||||
// Grid1.SortField = e.SortField;
|
||||
// BindGrid();
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 筛选
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtSearch_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
//protected void txtSearch_TextChanged(object sender, EventArgs e)
|
||||
//{
|
||||
// BindGrid();
|
||||
//}
|
||||
#endregion
|
||||
|
||||
#region 保存
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpKeyId.Value == BLL.Const._Null || string.IsNullOrEmpty(this.drpKeyId.Value))
|
||||
if (this.drpIdentifier.SelectedValue == BLL.Const._Null || string.IsNullOrEmpty(this.drpIdentifier.SelectedValue))
|
||||
{
|
||||
ShowAlert("Please select Type!", MessageBoxIcon.Warning);
|
||||
ShowAlert("Please select Identifier!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.drpDescipline.SelectedValue == BLL.Const._Null || string.IsNullOrEmpty(this.drpDescipline.SelectedValue))
|
||||
{
|
||||
ShowAlert("Please select Descipline!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.drpQuantityDesctiption.SelectedValue == BLL.Const._Null || string.IsNullOrEmpty(this.drpQuantityDesctiption.SelectedValue))
|
||||
{
|
||||
ShowAlert("Please select Quantity Desctiption!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Model.Editor_KeyQuantity newKeyQuantity = new Model.Editor_KeyQuantity();
|
||||
newKeyQuantity.KeyId = this.drpKeyId.Value;
|
||||
//newKeyQuantity.KeyId = this.drpKeyId.Value;
|
||||
newKeyQuantity.InputQuantity = Funs.GetNewDecimal(this.txtInputQuantity.Text);
|
||||
newKeyQuantity.PlanMHRs = Funs.GetNewDecimal(this.txtPlanMHRs.Text);
|
||||
|
||||
newKeyQuantity.Identifier = this.drpIdentifier.SelectedText;
|
||||
newKeyQuantity.Descipline = this.drpDescipline.SelectedText;
|
||||
newKeyQuantity.QuantityDesctiption = this.drpQuantityDesctiption.SelectedText;
|
||||
newKeyQuantity.PlanMHRsUnit = Funs.GetNewDecimal(this.drpPlanMHRsUnit.SelectedText);
|
||||
|
||||
if (!string.IsNullOrEmpty(this.KeyQuantityId))
|
||||
{
|
||||
newKeyQuantity.KeyQuantityId = this.KeyQuantityId;
|
||||
@@ -221,41 +274,41 @@ namespace FineUIPro.Web.EditorManage
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpKeyId_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.txtIdentifier.Text = string.Empty;
|
||||
this.txtDescipline.Text = string.Empty;
|
||||
this.txtQuantityDesctiption.Text = string.Empty;
|
||||
this.txtPlanMHRsUnit.Text = string.Empty;
|
||||
this.txtPlanMHRsSummary.Text = string.Empty;
|
||||
if (!string.IsNullOrEmpty(this.drpKeyId.Value))
|
||||
{
|
||||
var key = BLL.QuantityDesctiptionService.GetQuantityDesctiptionById(this.drpKeyId.Value);
|
||||
if (key != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(key.DisciplinesWBSId))
|
||||
{
|
||||
var wbs = BLL.DisciplinesWBSService.GetDisciplinesWBSById(key.DisciplinesWBSId);
|
||||
if (wbs != null)
|
||||
{
|
||||
this.txtIdentifier.Text = wbs.DisciplinesWBSCode;
|
||||
this.txtDescipline.Text = wbs.DisciplinesWBSName;
|
||||
}
|
||||
//protected void drpKeyId_TextChanged(object sender, EventArgs e)
|
||||
//{
|
||||
// this.txtIdentifier.Text = string.Empty;
|
||||
// this.txtDescipline.Text = string.Empty;
|
||||
// this.txtQuantityDesctiption.Text = string.Empty;
|
||||
// this.txtPlanMHRsUnit.Text = string.Empty;
|
||||
// this.txtPlanMHRsSummary.Text = string.Empty;
|
||||
// if (!string.IsNullOrEmpty(this.drpKeyId.Value))
|
||||
// {
|
||||
// var key = BLL.QuantityDesctiptionService.GetQuantityDesctiptionById(this.drpKeyId.Value);
|
||||
// if (key != null)
|
||||
// {
|
||||
// if (!string.IsNullOrEmpty(key.DisciplinesWBSId))
|
||||
// {
|
||||
// var wbs = BLL.DisciplinesWBSService.GetDisciplinesWBSById(key.DisciplinesWBSId);
|
||||
// if (wbs != null)
|
||||
// {
|
||||
// this.txtIdentifier.Text = wbs.DisciplinesWBSCode;
|
||||
// this.txtDescipline.Text = wbs.DisciplinesWBSName;
|
||||
// }
|
||||
|
||||
decimal? s = BLL.KeyQuantityService.GetSumPlanMHRsByKeyId(this.drpKeyId.Value);
|
||||
this.txtPlanMHRsSummary.Text = (s + Funs.GetNewDecimal(this.txtPlanMHRs.Text)).ToString();
|
||||
// decimal? s = BLL.KeyQuantityService.GetSumPlanMHRsByKeyId(this.drpKeyId.Value);
|
||||
// this.txtPlanMHRsSummary.Text = (s + Funs.GetNewDecimal(this.txtPlanMHRs.Text)).ToString();
|
||||
|
||||
double? actualHoursSum = (from x in Funs.DB.ManHours_Actual
|
||||
where x.EProjectId == this.ProjectId
|
||||
&& x.Discipline == wbs.DisciplinesWBSName
|
||||
select x.Hours).Sum();
|
||||
this.txtActualMHRs.Text = actualHoursSum.ToString();
|
||||
}
|
||||
txtQuantityDesctiption.Text = key.QuantityDesctiption;
|
||||
txtPlanMHRsUnit.Text = key.PlanMHRsUnit.HasValue ? key.PlanMHRsUnit.ToString() : "";
|
||||
}
|
||||
}
|
||||
}
|
||||
// double? actualHoursSum = (from x in Funs.DB.ManHours_Actual
|
||||
// where x.EProjectId == this.ProjectId
|
||||
// && x.Discipline == wbs.DisciplinesWBSName
|
||||
// select x.Hours).Sum();
|
||||
// this.txtActualMHRs.Text = actualHoursSum.ToString();
|
||||
// }
|
||||
// txtQuantityDesctiption.Text = key.QuantityDesctiption;
|
||||
// txtPlanMHRsUnit.Text = key.PlanMHRsUnit.HasValue ? key.PlanMHRsUnit.ToString() : "";
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// Input Quantity输入事件
|
||||
@@ -268,9 +321,9 @@ namespace FineUIPro.Web.EditorManage
|
||||
this.txtPlanMHRsSummary.Text = string.Empty;
|
||||
if (!string.IsNullOrEmpty(this.txtInputQuantity.Text.Trim()))
|
||||
{
|
||||
this.txtPlanMHRs.Text = (Funs.GetNewDecimal(this.txtInputQuantity.Text) * Funs.GetNewDecimal(this.txtPlanMHRsUnit.Text)).ToString();
|
||||
this.txtPlanMHRs.Text = (Funs.GetNewDecimal(this.txtInputQuantity.Text) * Funs.GetNewDecimal(this.drpPlanMHRsUnit.SelectedText)).ToString();
|
||||
|
||||
decimal? s = BLL.KeyQuantityService.GetSumPlanMHRsByKeyId(this.drpKeyId.Value);
|
||||
decimal? s = BLL.KeyQuantityService.GetSumPlanMHRsByKeyId(this.ProjectId ,this.drpIdentifier.SelectedValue, this.drpDescipline.SelectedValue);
|
||||
if (s > 0)
|
||||
{
|
||||
this.txtPlanMHRsSummary.Text = (s + Funs.GetNewDecimal(this.txtPlanMHRs.Text)).ToString();
|
||||
@@ -281,6 +334,70 @@ namespace FineUIPro.Web.EditorManage
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Identifier 下拉选择
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpIdentifier_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
drpDescipline.Items.Clear();
|
||||
if (this.drpIdentifier.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpIdentifier.SelectedValue))
|
||||
{
|
||||
BLL.QuantityDesctiptionService.InitDesciplineDropDownList(this.drpDescipline, true, this.drpIdentifier.SelectedValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
Funs.FineUIPleaseSelect(this.drpDescipline);
|
||||
}
|
||||
this.drpDescipline.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Descipline下拉选择
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpDescipline_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.txtActualMHRs.Text = string.Empty;
|
||||
drpQuantityDesctiption.Items.Clear();
|
||||
if (this.drpDescipline.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpDescipline.SelectedValue))
|
||||
{
|
||||
BLL.QuantityDesctiptionService.InitQuantityDesctiptionDropDownList(this.drpQuantityDesctiption, true, this.drpIdentifier.SelectedValue, this.drpDescipline.SelectedValue);
|
||||
|
||||
double? actualHoursSum = (from x in Funs.DB.ManHours_Actual
|
||||
where x.EProjectId == this.ProjectId
|
||||
&& x.Discipline == this.drpDescipline.SelectedValue
|
||||
select x.Hours).Sum();
|
||||
this.txtActualMHRs.Text = actualHoursSum.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
Funs.FineUIPleaseSelect(this.drpQuantityDesctiption);
|
||||
}
|
||||
this.drpQuantityDesctiption.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Quantity Desctiption下拉选择
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpQuantityDesctiption_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.drpPlanMHRsUnit.Items.Clear();
|
||||
if (this.drpQuantityDesctiption.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpQuantityDesctiption.SelectedValue))
|
||||
{
|
||||
BLL.QuantityDesctiptionService.InitPlanMHRsUnitDropDownList(this.drpPlanMHRsUnit, true, this.drpIdentifier.SelectedValue, this.drpDescipline.SelectedValue, this.drpQuantityDesctiption.SelectedValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
Funs.FineUIPleaseSelect(this.drpPlanMHRsUnit);
|
||||
}
|
||||
this.drpPlanMHRsUnit.SelectedIndex = 0;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 权限设置
|
||||
@@ -298,6 +415,6 @@ namespace FineUIPro.Web.EditorManage
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+8
-71
@@ -51,85 +51,40 @@ namespace FineUIPro.Web.EditorManage
|
||||
protected global::FineUIPro.Form Form2;
|
||||
|
||||
/// <summary>
|
||||
/// drpKeyId 控件。
|
||||
/// drpIdentifier 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownBox drpKeyId;
|
||||
protected global::FineUIPro.DropDownList drpIdentifier;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// drpDescipline 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
protected global::FineUIPro.DropDownList drpDescipline;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// drpQuantityDesctiption 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
protected global::FineUIPro.DropDownList drpQuantityDesctiption;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// drpPlanMHRsUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// txtSearch 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtSearch;
|
||||
|
||||
/// <summary>
|
||||
/// txtIdentifier 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtIdentifier;
|
||||
|
||||
/// <summary>
|
||||
/// txtDescipline 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtDescipline;
|
||||
|
||||
/// <summary>
|
||||
/// txtQuantityDesctiption 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtQuantityDesctiption;
|
||||
protected global::FineUIPro.DropDownList drpPlanMHRsUnit;
|
||||
|
||||
/// <summary>
|
||||
/// txtInputQuantity 控件。
|
||||
@@ -140,15 +95,6 @@ namespace FineUIPro.Web.EditorManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtInputQuantity;
|
||||
|
||||
/// <summary>
|
||||
/// txtPlanMHRsUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtPlanMHRsUnit;
|
||||
|
||||
/// <summary>
|
||||
/// txtPlanMHRs 控件。
|
||||
/// </summary>
|
||||
@@ -176,15 +122,6 @@ namespace FineUIPro.Web.EditorManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtActualMHRs;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="Key Quantity" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="KeyQuantityId" AllowCellEditing="true" EnableColumnLines="true"
|
||||
ClicksToEdit="2" DataIDField="KeyQuantityId" AllowSorting="true" SortField="DepartName,DisciplinesWBSName"
|
||||
ClicksToEdit="2" DataIDField="KeyQuantityId" AllowSorting="true" SortField="Identifier,Descipline"
|
||||
SortDirection="ASC" OnSort="Grid1_Sort"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="true">
|
||||
@@ -36,13 +36,13 @@
|
||||
<f:RenderField Width="120px" ColumnID="ProjectControl_JobNo" DataField="ProjectControl_JobNo" SortField="ProjectControl_JobNo"
|
||||
FieldType="String" HeaderText="Job No" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="DepartName" DataField="DepartName" SortField="DepartName"
|
||||
<%--<f:RenderField Width="100px" ColumnID="DepartName" DataField="DepartName" SortField="DepartName"
|
||||
FieldType="String" HeaderText="Type" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>--%>
|
||||
<f:RenderField Width="80px" ColumnID="Identifier" DataField="Identifier"
|
||||
SortField="Identifier" FieldType="String" HeaderText="Identifier" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="80px" ColumnID="DisciplinesWBSCode" DataField="DisciplinesWBSCode"
|
||||
SortField="DisciplinesWBSCode" FieldType="String" HeaderText="Identifier" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="180px" ColumnID="DisciplinesWBSName" DataField="DisciplinesWBSName"
|
||||
<f:RenderField Width="180px" ColumnID="Descipline" DataField="Descipline"
|
||||
FieldType="String" HeaderText="Descipline" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="QuantityDesctiption" DataField="QuantityDesctiption"
|
||||
|
||||
@@ -643,8 +643,10 @@ namespace FineUIPro.Web.EditorManage
|
||||
}
|
||||
|
||||
// 后加:当PM中Milestone(Actual)的Project Approval不为空并且IFC ALL的ReceiveHC不为空,状态为In Procurement
|
||||
//或者当PM中Milestone(Actual)的Project Approval不为空并且IFC NA的ReceiveHC不为空,状态为In Procurement
|
||||
var con_all = from x in Funs.DB.Editor_TDC where x.EProjectId == epro.EProjectId && x.Type == "D01_IFC" && x.Disc == "00_ALL" && x.ReceiveHC.HasValue select x;
|
||||
if (epro.ProjectControl_JobType != "Other" && epro.PM_MA_ProjectApproval.HasValue && con_all.Count() > 0)
|
||||
var con_na = from x in Funs.DB.Editor_TDC where x.EProjectId == epro.EProjectId && x.Type == "D01_IFC" && x.Disc == "90_NA" && x.ReceiveHC.HasValue select x;
|
||||
if (epro.ProjectControl_JobType != "Other" && epro.PM_MA_ProjectApproval.HasValue && (con_all.Count() > 0 || con_na.Count() > 0))
|
||||
{
|
||||
if (eproject.ProjectControl_JobStatus == null || eproject.ProjectControl_JobStatus == "" || eproject.ProjectControl_JobStatus == "Detailed Design" || eproject.ProjectControl_JobStatus == "On Going" || eproject.ProjectControl_JobStatus == "Study" || eproject.ProjectControl_JobStatus == "Not Start")
|
||||
{
|
||||
|
||||
@@ -223,14 +223,14 @@ namespace FineUIPro.Web.EditorManage
|
||||
|
||||
// 后加:当PM中Milestone(Actual)的Project Approval不为空并且IFC ALL的ReceiveHC不为空,状态为In Procurement
|
||||
var con_all = from x in Funs.DB.Editor_TDC where x.EProjectId == eproject.EProjectId && x.Type == "D01_IFC" && x.Disc == "00_ALL" && x.ReceiveHC.HasValue select x;
|
||||
if (eproject.ProjectControl_JobType != "Other" && eproject.PM_MA_ProjectApproval.HasValue && con_all.Count() > 0)
|
||||
var con_na = from x in Funs.DB.Editor_TDC where x.EProjectId == eproject.EProjectId && x.Type == "D01_IFC" && x.Disc == "90_NA" && x.ReceiveHC.HasValue select x;
|
||||
if (eproject.ProjectControl_JobType != "Other" && eproject.PM_MA_ProjectApproval.HasValue && (con_all.Count() > 0 || con_na.Count() > 0))
|
||||
{
|
||||
if (eproject.ProjectControl_JobStatus == null || eproject.ProjectControl_JobStatus == "" || eproject.ProjectControl_JobStatus == "Detailed Design" || eproject.ProjectControl_JobStatus == "On Going" || eproject.ProjectControl_JobStatus == "Study" || eproject.ProjectControl_JobStatus == "Not Start")
|
||||
{
|
||||
eproject.ProjectControl_JobStatus = "In Procurement";
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
if ((eproject.Permit_PS_SafetyFinalAcc.HasValue && eproject.Permit_PA_SafetyFinalACC.HasValue
|
||||
|
||||
Reference in New Issue
Block a user