From dbda463cdacc6c6101acdf9d58e22450a281b9b0 Mon Sep 17 00:00:00 2001
From: yzh <snbbt@21cn.com>
Date: 星期二, 07 六月 2022 23:11:04 +0800
Subject: [PATCH] 客户信息管理 停用客户信息管理

---
 web/web/GwClient.aspx.cs |   78 ++++++++++++++++++++++++++++++++------
 1 files changed, 65 insertions(+), 13 deletions(-)

diff --git a/web/web/GwClient.aspx.cs b/web/web/GwClient.aspx.cs
index e579884..2726e1c 100644
--- a/web/web/GwClient.aspx.cs
+++ b/web/web/GwClient.aspx.cs
@@ -8,12 +8,15 @@
 using Dao;
 using System.Collections.Generic;
 using System.Text;
+using System.Configuration;
 
 public partial class _GwClient : PageBase<SysUser>, IRequiresSessionState
 {
 
     protected List<SysUser> SysUserList;
-    protected List<GwProduct> GwProductList;
+    protected List<GwProduct> GwProductList;    
+
+    string addressClasses = ConfigurationManager.AppSettings["addressClasses"];
 
     protected void Page_Load(object sender, EventArgs e)
     {
@@ -41,6 +44,13 @@
             this.GwProductList = gwProductDao.getAllList(bean);
         }
     }
+    public int IsEnable
+    {
+        get
+        {
+            return this.AppContext.GetInt("IsEnable");
+        }
+    }
 
 
     //褰掑睘涓氬姟鍛�
@@ -64,9 +74,9 @@
             }
 
             if (userId == bean.UserID)
-                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{0}-{1}</option>", (object)bean.UserID, (object)bean.UserName);
+                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{1}</option>", (object)bean.UserID, (object)bean.UserName);
             else
-                stringBuilder.AppendFormat("<option value=\"{0}\">{0}-{1}</option>", (object)bean.UserID, (object)bean.UserName);
+                stringBuilder.AppendFormat("<option value=\"{0}\">{1}</option>", (object)bean.UserID, (object)bean.UserName);
         }
         return stringBuilder.ToString();
     }
@@ -92,9 +102,9 @@
             }
 
             if (userId == bean.UserID)
-                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{0}-{1}</option>", (object)bean.UserID, (object)bean.UserName);
+                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{1}</option>", (object)bean.UserID, (object)bean.UserName);
             else
-                stringBuilder.AppendFormat("<option value=\"{0}\">{0}-{1}</option>", (object)bean.UserID, (object)bean.UserName);
+                stringBuilder.AppendFormat("<option value=\"{0}\">{1}</option>", (object)bean.UserID, (object)bean.UserName);
         }
         return stringBuilder.ToString();
     }
@@ -120,9 +130,9 @@
             }
 
             if (userId == bean.UserID)
-                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{0}-{1}</option>", (object)bean.UserID, (object)bean.UserName);
+                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{1}</option>", (object)bean.UserID, (object)bean.UserName);
             else
-                stringBuilder.AppendFormat("<option value=\"{0}\">{0}-{1}</option>", (object)bean.UserID, (object)bean.UserName);
+                stringBuilder.AppendFormat("<option value=\"{0}\">{1}</option>", (object)bean.UserID, (object)bean.UserName);
         }
         return stringBuilder.ToString();
     }
@@ -148,9 +158,9 @@
             }
 
             if (userId == bean.UserID)
-                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{0}-{1}</option>", (object)bean.UserID, (object)bean.UserName);
+                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{1}</option>", (object)bean.UserID, (object)bean.UserName);
             else
-                stringBuilder.AppendFormat("<option value=\"{0}\">{0}-{1}</option>", (object)bean.UserID, (object)bean.UserName);
+                stringBuilder.AppendFormat("<option value=\"{0}\">{1}</option>", (object)bean.UserID, (object)bean.UserName);
         }
         return stringBuilder.ToString();
     }
@@ -177,9 +187,9 @@
             }
 
             if (productId.Equals(bean.Id))
-                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{0}-{1}</option>", (object)bean.Id, (object)bean.Name);
+                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{1}</option>", (object)bean.Id, (object)bean.Name);
             else
-                stringBuilder.AppendFormat("<option value=\"{0}\">{0}-{1}</option>", (object)bean.Id, (object)bean.Name);
+                stringBuilder.AppendFormat("<option value=\"{0}\">{1}</option>", (object)bean.Id, (object)bean.Name);
         }
         return stringBuilder.ToString();
     }
@@ -211,12 +221,54 @@
             }
 
             if (productId.Equals(bean.Id))
-                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{0}-{1}</option>", (object)bean.Id, (object)bean.Name);
+                stringBuilder.AppendFormat("<option value=\"{0}\" selected>{1}</option>", (object)bean.Id, (object)bean.Name);
             else
-                stringBuilder.AppendFormat("<option value=\"{0}\">{0}-{1}</option>", (object)bean.Id, (object)bean.Name);
+                stringBuilder.AppendFormat("<option value=\"{0}\">{1}</option>", (object)bean.Id, (object)bean.Name);
         }
         return stringBuilder.ToString();
     }
 
+    //鎵�鏈変釜鎬т骇鍝�
+    protected string ClientProductAll()
+    {
+        using (GwProductDao gwProductDao = new GwProductDao())
+        {
+            GwProduct gwProduct = new GwProduct();
+            gwProduct.Classes = 1;  //0-浜у搧鍒嗙被锛�1-浜у搧
+            gwProduct.IsDefault = 0;    //榛樿鍊�0銆�0-涓�у寲锛�1-绯荤粺榛樿銆�
+            gwProduct.IsEnable = 1;    //0-鍋滅敤锛�1-鍚敤锛涢粯璁�1
+            List<GwProduct> list = gwProductDao.getAllList(gwProduct);
+
+            StringBuilder stringBuilder = new StringBuilder();
+            stringBuilder.Append("<table cellpadding='5'>");
+            if(list.Count>0)
+            {
+                for (int i = 0; i < list.Count; i++)
+                {
+                    GwProduct bean = (GwProduct)list[i];
+
+                    //琛屽紑濮嬬
+                    if (i%5 == 0)
+                    {
+                        stringBuilder.Append("<tr>");
+                    }
+
+                    //琛屽崟鍏冩牸
+                    stringBuilder.AppendFormat("<td><input  type=\"checkbox\" id=\"_ProductId\"  name=\"_ProductId\" value=\"{0}\" /><span  style='padding:5px;'>{1} </span>  \r\n         </td>", (object)bean.Id, (object)bean.Name);
+
+                    //琛岀粨鏉熺
+                    if (i % 5 == 4 || i == (list.Count - 1))
+                    {
+                        stringBuilder.Append("</tr>");
+                    }
+
+                }
+            }
+            stringBuilder.Append("</table>");
+
+            return stringBuilder.ToString();
+        }
+    }
+
 
 }

--
Gitblit v1.9.1