From b9563c653135911d27d1c186a1dad221fcafeefe Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Thu, 6 Jun 2024 15:53:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Hazard/ConstructionRiskControlCheck.aspx | 2 +- .../ConstructionRiskControlCheck.aspx.cs | 32 ++++++++++++++++--- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskControlCheck.aspx b/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskControlCheck.aspx index 1c43e5f0..ee9a2067 100644 --- a/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskControlCheck.aspx +++ b/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskControlCheck.aspx @@ -26,7 +26,7 @@ - + diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskControlCheck.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskControlCheck.aspx.cs index 96ecffbf..ac27cce4 100644 --- a/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskControlCheck.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskControlCheck.aspx.cs @@ -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; + } + } } } \ No newline at end of file