From 6c4ea53f92500f49959013c36b5c67fed25cd791 Mon Sep 17 00:00:00 2001 From: yzh <snbbt@21cn.com> Date: 星期一, 11 十月 2021 19:00:15 +0800 Subject: [PATCH] 产品分配账户 --- web/web/GwClient.aspx.cs | 26 +++++++++++++++++++++++++- 1 files changed, 25 insertions(+), 1 deletions(-) diff --git a/web/web/GwClient.aspx.cs b/web/web/GwClient.aspx.cs index c89b973..54ed256 100644 --- a/web/web/GwClient.aspx.cs +++ b/web/web/GwClient.aspx.cs @@ -5,11 +5,35 @@ using System.Web; using System.Web.Profile; using System.Web.SessionState; +using Dao; +using System.Text; +using System.Collections.Generic; public partial class _GwClient : PageBase<SysUser>, IRequiresSessionState -{ +{ + protected List<GwProduct> getGwProductList; //浜у搧鍒嗙被 + protected void Page_Load(object sender, EventArgs e) { + //鏉冮檺鏍¢獙 this.CheckRight("301", FailedOperation.ErrorMsgOnly); + //鑾峰彇浜у搧 + using (GwProductDao gwProductDao = new GwProductDao()) + this.getGwProductList = gwProductDao.getGwProductList(); + } + + + //浜у搧鍒嗙被涓嬫媺妗嗘暟鎹� + public string GetGwProductOptionsAll() + { + StringBuilder stringBuilder = new StringBuilder(); + if (this.getGwProductList.Count == 0) + return "<option value=''>鏃犱骇鍝佷俊鎭�</option>"; + stringBuilder.AppendFormat("<option value=\"{0}\" >{1}</option>", "", "--璇烽�夋嫨浜у搧--"); + foreach (GwProduct gwProduct in this.getGwProductList) + { + stringBuilder.AppendFormat("<option value=\"{0}\" >{0}-{1}-{2}</option>", gwProduct.id, gwProduct.name, gwProduct.is_default==0 ? "鍚�":"榛樿"); + } + return stringBuilder.ToString(); } } -- Gitblit v1.9.1