yzh
2021-10-11 6c4ea53f92500f49959013c36b5c67fed25cd791
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
 
using Common;
using Model;
using System;
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();
    }
}