Beispiel #1
0
        private void FormAdd_Load(object sender, EventArgs e)
        {
            DictionaryBLL dic = new DictionaryBLL();
            //学历
            List <Dictionary_info> list = dic.GetEdu();

            list.Insert(0, new Dictionary_info(0, "--请选择--", "", 1));
            cmbEducation.DisplayMember = "DictName";
            cmbEducation.ValueMember   = "DictId";
            cmbEducation.DataSource    = list;
            //部门
            List <Dictionary_info> list1 = dic.GetDicName();

            list1.Insert(0, new Dictionary_info(0, "--请选择--", "", 1));
            cmbDep.DisplayMember = "DictName";
            cmbDep.ValueMember   = "DictId";
            cmbDep.DataSource    = list1;

            //职位
            List <Dictionary_info> post = dic.GetPost();

            post.Insert(0, new Dictionary_info(0, "--请选择--", "", 1));
            cmbZwei.DisplayMember = "DictName";
            cmbZwei.ValueMember   = "DictId";
            cmbZwei.DataSource    = post;
        }