From 8c0f02a6bfab6e36102fd3e045cb4691959f6054 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期五, 19 五月 2023 13:58:27 +0800
Subject: [PATCH] 1
---
Pub_Class/CustomerCls/ClsPub.cs | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/Pub_Class/CustomerCls/ClsPub.cs b/Pub_Class/CustomerCls/ClsPub.cs
index e5e8dcb..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;
}
@@ -955,7 +956,7 @@
//鑾峰彇鐢ㄦ埛缁� 骞跺惊鐜垽鏂潈闄�
//鍒ゆ柇瑙掕壊鏄惁鏈夋潈闄�
DsJS = oCn.RunProcReturn("select isnull(AuthorityID,'') AuthorityID from System_UserGroupinfo a inner join System_UserGroup b on a.GroupID=b.GroupID " +
- " Where a.USERID='" + UserID.Trim() + "'", "gy_czygl");
+ " Where a.USERID='" + DsUser.Tables[0].Rows[0]["Czybm"].ToString().Trim() + "'", "gy_czygl");
if (DsJS == null)
{
HavRight = false;
--
Gitblit v1.9.1