using Common; using Dao; using Model; using System; using System.Collections.Generic; using System.Text; using System.Web; using System.Web.Profile; using System.Web.SessionState; public partial class _GwProduct : PageBase, IRequiresSessionState { protected List OpList; protected List getGwProductClassList; //产品分类 protected List GroupList; protected List ApList; protected List SysXhList; public IEnumerable DiverterList { get; set; } protected void Page_Load(object sender, EventArgs e) { this.CheckRight("302", FailedOperation.HistoryGoBack); using (GwApDao gwApDao = new GwApDao()) this.ApList = gwApDao.LoadInfoList(); using (GwProductDao gwProductDao = new GwProductDao()) this.getGwProductClassList = gwProductDao.getGwProductClassList(); using (GwOpGroupDao gwOpGroupDao = new GwOpGroupDao()) this.GroupList = gwOpGroupDao.GetGroupList(); using (GwDiverterDao gwDiverterDao = new GwDiverterDao()) this.DiverterList = (IEnumerable)gwDiverterDao.LoadList(); using (SysXhDao sysXhDao = new SysXhDao()) this.SysXhList = sysXhDao.GetSysXhList(); } //产品分类下拉框数据 public string GetGwProductClassOptionsAll() { StringBuilder stringBuilder = new StringBuilder(); if (this.getGwProductClassList.Count == 0) return ""; stringBuilder.AppendFormat("", 0, "--请选择产品分类--"); foreach (GwProduct gwProduct in this.getGwProductClassList) { stringBuilder.AppendFormat("", gwProduct.id, gwProduct.name); } return stringBuilder.ToString(); } //通道组下拉框数据 public string GetGroupOptionsAll() { StringBuilder stringBuilder = new StringBuilder(); if (this.GroupList.Count == 0) return ""; stringBuilder.AppendFormat("", 0, "--请选择通道组--"); foreach (GwOpGroup gwOpGroup in this.GroupList) { stringBuilder.AppendFormat("", gwOpGroup.GroupID, gwOpGroup.GroupName); } return stringBuilder.ToString(); } //序号规则下拉框数据 public string GetSysXhOptionsAll() { StringBuilder stringBuilder = new StringBuilder(); if (this.SysXhList.Count == 0) return ""; stringBuilder.AppendFormat("", 0, "--请选择序号规则--"); foreach (SysXh sysXh in this.SysXhList) { stringBuilder.AppendFormat("", sysXh.xhId, sysXh.xhName); } return stringBuilder.ToString(); } public string GetGroupOptions(int groupID) { StringBuilder stringBuilder = new StringBuilder(); if (this.GroupList.Count == 0) return ""; stringBuilder.AppendFormat("", 0, "设置为空"); foreach (GwOpGroup gwOpGroup in this.GroupList) { if (groupID == gwOpGroup.GroupID) stringBuilder.AppendFormat("", gwOpGroup.GroupID, gwOpGroup.GroupName); else stringBuilder.AppendFormat("", gwOpGroup.GroupID, gwOpGroup.GroupName); } return stringBuilder.ToString(); } }