提交代码

This commit is contained in:
2024-06-06 15:53:34 +08:00
parent d554e7a6c9
commit b9563c6531
2 changed files with 29 additions and 5 deletions
@@ -26,7 +26,7 @@
<f:FormRow>
<Items>
<f:RadioButtonList ID="rbCheckResult" Label="检查结果" runat="server" ColumnNumber="1" ShowRedStar="true" Required="true">
<f:RadioButtonList ID="rbCheckResult" Label="检查结果" runat="server" ColumnNumber="1" ShowRedStar="true" Required="true" AutoPostBack="true" OnSelectedIndexChanged="rbCheckResult_SelectedIndexChanged">
<f:RadioItem Text="符合" Value="符合" />
<f:RadioItem Text="不符合" Value="不符合" />
</f:RadioButtonList>
@@ -69,7 +69,15 @@ namespace FineUIPro.Web.HSSE.Hazard
{
rbRectification.SelectedValue = constructionRiskControl.Rectification;
}
}
}
if (this.rbCheckResult.SelectedValue == "符合")
{
this.rbRectification.Hidden = true;
}
else
{
this.rbRectification.Hidden = false;
}
}
}
#endregion
@@ -94,16 +102,20 @@ namespace FineUIPro.Web.HSSE.Hazard
{
Model.HSSE_ConstructionRiskControl newconstructionRisk = Funs.DB.HSSE_ConstructionRiskControl.FirstOrDefault(x => x.ControlId == this.ControlId);
string str = string.Empty;
if (newconstructionRisk != null)
{
newconstructionRisk.CheckMan = this.CurrUser.PersonId;
newconstructionRisk.CheckResult = rbCheckResult.SelectedValue;
newconstructionRisk.Rectification = rbRectification.SelectedValue;
if (this.rbCheckResult.SelectedValue == "不符合")
{
newconstructionRisk.Rectification = rbRectification.SelectedValue;
str= rbRectification.SelectedValue;
}
}
Funs.DB.SubmitChanges();
PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(rbRectification.SelectedValue) + ActiveWindow.GetHidePostBackReference());
PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(str) + ActiveWindow.GetHidePostBackReference());
}
@@ -112,5 +124,17 @@ namespace FineUIPro.Web.HSSE.Hazard
{
}
protected void rbCheckResult_SelectedIndexChanged(object sender, EventArgs e)
{
if (this.rbCheckResult.SelectedValue == "符合")
{
this.rbRectification.Hidden = true;
}
else
{
this.rbRectification.Hidden = false;
}
}
}
}