From f63d8ead25bdb3c32dacca817a059bd30390e9bc Mon Sep 17 00:00:00 2001
From: yzh <snbbt@21cn.com>
Date: 星期三, 15 六月 2022 22:20:07 +0800
Subject: [PATCH] 1.系统账户数据库优化:   修改“账户类型”的数据类型为VARCHAR2(1024),多个角色时以半角“,”分隔。   加密盐。 密码加密优化;账户登录优化;角色权限管理(作废用户权限); 2.字典类型管理(定义:用户角色) 3.字典数据管理(初始化用户角色数据) 3.角色权限管理 4.系统账户管理,账户类型对应用户角色(可多选)。

---
 web/web/GwOrderCreate.aspx.cs |   53 +++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 39 insertions(+), 14 deletions(-)

diff --git a/web/web/GwOrderCreate.aspx.cs b/web/web/GwOrderCreate.aspx.cs
index ef84d05..80fe7bb 100644
--- a/web/web/GwOrderCreate.aspx.cs
+++ b/web/web/GwOrderCreate.aspx.cs
@@ -24,7 +24,7 @@
     public int _controlFlag = 0;
 
     private int _userId = -1;
-    private int _userType = -1;
+    private string _userType = "";
     private string _account = "";
 
     protected void Page_Load(object sender, EventArgs e)
@@ -50,10 +50,27 @@
 
         using (GwSpDao gwSpDao = new GwSpDao())
         {
+            this.GwOrder = new GwOrder();
             if (!string.IsNullOrEmpty(this.ClientId))
             {
-                this.GwOrder = new GwOrder();
                 this.GwOrder.ClientId = ClientId;
+
+                GwClient gwClient = new GwClient();
+                using (GwClientDao gwClientDao = new GwClientDao())
+                {
+                    gwClient = gwClientDao.Get(this.ClientId);
+                    this.GwOrder.Company = gwClient.Company;
+                    this.GwOrder.Balance = long.Parse(gwClient.Balance.ToString());    //浣欓
+
+                    if (gwClient.Is_Enable == 1)
+                    {
+                        backUrl = "GwClient.aspx?IsEnable=1";
+                    }
+                    else
+                    {
+                        backUrl = "GwClient.aspx?IsEnable=0";
+                    }
+                }
 
                 string permissionsSQL = new GwClientDao().GetClientPermissions(_userId, _userType, null);
                 this.GwSpList = gwSpDao.LoadInfoList(null, null, this.ClientId, permissionsSQL);
@@ -74,30 +91,39 @@
 
                 }
 
-
                 GwClient gwClient = new GwClient();
                 using (GwClientDao gwClientDao = new GwClientDao())
                 {
                     gwClient = gwClientDao.Get(gwSp.ClientID);
+                    this.GwOrder.Company = gwClient.Company;
+                    this.GwOrder.Balance = long.Parse(gwClient.Balance.ToString());    //浣欓
+
+                    if (gwClient.Is_Enable==1)
+                    {
+                        backUrl = "GwClient.aspx?IsEnable=1";
+                    }
+                    else
+                    {
+                        backUrl = "GwClient.aspx?IsEnable=0";
+                    }
                 }
 
+                this.GwOrder.SpId = gwSp.SpID;
+                this.GwOrder.ClientId = gwSp.ClientID;
+                this.GwOrder.ProductId = gwSp.ProductId;
+                this.GwOrder.ProductName = gwSp.ProductName;
+                this.GwOrder.Price = gwSp.Price;
+                this.GwOrder.BasicNum = gwSp.BasicNum;  //鍩烘湰鏉℃暟
+                this.GwOrder.GivingNum = gwSp.GivingNum;
 
-                this.GwOrder = new GwOrder();
-                    this.GwOrder.SpId = gwSp.SpID;
-                    this.GwOrder.ClientId = gwSp.ClientID;
-                    this.GwOrder.ProductId = gwSp.ProductId;
-                    this.GwOrder.Price = gwSp.Price;
-                    this.GwOrder.BasicNum = gwSp.BasicNum;  //鍩烘湰鏉℃暟
-                    this.GwOrder.GivingNum = gwSp.GivingNum;
-
-                    this.GwOrder.Balance = long.Parse(gwClient.Balance.ToString());    //浣欓
+                //this.GwOrder.Balance = long.Parse(gwClient.Balance.ToString());    //浣欓
             }
 
         }
     }
 
 
-    public GwOrder GwOrder { get; protected set; }
+    public GwOrder GwOrder { get; set; }
 
     public string SpID
     {
@@ -119,7 +145,6 @@
         {
             if(!string.IsNullOrEmpty(this.AppContext.GetString("clientId")) )
             {
-                backUrl = "GwClient.aspx";
                 _controlFlag = 0;
             }
 

--
Gitblit v1.9.1