From bd49907a8dde8d434138e396be8063a3cbee2ad7 Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Thu, 13 Mar 2025 15:56:37 +0800 Subject: [PATCH] 20250313 --- FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx | 2 +- FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx.cs | 28 +++++++++++++------ .../SES/SESRelatedDataEdit.aspx.cs | 14 ++-------- 3 files changed, 23 insertions(+), 21 deletions(-) diff --git a/FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx b/FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx index 1d69937..ef01dab 100644 --- a/FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx +++ b/FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx @@ -106,7 +106,7 @@ - + diff --git a/FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx.cs b/FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx.cs index 8876632..302952a 100644 --- a/FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx.cs +++ b/FCL/FineUIPro.Web/SES/CSafePunishEdit.aspx.cs @@ -54,7 +54,17 @@ namespace FineUIPro.Web.SES } // BLL.SESRelatedDataService.InitFONoDropDownList(this.drpFO_No, true);//合同号 - BLL.ContractorService.InitDropDownList(drpContractor, true); //承包商; + //BLL.ContractorService.InitDropDownList(drpContractor, true); //承包商; + var contractorLists = from x in Funs.DB.FC_SESRelatedData + join y in Funs.DB.Base_Contractor on x.Contractor equals y.ContractorId + where x.Expire_Date.Value.AddYears(1) >= DateTime.Now + select new { y.ContractorId, Contractor = y.Contractor + y.ContractorCN }; + this.drpContractor.DataTextField = "Contractor"; + this.drpContractor.DataValueField = "ContractorId"; + this.drpContractor.DataSource = contractorLists.Distinct(); + this.drpContractor.DataBind(); + Funs.FineUIPleaseSelect(this.drpContractor); + BLL.DepartService.InitDepartToWhere(this.drpBYC_RU, true);//BYC负责部门 BLL.Sys_UserService.InitUserDropDownList(this.drpViolationInspector, true);//违章检查人 txtViolationRelatedSes.Enabled = false; @@ -67,7 +77,7 @@ namespace FineUIPro.Web.SES if (punishment != null) { this.txtPunishDate.Text = punishment.PunishDate != null ? string.Format("{0:yyyy-MM-dd}", punishment.PunishDate) : ""; - this.txtPunishTime.Text = punishment.PunishDate != null ? punishment.PunishDate.Value.ToShortTimeString() : ""; + this.txtPunishTime.Text = punishment.PunishDate != null ? string.Format("{0:HH:mm}", punishment.PunishDate) : ""; if (!string.IsNullOrEmpty(punishment.ContractorId)) { @@ -207,7 +217,7 @@ namespace FineUIPro.Web.SES var punishment = BLL.PunishmentService.GetPunishmentById(PunishmentId); if ((this.CurrUser.DepartId == punishment.BYC_RU || this.CurrUser.Account == Const.Gly) && this.drpSelectYesNo.SelectedValue == "") { - Alert.ShowInTop("请选择是否有关联SES!", MessageBoxIcon.Warning); + Alert.ShowInTop("请选择是否有关联SES请选择是否有关联SES!", MessageBoxIcon.Warning); return; } } @@ -227,11 +237,13 @@ namespace FineUIPro.Web.SES var sesList = from x in Funs.DB.FC_SESReport where x.FO == drpFO_No.SelectedValue select x.SES_No; if (txtViolationRelatedSes.Text.Length != 10) { - PageContext.RegisterStartupScript(Confirm.GetShowReference("SES NO:" + txtViolationRelatedSes.Text + "长度不等10位 " + ", 确认(继续) / 取消(退出)", - String.Empty, - MessageBoxIcon.Question, - PageManager1.GetCustomEventReference(false, "SaveConfirm_OK"), - PageManager1.GetCustomEventReference("SaveConfirm_Cancel"))); + //PageContext.RegisterStartupScript(Confirm.GetShowReference("SES NO:" + txtViolationRelatedSes.Text + "长度不等10位 " + ", 确认(继续) / 取消(退出)", + // String.Empty, + // MessageBoxIcon.Question, + // PageManager1.GetCustomEventReference(false, "SaveConfirm_OK"), + // PageManager1.GetCustomEventReference("SaveConfirm_Cancel"))); + Alert.ShowInTop("SES NO:" + txtViolationRelatedSes.Text + "长度不等10位,请检查并填入正确的SES号!", MessageBoxIcon.Warning); + return; } else { diff --git a/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx.cs b/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx.cs index 9dec380..7548dec 100644 --- a/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx.cs +++ b/FCL/FineUIPro.Web/SES/SESRelatedDataEdit.aspx.cs @@ -52,22 +52,12 @@ namespace FineUIPro.Web.SES BLL.DisciplineService.InitDropDownList(this.drpDiscispline, true); //专业 BLL.DisciplineCategoryService.InitDropDownList(this.drpOriginal_WC, true);//专业类别 - //BLL.ContractorService.InitDropDownList(this.drpContractor, true);//承包商 + BLL.ContractorService.InitDropDownList(this.drpContractor, true);//承包商 BLL.PriceSchemeService.InitDropDownList(this.drpPricing_Scheme, true);//价格方案 BLL.ItemService.InitDropDownList(this.drpItem, true); BLL.CurrencyService.InitDropDownList(this.drpCurrency, true); //币种 BLL.FOTypeService.InitDropDownList(this.drpFOTypeId, true); - BLL.TypeService.InitDropDownList(this.drpType, true); - - var contractorLists = from x in Funs.DB.FC_SESRelatedData - join y in Funs.DB.Base_Contractor on x.Contractor equals y.ContractorId - where x.Expire_Date.Value.AddYears(1) >= DateTime.Now - select new { y.ContractorId, Contractor = y.Contractor + y.ContractorCN }; - this.drpContractor.DataTextField = "Contractor"; - this.drpContractor.DataValueField = "ContractorId"; - this.drpContractor.DataSource = contractorLists.Distinct(); - this.drpContractor.DataBind(); - Funs.FineUIPleaseSelect(this.drpContractor); + BLL.TypeService.InitDropDownList(this.drpType, true); //合同员 this.drpContract_Admin.DataTextField = "UserName";