| | |
| | | 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; |
| | | |
| | | string addressClasses = ConfigurationManager.AppSettings["addressClasses"]; |
| | | |
| | | protected void Page_Load(object sender, EventArgs e) |
| | | { |
| | |
| | | { |
| | | GwProduct bean = new GwProduct(); |
| | | bean.Classes = 1; |
| | | bean.IsDefault = -1; |
| | | bean.IsEnable = -1; |
| | | this.GwProductList = gwProductDao.getAllList(bean); |
| | | } |
| | |
| | | } |
| | | |
| | | 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(); |
| | | } |
| | |
| | | } |
| | | |
| | | 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(); |
| | | } |
| | |
| | | } |
| | | |
| | | 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(); |
| | | } |
| | |
| | | } |
| | | |
| | | 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(); |
| | | } |
| | |
| | | { |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | if (this.GwProductList.Count == 0) |
| | | return "<option value='0'>无</option>"; |
| | | return "<option value=''>无</option>"; |
| | | stringBuilder.AppendFormat("<option value=\"{0}\" >{1}</option>", (object)"", (object)"无"); |
| | | foreach (GwProduct bean in this.GwProductList) |
| | | { |
| | |
| | | } |
| | | |
| | | 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(); |
| | | } |
| | | |
| | | |
| | | //获取个性产品信息 |
| | | public string GetPersonalityProductOptions(string productId) |
| | | { |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | if (this.GwProductList.Count == 0) |
| | | return "<option value=''>无</option>"; |
| | | stringBuilder.AppendFormat("<option value=\"{0}\" >{1}</option>", (object)"", (object)"无"); |
| | | foreach (GwProduct bean in this.GwProductList) |
| | | { |
| | | //停用的产品分类不再显示 |
| | | if (bean.IsEnable == 0) |
| | | { |
| | | continue; |
| | | } |
| | | //过滤产品类别 |
| | | if (bean.Classes == 0) |
| | | { |
| | | continue; |
| | | } |
| | | //过滤推广方式 |
| | | if (bean.IsDefault == 1) |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | if (productId.Equals(bean.Id)) |
| | | stringBuilder.AppendFormat("<option value=\"{0}\" selected>{1}</option>", (object)bean.Id, (object)bean.Name); |
| | | else |
| | | stringBuilder.AppendFormat("<option value=\"{0}\">{1}</option>", (object)bean.Id, (object)bean.Name); |
| | | } |
| | | return stringBuilder.ToString(); |
| | | } |