| | |
| | | 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(); |
| | | } |
| | | } |