From 6a3d1f8ab19830adde3a653f48f89fd7c88afbde Mon Sep 17 00:00:00 2001 From: yzh <snbbt@21cn.com> Date: 星期五, 13 五月 2022 16:03:59 +0800 Subject: [PATCH] 代理商功能优化 产品功能优化 增加产品分类功能 用户功能优化 --- web/web/GwClient.aspx.cs | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 48 insertions(+), 1 deletions(-) diff --git a/web/web/GwClient.aspx.cs b/web/web/GwClient.aspx.cs index 0cb9c4f..4acc808 100644 --- a/web/web/GwClient.aspx.cs +++ b/web/web/GwClient.aspx.cs @@ -5,12 +5,59 @@ using System.Web; using System.Web.Profile; using System.Web.SessionState; +using Dao; +using System.Collections.Generic; +using System.Text; public partial class _GwClient : PageBase<SysUser>, IRequiresSessionState -{ +{ + + protected List<SysUser> SysUserList; + protected void Page_Load(object sender, EventArgs e) { //鏉冮檺鏍¢獙 this.CheckRight("301", FailedOperation.ErrorMsgOnly); + + //鑾峰彇鍚敤鐨勪骇鍝佸垎绫� + using (UserDao userDao = new UserDao()) + { + + int recordCount = 0; + int int1 = 999999999; + int int2 = 1; + this.SysUserList = userDao.LoadInfoList(out recordCount, int1, int2); + + } } + + + //鑾峰彇浜у搧鍒嗙被淇℃伅 + public string SysUserOptions(int userId) + { + StringBuilder stringBuilder = new StringBuilder(); + if (this.SysUserList.Count == 0) + return "<option value=''>鏃�</option>"; + stringBuilder.AppendFormat("<option value=\"{0}\" >{1}</option>", (object)0, (object)"鏃�"); + foreach (SysUser bean in this.SysUserList) + { + //鍋滅敤鐨勭敤鎴蜂笉鍐嶆樉绀� + if (bean.Status == 0) + { + continue; + } + //杩囨护瓒呯骇绠$悊鍛� + if (bean.UserID == 1) + { + continue; + } + + if (userId == bean.UserID) + stringBuilder.AppendFormat("<option value=\"{0}\" selected>{0}-{1}</option>", (object)bean.UserID, (object)bean.UserName); + else + stringBuilder.AppendFormat("<option value=\"{0}\">{0}-{1}</option>", (object)bean.UserID, (object)bean.UserName); + } + return stringBuilder.ToString(); + } + } -- Gitblit v1.9.1