Beispiel #1
0
        /// <summary>
        /// 初始化界面下拉框列表
        /// </summary>
        private void InitDropDownList()
        {
            //电压
            DropDownListVOLTAGE.DataSource     = order_lv2_bll.GetCodeTable("09");
            DropDownListVOLTAGE.DataTextField  = "DICT_NAME_CN";
            DropDownListVOLTAGE.DataValueField = "DICT_ID";
            DropDownListVOLTAGE.DataBind();

            //电流
            DropDownListMETERCURRENT.DataSource     = order_lv2_bll.GetCodeTable("11");
            DropDownListMETERCURRENT.DataTextField  = "DICT_NAME_CN";
            DropDownListMETERCURRENT.DataValueField = "DICT_ID";
            DropDownListMETERCURRENT.DataBind();

            //频率
            DropDownListFREQUENCY.DataSource     = order_lv2_bll.GetCodeTable("10");
            DropDownListFREQUENCY.DataTextField  = "DICT_NAME_CN";
            DropDownListFREQUENCY.DataValueField = "DICT_ID";
            DropDownListFREQUENCY.DataBind();

            //精度等级
            DropDownListACCURACY.DataSource     = order_lv2_bll.GetCodeTable("12");
            DropDownListACCURACY.DataTextField  = "DICT_NAME_CN";
            DropDownListACCURACY.DataValueField = "DICT_ID";
            DropDownListACCURACY.DataBind();

            //产品类型
            DropDownListPro_Sort.DataSource     = order_lv2_bll.GetCodeTable("02");
            DropDownListPro_Sort.DataTextField  = "DICT_NAME_CN";
            DropDownListPro_Sort.DataValueField = "DICT_ID";
            DropDownListPro_Sort.DataBind();

            //产品型号
            DataTable dt_meter = new DataTable();

            dt_meter = order_lv2_bll.GetMeterScheme("distinct");
            DataRow dr = dt_meter.NewRow();

            dr["PROD_ID"] = "unknown";
            dt_meter.Rows.InsertAt(dr, 0);
            DropDownListPRODUCTMODEL.DataSource     = dt_meter;
            DropDownListPRODUCTMODEL.DataTextField  = "PROD_ID";
            DropDownListPRODUCTMODEL.DataValueField = "PROD_ID";
            DropDownListPRODUCTMODEL.DataBind();

            //产品序号
            DataTable dt_xuhao = new DataTable();

            dt_xuhao = order_lv2_bll.GetMeterScheme("");
            DataRow dr1 = dt_xuhao.NewRow();

            dr1["PROD_NUMBER"] = "";
            dt_xuhao.Rows.InsertAt(dr1, 0);
            DropDownListProductIndex.DataSource     = dt_xuhao;
            DropDownListProductIndex.DataTextField  = "PROD_NUMBER";
            DropDownListProductIndex.DataValueField = "PROD_NUMBER";
            DropDownListProductIndex.DataBind();
        }
Beispiel #2
0
        /// <summary>
        /// 当产品型号选定时,自动加载属于这个型号的产品序号
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void DropDownListPRODUCTMODEL_SelectedIndexChanged(object sender, EventArgs e)
        {
            string productmodel = DropDownListPRODUCTMODEL.SelectedValue;

            DropDownListProductIndex.DataSource     = order_lv2_bll.GetMeterScheme(productmodel);
            DropDownListProductIndex.DataTextField  = "PROD_NUMBER";
            DropDownListProductIndex.DataValueField = "PROD_NUMBER";
            DropDownListProductIndex.DataBind();
        }