From 374ce4ffd0c459bb4067e8d5765f972668aff9b1 Mon Sep 17 00:00:00 2001 From: wzp <2040239371@qq.com> Date: 星期四, 02 三月 2023 14:56:23 +0800 Subject: [PATCH] 变更oracle访问组件 --- 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..783d379 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