• asp.net中如何绑定combox下拉框数据(调用存储过程)


    #region 绑定类型(商品类型、仓库名称)

            public void DataType_Bind(int _peoid)

            {

                DataTable dt_goodsname = new DataTable();

                dt_goodsname = stockbll.GetList_goodstype(_peoid).Tables[0];  //获取商品类别

                this.cb_goodstype.Items.Clear();

                foreach (DataRow dr in dt_goodsname.Rows)

                {

                    string id = dr["goodstype2_id"].ToString();  //商品类别id

                    string title = dr["GOODSTYPE2NAME"].ToString();  //商品类别名称

                    this.cb_goodstype.Items.Add(title, id);    //商品类别绑定 

                }

                DataTable dt_stockname = new DataTable();

                dt_stockname = stockbll.GetList_stockname(_peoid).Tables[0];  //获取仓库名称

                this.cb_stock.Items.Clear();

                foreach (DataRow dr in dt_stockname.Rows)

                {

                    string stock_id = dr["GENSTORAGEID"].ToString();   // 仓库id

                    string stock_title = dr["GENSTORAGENAME"].ToString();  //仓库名称

                    this.cb_stock.Items.Add(stock_title, stock_id);   //仓库名称绑定

                }

                this.cb_stock.DataBind();

                this.cb_goodstype.DataBind();

            }

            #endregion

  • 相关阅读:
    改变传统电视对客厅文化的影响
    移动终端三分天下 何与争峰
    全球移动IM应用的迅猛发展前景
    电子医疗的发展和实现
    poj 1523(无向图求割点)
    poj 3255(次短路)
    poj 2125
    poj 3204
    图的连通度问题的求法(转)
    poj 3308
  • 原文地址:https://www.cnblogs.com/dfxyw/p/5080104.html
Copyright © 2020-2023  润新知