Example #1
0
        /// <summary>
        /// 系别DDL
        /// </summary>
        /// <param name="dropDownList"></param>
        public static void DeptDLL(DropDownList dropDownList)
        {
            dropDownList.Items.Clear();
            var bll   = new BLL.t_dept();
            var model = bll.GetModelList("dept_stat=0");

            foreach (var item in model)
            {
                dropDownList.Items.Add(new ListItem(item.dept_name, item.dept_id));
            }
        }
Example #2
0
        /// <summary>
        /// 系别DDL
        /// </summary>
        /// <param name="ListBox"></param>
        public static void DeptLB(ListBox ListBox)
        {
            ListBox.Items.Clear();
            var bll   = new BLL.t_dept();
            var model = bll.GetModelList("dept_stat=0");

            foreach (var item in model)
            {
                ListBox.Items.Add(new ListItem(item.dept_name, item.dept_id));
            }
        }