升级
This commit is contained in:
@@ -36,21 +36,21 @@
|
||||
<Items>
|
||||
<f:DropDownList ID="ddlHelperMethod" runat="server" Label="辅助方法" LabelWidth="120px">
|
||||
</f:DropDownList>
|
||||
<f:TextBox ID="txtHazardJudge_L" runat="server" Label="作业条件危险性评价(L)" LabelWidth="120px">
|
||||
<f:TextBox ID="txtHazardJudge_L" runat="server" Label="作业条件危险性评价(L)" LabelWidth="120px" AutoPostBack="true" OnTextChanged="txtHazardJudge_TextChanged">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtHazardJudge_E" runat="server" Label="作业条件危险性评价(E)" LabelWidth="120px">
|
||||
<f:TextBox ID="txtHazardJudge_E" runat="server" Label="作业条件危险性评价(E)" LabelWidth="120px" AutoPostBack="true" OnTextChanged="txtHazardJudge_TextChanged">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtHazardJudge_C" runat="server" Label="作业条件危险性评价(C)" LabelWidth="120px">
|
||||
<f:TextBox ID="txtHazardJudge_C" runat="server" Label="作业条件危险性评价(C)" LabelWidth="120px" AutoPostBack="true" OnTextChanged="txtHazardJudge_TextChanged">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtHazardJudge_D" runat="server" Label="作业条件危险性评价(D)" LabelWidth="120px">
|
||||
<f:TextBox ID="txtHazardJudge_D" runat="server" Label="作业条件危险性评价(D)" LabelWidth="120px" >
|
||||
</f:TextBox>
|
||||
<f:DropDownList ID="ddlHazardLevel" runat="server" Label="危险级别" LabelWidth="120px">
|
||||
</f:DropDownList>
|
||||
|
||||
@@ -245,5 +245,20 @@ namespace FineUIPro.Web.HSSE.Technique
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void txtHazardJudge_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.txtHazardJudge_L.Text) && !string.IsNullOrEmpty(this.txtHazardJudge_E.Text) && !string.IsNullOrEmpty(this.txtHazardJudge_C.Text))
|
||||
{
|
||||
decimal D = decimal.Parse(this.txtHazardJudge_L.Text) * decimal.Parse(this.txtHazardJudge_E.Text) * decimal.Parse(this.txtHazardJudge_C.Text);
|
||||
this.txtHazardJudge_D.Text = D.ToString("0.0");
|
||||
var riskLevel = Funs.DB.Base_RiskLevel.FirstOrDefault(x => (!x.MinValue.HasValue || x.MinValue <= D) && (D <= x.MaxValue || !x.MaxValue.HasValue));
|
||||
if (riskLevel != null)
|
||||
{
|
||||
this.ddlHazardLevel.SelectedValue = riskLevel.RiskLevel.Value.ToString();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user