20250226 key Quantity 下拉修改

This commit is contained in:
毕文静 2025-02-26 15:34:50 +08:00
parent 7484fb2ee3
commit 089b331b0a
6 changed files with 163 additions and 26 deletions

View File

@ -91,7 +91,7 @@ namespace BLL
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName);
Funs.FineUIPleaseSelect(dropName,"-请选择-");
}
}
@ -114,7 +114,7 @@ namespace BLL
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName);
Funs.FineUIPleaseSelect(dropName, "-请选择-");
}
}
@ -137,7 +137,7 @@ namespace BLL
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName);
Funs.FineUIPleaseSelect(dropName, "-请选择-");
}
}
@ -160,7 +160,7 @@ namespace BLL
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName);
Funs.FineUIPleaseSelect(dropName, "-请选择-");
}
}

View File

@ -34,10 +34,10 @@
FieldType="String" HeaderText="Identifier" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="120px" ColumnID="DisciplinesWBSName" DataField="DisciplinesWBSName"
FieldType="String" HeaderText="Descipline" HeaderTextAlign="Center" TextAlign="Left">
FieldType="String" HeaderText="Discipline" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="QuantityDesctiption" DataField="QuantityDesctiption"
FieldType="String" HeaderText="Quantity Desctiption" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
FieldType="String" HeaderText="Quantity Description" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
</f:RenderField>
<f:RenderField Width="150px" ColumnID="PlanMHRsUnit" DataField="PlanMHRsUnit"
FieldType="String" HeaderText="Plan MHRs/Unit" HeaderTextAlign="Center" TextAlign="Left">
@ -67,11 +67,11 @@
<f:HiddenField ID="hfFormID" runat="server">
</f:HiddenField>
<f:DropDownList ID="drpType" runat="server" Label="Type" LabelAlign="Right" LabelWidth="120px" EnableEdit="true" Required="true" ShowRedStar="true"></f:DropDownList>
<f:DropDownList ID="drpDisciplinesWBSId" runat="server" Label="Descipline" LabelAlign="Right" LabelWidth="120px" EnableEdit="true" Required="true" ShowRedStar="true" AutoPostBack="true" OnSelectedIndexChanged="drpDisciplinesWBSId_SelectedIndexChanged"></f:DropDownList>
<f:DropDownList ID="drpDisciplinesWBSId" runat="server" Label="Discipline" LabelAlign="Right" LabelWidth="120px" EnableEdit="true" Required="true" ShowRedStar="true" AutoPostBack="true" OnSelectedIndexChanged="drpDisciplinesWBSId_SelectedIndexChanged"></f:DropDownList>
<f:TextBox ID="txtDisciplinesWBSCode" Label="Identifier" ShowRedStar="true" Required="true"
runat="server" LabelAlign="right" LabelWidth="120px">
</f:TextBox>
<f:TextArea ID="txtQuantityDesctiption" Label="Quantity Desctiption" ShowRedStar="true" Required="true"
<f:TextArea ID="txtQuantityDesctiption" Label="Quantity Description" ShowRedStar="true" Required="true"
runat="server" LabelAlign="right" LabelWidth="120px" MaxLength="200">
</f:TextArea>
<f:NumberBox ID="txtPlanMHRsUnit" runat="server" Label="Plan MHRs/Unit" LabelAlign="Right" LabelWidth="120px"></f:NumberBox>

View File

@ -149,10 +149,10 @@
SortField="Identifier" FieldType="String" HeaderText="Identifier" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="180px" ColumnID="Descipline" DataField="Descipline"
FieldType="String" HeaderText="Descipline" HeaderTextAlign="Center" TextAlign="Left">
FieldType="String" HeaderText="Discipline" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="QuantityDesctiption" DataField="QuantityDesctiption"
FieldType="String" HeaderText="Quantity Desctiption" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
FieldType="String" HeaderText="Quantity Description" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="InputQuantity" DataField="InputQuantity"
FieldType="String" HeaderText="Input Quantity" HeaderTextAlign="Center" TextAlign="Left">

View File

