This commit is contained in:
2025-06-05 10:36:47 +08:00
parent 647d00f201
commit fbcfd95f73
5 changed files with 68 additions and 32 deletions
+1 -1
View File
@@ -70,7 +70,7 @@
<Items>
<f:TextBox ID="txtUserRepresentative" runat="server" Label="User Representative" LabelAlign="Right" LabelWidth="160px" Readonly="true">
</f:TextBox>
<f:DropDownList ID="drpBYC_RU" runat="server" Label="BYC Resp. Dept." EnableGroup="true" EnableEdit="true" LabelAlign="Right" LabelWidth="160px" Required="true" ShowRedStar="true"></f:DropDownList>
<f:DropDownList ID="drpBYC_RU" runat="server" Label="BYC Resp. Dept." EnableGroup="true" EnableEdit="true" LabelAlign="Right" LabelWidth="160px" Required="true" ShowRedStar="true" AutoPostBack="true" OnSelectedIndexChanged="drpBYC_RU_SelectedIndexChanged"></f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
+32 -9
View File
@@ -8,6 +8,7 @@ using System.Web.UI.WebControls;
using FineUIPro.Web.common;
using BLL.Common;
using BLL;
using Org.BouncyCastle.Asn1.Sec;
namespace FineUIPro.Web.SES
{
@@ -36,7 +37,7 @@ namespace FineUIPro.Web.SES
{
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
string view = Request.Params["view"];
var role = BLL.Sys_RoleService.GetRole(CurrUser.RoleId);
if (role != null && role.RoleName == "Contract Administrator")
{
@@ -85,7 +86,7 @@ namespace FineUIPro.Web.SES
BLL.SESRelatedDataService.InitFONoDropDownList(this.drpFO_No, drpContractor.SelectedValue, true);//合同号
this.drpFO_No.SelectedValue = punishment.FO_NO;
}
this.txtDiscispline.Text = punishment.Discipline;
this.txtLocation.Text = punishment.Location;
this.txtDescription.Text = punishment.Description;
@@ -98,7 +99,7 @@ namespace FineUIPro.Web.SES
{
drpViolationDegree.SelectedValue = pun.ViolationDegree;
}
txtContractAdmin.Text = punishment.Contract_Admin;
txtMainCoordinator.Text = punishment.Main_Coordinator;
txtMCDept.Text = punishment.MCDept;
@@ -112,11 +113,16 @@ namespace FineUIPro.Web.SES
drpSelectYesNo.SelectedValue = "";
}
txtDef.Text= punishment.Def;
txtDef.Text = punishment.Def;
if (!string.IsNullOrEmpty(punishment.BYC_RU))
{
this.drpBYC_RU.SelectedValue = punishment.BYC_RU;
//BYC Resp. Dept.选择NA时,End UserBYC Resp. Dept.部门)填写部分灰化
if (this.drpBYC_RU.SelectedText == "NA")
{
GPDep.Enabled = false;
}
}
if (!string.IsNullOrEmpty(punishment.Violation_Inspector))
{
@@ -126,7 +132,7 @@ namespace FineUIPro.Web.SES
txtInspectionDep.Text = depName;
}
if (this.CurrUser.DepartId == punishment.BYC_RU || this.CurrUser.Account==Const.Gly)
if (this.CurrUser.DepartId == punishment.BYC_RU || this.CurrUser.Account == Const.Gly)
{
btnSave.Hidden = false;
txtViolationRelatedSes.Enabled = true;
@@ -155,7 +161,7 @@ namespace FineUIPro.Web.SES
}
else
{
}
if (view == "1")
@@ -266,7 +272,7 @@ namespace FineUIPro.Web.SES
{
Save();
}
}
private void Save()
@@ -328,7 +334,7 @@ namespace FineUIPro.Web.SES
var vses = (from x in Funs.DB.EMC_Punishment
where (x.RelatedSesMailIsSend == null || x.RelatedSesMailIsSend == false)
&& x.BYC_RU != null && x.BYC_RU.ToUpper() != "NA" && x.Flag == "1"
&& x.PunishmentId== punishment.PunishmentId
&& x.PunishmentId == punishment.PunishmentId
select x).ToList();
if (vses.Count() > 0)
{
@@ -517,8 +523,25 @@ namespace FineUIPro.Web.SES
SetReadonly(false);
}
}
}
#endregion
/// <summary>
/// BYC Resp. Dept.选择NA时,End UserBYC Resp. Dept.部门)填写部分灰化
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void drpBYC_RU_SelectedIndexChanged(object sender, EventArgs e)
{
if (this.drpBYC_RU.SelectedText == "NA")
{
this.GPDep.Enabled = false;
}
else
{
this.GPDep.Enabled = true;
}
}
}
}