From adee7a71ba7ab1b63cab63381dfe1846437853d6 Mon Sep 17 00:00:00 2001
From: wzp <2040239371@qq.com>
Date: 星期四, 02 三月 2023 17:37:05 +0800
Subject: [PATCH] 增加分销商配置

---
 web/web/GwMoRoute.aspx.cs |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/web/web/GwMoRoute.aspx.cs b/web/web/GwMoRoute.aspx.cs
index 948a8bf..4ce4f95 100644
--- a/web/web/GwMoRoute.aspx.cs
+++ b/web/web/GwMoRoute.aspx.cs
@@ -12,7 +12,11 @@
 public partial class _GwMoRoute : PageBase<SysUser>, IRequiresSessionState
 {
     private List<GwOp> OpList;
- 
+
+    private int _userId = -1;
+    private string _userType = "";
+    private string _account = "";
+
     public GwSp GwSp { get; protected set; }
 
     public string SpID
@@ -30,6 +34,11 @@
     protected void Page_Load(object sender, EventArgs e)
     {
         this.CheckRight("306", FailedOperation.ErrorMsgOnly);
+
+        _userId = this.AppContext.SessionObject.UserID;
+        _userType = this.AppContext.SessionObject.UserType;
+        _account = this.AppContext.SessionObject.Account;
+
         using (GwSpDao gwSpDao = new GwSpDao())
         {
             if (!string.IsNullOrEmpty(this.SpID))
@@ -83,7 +92,9 @@
         StringBuilder stringBuilder = new StringBuilder();
         using (GwSpDao gwSpDao = new GwSpDao())
         {
-            List<GwSp> list = gwSpDao.LoadInfoList("", "", "");
+            string permissionsSQL = new GwClientDao().GetClientPermissions(_userId, _userType, null);
+
+            List<GwSp> list = gwSpDao.LoadInfoList("", "", "", permissionsSQL);
             if (list.Count == 0)
             {
                 stringBuilder.Append("<option value=\"\">鏆傛棤甯愬彿</option>");

--
Gitblit v1.9.1