@ -62,8 +62,8 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpDescipline" runat="server" Label="Descipline" LabelWidth="200px" AutoPostBack="true" OnSelectedIndexChanged="drpDescipline_SelectedIndexChanged" EnableEdit="true"></f:DropDownList>
<f:DropDownList ID="drpQuantityDesctiption" runat="server" Label="Quantity Desctiption" LabelWidth="200px" AutoPostBack="true" OnSelectedIndexChanged="drpQuantityDesctiption_SelectedIndexChanged" EnableEdit="true"></f:DropDownList>
<f:DropDownList ID="drpDescipline" runat="server" Label="Discipline" LabelWidth="200px" AutoPostBack="true" OnSelectedIndexChanged="drpDescipline_SelectedIndexChanged" EnableEdit="true"></f:DropDownList>
<f:DropDownList ID="drpQuantityDesctiption" runat="server" Label="Quantity Description" LabelWidth="200px" AutoPostBack="true" OnSelectedIndexChanged="drpQuantityDesctiption_SelectedIndexChanged" EnableEdit="true"></f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>

View File

@ -71,11 +71,11 @@ namespace FineUIPro.Web.EditorManage
}
else
{
Funs.FineUIPleaseSelect(this.drpIdentifier);
Funs.FineUIPleaseSelect(this.drpIdentifier,"-请选择-");
}
Funs.FineUIPleaseSelect(this.drpDescipline);
Funs.FineUIPleaseSelect(this.drpQuantityDesctiption);
Funs.FineUIPleaseSelect(this.drpPlanMHRsUnit);
Funs.FineUIPleaseSelect(this.drpDescipline, "-请选择-");
Funs.FineUIPleaseSelect(this.drpQuantityDesctiption, "-请选择-");
Funs.FineUIPleaseSelect(this.drpPlanMHRsUnit, "-请选择-");
this.ProjectId = Request.Params["eProjectId"];
this.KeyQuantityId = Request.Params["keyQuantityId"];
@ -367,12 +367,71 @@ namespace FineUIPro.Web.EditorManage
if (this.drpType.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpType.SelectedValue))
{
BLL.QuantityDesctiptionService.InitIdentifierDropDownList(this.drpIdentifier, this.drpType.SelectedValue, true);
if (this.drpIdentifier.Items.Count == 2)
{
this.drpIdentifier.SelectedIndex = 1;
BLL.QuantityDesctiptionService.InitDesciplineDropDownList(this.drpDescipline, true, this.drpType.SelectedValue, this.drpIdentifier.SelectedValue);
if (this.drpDescipline.Items.Count == 2)
{
this.drpDescipline.SelectedIndex = 1;
BLL.QuantityDesctiptionService.InitQuantityDesctiptionDropDownList(this.drpQuantityDesctiption, true, this.drpType.SelectedValue, this.drpIdentifier.SelectedValue, this.drpDescipline.SelectedValue);
if (this.drpQuantityDesctiption.Items.Count == 2)
{
this.drpQuantityDesctiption.SelectedIndex = 1;
BLL.QuantityDesctiptionService.InitPlanMHRsUnitDropDownList(this.drpPlanMHRsUnit, true, this.drpType.SelectedValue, this.drpIdentifier.SelectedValue, this.drpDescipline.SelectedValue, this.drpQuantityDesctiption.SelectedValue);
if (this.drpPlanMHRsUnit.Items.Count == 2)
{
this.drpPlanMHRsUnit.SelectedIndex = 1;
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
{
this.drpPlanMHRsUnit.SelectedIndex = 0;
}
}
else
{
this.drpQuantityDesctiption.SelectedIndex = 0;
Funs.FineUIPleaseSelect(this.drpPlanMHRsUnit, "-请选择-");
this.drpPlanMHRsUnit.SelectedIndex = 0;
}
}
else
{
this.drpDescipline.SelectedIndex = 0;
Funs.FineUIPleaseSelect(this.drpQuantityDesctiption, "-请选择-");
this.drpQuantityDesctiption.SelectedIndex = 0;
Funs.FineUIPleaseSelect(this.drpPlanMHRsUnit, "-请选择-");
this.drpPlanMHRsUnit.SelectedIndex = 0;
}
}
else
{
this.drpIdentifier.SelectedIndex = 0;
Funs.FineUIPleaseSelect(this.drpDescipline, "-请选择-");
this.drpDescipline.SelectedIndex = 0;
Funs.FineUIPleaseSelect(this.drpQuantityDesctiption, "-请选择-");
this.drpQuantityDesctiption.SelectedIndex = 0;
Funs.FineUIPleaseSelect(this.drpPlanMHRsUnit, "-请选择-");
this.drpPlanMHRsUnit.SelectedIndex = 0;
}
}
else
{
Funs.FineUIPleaseSelect(this.drpIdentifier);
Funs.FineUIPleaseSelect(this.drpIdentifier, "-请选择-");
this.drpIdentifier.SelectedIndex = 0;
Funs.FineUIPleaseSelect(this.drpDescipline, "-请选择-");
this.drpDescipline.SelectedIndex = 0;
Funs.FineUIPleaseSelect(this.drpQuantityDesctiption, "-请选择-");
this.drpQuantityDesctiption.SelectedIndex = 0;
Funs.FineUIPleaseSelect(this.drpPlanMHRsUnit, "-请选择-");
this.drpPlanMHRsUnit.SelectedIndex = 0;
}
this.drpIdentifier.SelectedIndex = 0;
}
/// <summary>
@ -388,12 +447,61 @@ namespace FineUIPro.Web.EditorManage
if (this.drpIdentifier.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpIdentifier.SelectedValue) && this.drpType.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpType.SelectedValue))
{
BLL.QuantityDesctiptionService.InitDesciplineDropDownList(this.drpDescipline, true, this.drpType.SelectedValue, this.drpIdentifier.SelectedValue);
if (this.drpDescipline.Items.Count == 2)
{
this.drpDescipline.SelectedIndex = 1;
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();
BLL.QuantityDesctiptionService.InitQuantityDesctiptionDropDownList(this.drpQuantityDesctiption, true, this.drpType.SelectedValue, this.drpIdentifier.SelectedValue, this.drpDescipline.SelectedValue);
if (this.drpQuantityDesctiption.Items.Count == 2)
{
this.drpQuantityDesctiption.SelectedIndex = 1;
BLL.QuantityDesctiptionService.InitPlanMHRsUnitDropDownList(this.drpPlanMHRsUnit, true, this.drpType.SelectedValue, this.drpIdentifier.SelectedValue, this.drpDescipline.SelectedValue, this.drpQuantityDesctiption.SelectedValue);
if (this.drpPlanMHRsUnit.Items.Count == 2)
{
this.drpPlanMHRsUnit.SelectedIndex = 1;
double? actualHoursSum2 = (from x in Funs.DB.ManHours_Actual
where x.EProjectId == this.ProjectId
&& x.Discipline == this.drpDescipline.SelectedValue
select x.Hours).Sum();
this.txtActualMHRs.Text = actualHoursSum2.ToString();
}
else
{
this.drpPlanMHRsUnit.SelectedIndex = 0;
}
}
else
{
this.drpQuantityDesctiption.SelectedIndex = 0;
Funs.FineUIPleaseSelect(this.drpPlanMHRsUnit, "-请选择-");
this.drpPlanMHRsUnit.SelectedIndex = 0;
}
}
else
{
this.drpDescipline.SelectedIndex = 0;
Funs.FineUIPleaseSelect(this.drpQuantityDesctiption, "-请选择-");
this.drpQuantityDesctiption.SelectedIndex = 0;
Funs.FineUIPleaseSelect(this.drpPlanMHRsUnit, "-请选择-");
this.drpPlanMHRsUnit.SelectedIndex = 0;
}
}
else
{
Funs.FineUIPleaseSelect(this.drpDescipline);
Funs.FineUIPleaseSelect(this.drpDescipline, "-请选择-");
this.drpDescipline.SelectedIndex = 0;
Funs.FineUIPleaseSelect(this.drpQuantityDesctiption, "-请选择-");
this.drpQuantityDesctiption.SelectedIndex = 0;
Funs.FineUIPleaseSelect(this.drpPlanMHRsUnit, "-请选择-");
this.drpPlanMHRsUnit.SelectedIndex = 0;
}
this.drpDescipline.SelectedIndex = 0;
}
/// <summary>
@ -409,6 +517,25 @@ namespace FineUIPro.Web.EditorManage
if (this.drpType.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpType.SelectedValue) && this.drpIdentifier.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpIdentifier.SelectedValue) && this.drpDescipline.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpDescipline.SelectedValue))
{
BLL.QuantityDesctiptionService.InitQuantityDesctiptionDropDownList(this.drpQuantityDesctiption, true, this.drpType.SelectedValue, this.drpIdentifier.SelectedValue, this.drpDescipline.SelectedValue);
if (this.drpQuantityDesctiption.Items.Count == 2)
{
this.drpQuantityDesctiption.SelectedIndex = 1;
BLL.QuantityDesctiptionService.InitPlanMHRsUnitDropDownList(this.drpPlanMHRsUnit, true, this.drpType.SelectedValue, this.drpIdentifier.SelectedValue, this.drpDescipline.SelectedValue, this.drpQuantityDesctiption.SelectedValue);
if (this.drpPlanMHRsUnit.Items.Count == 2)
{
this.drpPlanMHRsUnit.SelectedIndex = 1;
}
else
{
this.drpPlanMHRsUnit.SelectedIndex = 0;
}
}
else
{
this.drpQuantityDesctiption.SelectedIndex = 0;
Funs.FineUIPleaseSelect(this.drpPlanMHRsUnit, "-请选择-");
this.drpPlanMHRsUnit.SelectedIndex = 0;
}
double? actualHoursSum = (from x in Funs.DB.ManHours_Actual
where x.EProjectId == this.ProjectId
@ -418,9 +545,11 @@ namespace FineUIPro.Web.EditorManage
}
else
{
Funs.FineUIPleaseSelect(this.drpQuantityDesctiption);
Funs.FineUIPleaseSelect(this.drpQuantityDesctiption, "-请选择-");
this.drpQuantityDesctiption.SelectedIndex = 0;
Funs.FineUIPleaseSelect(this.drpPlanMHRsUnit, "-请选择-");
this.drpPlanMHRsUnit.SelectedIndex = 0;
}
this.drpQuantityDesctiption.SelectedIndex = 0;
}
/// <summary>
@ -434,12 +563,20 @@ namespace FineUIPro.Web.EditorManage
if (this.drpType.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpType.SelectedValue) && this.drpIdentifier.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpIdentifier.SelectedValue) && this.drpDescipline.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpDescipline.SelectedValue) && this.drpQuantityDesctiption.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpQuantityDesctiption.SelectedValue))
{
BLL.QuantityDesctiptionService.InitPlanMHRsUnitDropDownList(this.drpPlanMHRsUnit, true, this.drpType.SelectedValue, this.drpIdentifier.SelectedValue, this.drpDescipline.SelectedValue, this.drpQuantityDesctiption.SelectedValue);
if (this.drpPlanMHRsUnit.Items.Count == 2)
{
this.drpPlanMHRsUnit.SelectedIndex = 1;
}
else
{
this.drpPlanMHRsUnit.SelectedIndex = 0;
}
}
else
{
Funs.FineUIPleaseSelect(this.drpPlanMHRsUnit);
Funs.FineUIPleaseSelect(this.drpPlanMHRsUnit, "-请选择-");
this.drpPlanMHRsUnit.SelectedIndex = 0;
}
this.drpPlanMHRsUnit.SelectedIndex = 0;
}
#endregion

View File

@ -43,10 +43,10 @@
SortField="Identifier" FieldType="String" HeaderText="Identifier" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="180px" ColumnID="Descipline" DataField="Descipline"
FieldType="String" HeaderText="Descipline" HeaderTextAlign="Center" TextAlign="Left">
FieldType="String" HeaderText="Discipline" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="QuantityDesctiption" DataField="QuantityDesctiption"
FieldType="String" HeaderText="Quantity Desctiption" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
FieldType="String" HeaderText="Quantity Description" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="InputQuantity" DataField="InputQuantity"
FieldType="String" HeaderText="Input Quantity" HeaderTextAlign="Center" TextAlign="Left">