Example #1
0
        /// <summary>
        /// 获取级别数据列表
        /// </summary>
        /// <returns></returns>
        public DataSet GetPowerLevel()
        {
            BLL.Sys_PowerLevelBLL bll_pl = new BLL.Sys_PowerLevelBLL();
            DataSet ds = bll_pl.GetPowerLevelList(strWhere);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(ds);
            }
            else
            {
                return(null);
            }
        }
Example #2
0
        /// <summary>
        /// 获取数据
        /// </summary>
        /// <returns></returns>
        public void GetPowerLevel()
        {
            BLL.Sys_PowerLevelBLL bll_pl = new BLL.Sys_PowerLevelBLL();
            DataSet ds = bll_pl.GetPowerLevelList(strWhere);

            if (ds.Tables[0].Rows.Count > 0)
            {
                this.ddl_PowerLevel.DataSource     = ds;
                this.ddl_PowerLevel.DataTextField  = "PowerName";
                this.ddl_PowerLevel.DataValueField = "PowerLevelID";
                this.ddl_PowerLevel.DataBind();
                ListItem item_power = ddl_PowerLevel.Items.FindByValue(powername);
                if (item_power != null)
                {
                    item_power.Selected = true;
                }
            }
        }