From aa753134246c448e8ab116554b686a80bc926585 Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期五, 12 五月 2023 12:34:22 +0800
Subject: [PATCH] 判断用户权限调用方法修正

---
 Pub_Class/CustomerCls/ClsPub.cs |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Pub_Class/CustomerCls/ClsPub.cs b/Pub_Class/CustomerCls/ClsPub.cs
index a5dc3e9..fdc5f20 100644
--- a/Pub_Class/CustomerCls/ClsPub.cs
+++ b/Pub_Class/CustomerCls/ClsPub.cs
@@ -930,7 +930,7 @@
                 if (LogTF == 1 || LogTF == 3)//闇�瑕佸垽鏂潈闄�
                 {
                     //鏍规嵁鐢ㄦ埛鍚嶇О鍒ゆ柇鏉冮檺
-                    DsUser = oCn.RunProcReturn("select * from gy_czygl where czymc='" + UserID.Trim() + "'", "gy_czygl");
+                    DsUser = oCn.RunProcReturn("select ManagerFlag,isnull(AuthorityID,'') AuthorityID,Czybm from gy_czygl where czymc='" + UserID.Trim() + "'", "gy_czygl");
                     if (DsUser.Tables[0].Rows.Count == 0)
                     {
                         if (Msg == true)
@@ -946,7 +946,8 @@
                     }
                     else
                     {
-                        if (DsUser.Tables[0].Rows[0]["AuthorityID"].ToString().Trim().Substring((int)ModID - 1, 1) == "1")
+                        if (ClsPub.isStrNull(DsUser.Tables[0].Rows[0]["AuthorityID"]).Length > ModID
+                            && DsUser.Tables[0].Rows[0]["AuthorityID"].ToString().Trim().Substring((int)ModID - 1, 1) == "1")
                         {
                             HavRight = true;
                         }

--
Gitblit v1.9.1