diff --git a/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDelegationEdit.aspx.cs b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDelegationEdit.aspx.cs index 74c1a36..75a6097 100644 --- a/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDelegationEdit.aspx.cs +++ b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDelegationEdit.aspx.cs @@ -1,6 +1,9 @@ using BLL; +using FineUIPro.Web.common.BaseInfo; using Model; using Newtonsoft.Json.Linq; +using NPOI.SS.Formula.Functions; +using NPOI.SS.Formula.PTG; using System; using System.Collections.Generic; using System.Data; @@ -168,7 +171,10 @@ namespace FineUIPro.Web.WeldingProcess.PMI var workAreaCode = Funs.DB.Project_WorkArea.AsQueryable().Where(t => workdAreaIdList.Contains(t.WorkAreaId)).Distinct().FirstOrDefault()?.WorkAreaCode; - this.txtDelegationNo.Text = $"PMI-{unitCode}-{workAreaCode}-PI-"; + string perfix = string.Empty; + perfix = $"PMI-{unitCode}-{workAreaCode}-PI-"; + this.txtDelegationNo.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode", "dbo.PMI_Delegation", "DelegationNo", this.CurrUser.LoginProjectId, perfix); + } } #endregion