From 017edfa146ec2a17e9508ce11943fba0f73b3f51 Mon Sep 17 00:00:00 2001 From: yhw0507 Date: Wed, 20 Sep 2023 10:30:15 +0800 Subject: [PATCH] =?UTF-8?q?20230920=E4=BA=BA=E5=91=98=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E4=B8=AD=E4=BA=BA=E5=91=98=E7=B1=BB=E5=9E=8B=E5=8F=AA=E6=9C=89?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98=E8=83=BD=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/FineUIPro.Web/ErrLog.txt | 18 ++++++++++++++++ SGGL/FineUIPro.Web/Person/PersonEdit.aspx | 2 +- SGGL/FineUIPro.Web/Person/PersonEdit.aspx.cs | 16 ++++++++++++++ .../Person/ProjectPersonEdit.aspx | 2 +- .../Person/ProjectPersonEdit.aspx.cs | 21 +++++++++++++++++++ 5 files changed, 57 insertions(+), 2 deletions(-) diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index e69de29b..2dd20412 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -0,0 +1,18 @@ + +错误信息开始=====> +错误类型:NullReferenceException +错误信息:未将对象引用设置到对象的实例。 +错误堆栈: + 在 FineUIPro.Web.Person.PersonEdit.Page_Load(Object sender, EventArgs e) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\FineUIPro.Web\Person\PersonEdit.aspx.cs:行号 229 + 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) + 在 System.EventHandler.Invoke(Object sender, EventArgs e) + 在 System.Web.UI.Control.OnLoad(EventArgs e) + 在 System.Web.UI.Control.LoadRecursive() + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:09/20/2023 10:14:47 +出错文件:http://localhost:8513/Person/PersonEdit.aspx?PersonId=d0aa5149-1d64-4266-8861-379c9a903c72 +IP地址:::1 +操作人员:JT + +出错时间:09/20/2023 10:14:47 + diff --git a/SGGL/FineUIPro.Web/Person/PersonEdit.aspx b/SGGL/FineUIPro.Web/Person/PersonEdit.aspx index 277658c8..fe5163c1 100644 --- a/SGGL/FineUIPro.Web/Person/PersonEdit.aspx +++ b/SGGL/FineUIPro.Web/Person/PersonEdit.aspx @@ -93,7 +93,7 @@ - + diff --git a/SGGL/FineUIPro.Web/Person/PersonEdit.aspx.cs b/SGGL/FineUIPro.Web/Person/PersonEdit.aspx.cs index 1f4db4b6..5644617d 100644 --- a/SGGL/FineUIPro.Web/Person/PersonEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/Person/PersonEdit.aspx.cs @@ -225,10 +225,26 @@ namespace FineUIPro.Web.Person this.btnCertificateNew.Hidden = false; this.btnTrainNew.Hidden = false; this.btnInOutNew.Hidden = false; + + if (this.CurrUser.RoleIds == null || this.CurrUser.RoleIds.Contains(Const.sysglyId)) + { + this.rbPersonType.Readonly = false; + } + else + { + var getRoleNames = RoleService.getRoleNamesRoleIds(this.CurrUser.RoleIds); + if (getRoleNames != null && getRoleNames.Contains("管理员")) + { + this.rbPersonType.Readonly = false; + } + } } + + } else { + this.rbPersonType.Readonly = false; if (this.Type == "Shunt") { this.ckIsPost.Checked = false; diff --git a/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx b/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx index 360d28b8..fe622030 100644 --- a/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx +++ b/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx @@ -166,7 +166,7 @@ - + diff --git a/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs b/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs index 3c779396..a7426c81 100644 --- a/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs @@ -120,6 +120,27 @@ namespace FineUIPro.Web.Person getInitGridTestRecord(); getInitGridInOut(); getInitGridContract(); + + var person = BLL.Person_PersonsService.GetPerson_PersonsById(this.PersonId); + if (person != null) + { + if (this.CurrUser.RoleIds == null || this.CurrUser.RoleIds.Contains(Const.sysglyId)) + { + this.rbPersonType.Readonly = false; + } + else + { + var getRoleNames = RoleService.getRoleNamesRoleIds(this.CurrUser.RoleIds); + if (getRoleNames != null && getRoleNames.Contains("管理员")) + { + this.rbPersonType.Readonly = false; + } + } + } + else + { + this.rbPersonType.Readonly = false; + } } }