コード例 #1
0
        private void DropBind() //绑定下拉框信息
        {
            List <DropDownList> ddl = new List <DropDownList>()
            {
                ST_GENDER, DEP_NAME, ST_SEQUEN
            };

            DropListBind(ddl);
            //绑定名族
            List <string> list = new List <string>()
            {
                "汉族", "蒙古族", "回族", "藏族", "维吾尔族", "苗族", "彝族", "壮族", "布依族", "朝鲜族", "满族", "侗族", "瑶族", "白族", "土家族", "哈尼族", "哈萨克族", "傣族", "黎族", "僳僳族", "佤族", "畲族", "高山族", "拉祜族", "水族", "东乡族", "纳西族", "景颇族", "柯尔克孜族", "土族", "达斡尔族", "仫佬族", "羌族", "布朗族", "撒拉族", "毛南族", "仡佬族", "锡伯族", "阿昌族", "普米族", "塔吉克族", "怒族", "乌孜别克族", "俄罗斯族", "鄂温克族", "德昂族", "保安族", "裕固族", "京族", "塔塔尔族", "独龙族", "鄂伦春族", "赫哲族", "门巴族", "珞巴族", "基诺族"
            };

            ST_PEOPLE.DataSource = list;
            ST_PEOPLE.DataBind();
            AddNew(ST_PEOPLE);
            //绑定政治面貌
            list = new List <string>()
            {
                "群众", "中共党员", "共青团员", "民主党派", "无党派", "农工民主党", "致公党", "九三学社", "预备党员"
            };
            ST_POLITICAL.DataSource = list;
            ST_POLITICAL.DataBind();
            AddNew(ST_POLITICAL);
            //婚姻状况
            list = new List <string>()
            {
                "未婚", "再婚", "丧偶", "离异", "已婚"
            };
            ST_MARRY.DataSource = list;
            ST_MARRY.DataBind();
            AddNew(ST_MARRY);
            ////第一学历  最高学历
            list = new List <string>()
            {
                "研究生", "在职研究生", "本科", "大普", "大专", "中专", "高中", "初中", "小学"
            };
            //ST_XUELI.DataSource = list;
            //ST_XUELI.DataBind();
            //AddNew(ST_XUELI);
            ST_XUELIHI.DataSource = list;
            ST_XUELIHI.DataBind();
            AddNew(ST_XUELIHI);
            //第一学位  最高学位
            list = new List <string>()
            {
                "博士后", "博士", "硕士", "双学士", "学士", "无"
            };
            ST_XUEWEI.DataSource = list;
            ST_XUEWEI.DataBind();
            AddNew(ST_XUEWEI);
            ST_XUEWEIHI.DataSource = list;
            ST_XUEWEIHI.DataBind();
            AddNew(ST_XUEWEIHI);
            //技术职务(称)
            list = new List <string>()
            {
                "教授级高级工程师", "高级工程师", "工程师", "助理工程师", "技术员", "高级经济师", "经济师", "助理经济师", "高级政工师", "政工师", "助理政工师", "高级会计师", "会计师", "助理会计师", "会计员", "高级国务商务师", "国际商务师", "助理国际商务师", "研究馆员", "副研究馆员", "馆员", "助理馆员", "主任护师", "主管护师", "护师", "统计师", "助理统计师"
            };
            ST_ZHICH.DataSource = list;
            ST_ZHICH.DataBind();
            AddNew(ST_ZHICH);
            //职能等级
            list = new List <string>()
            {
                "高级技师", "技师", "高级工", "中级工", "普通工", "初级工"
            };
            ST_ZHICHXU.DataSource = list;
            ST_ZHICHXU.DataBind();
            AddNew(ST_ZHICHXU);

            //学历类型
            list = new List <string>()
            {
                "普通统招", "成教", "自考", "专升本", "电大", "网络教育"
            };
            ST_XUELITYPE.DataSource = list;
            ST_XUELITYPE.DataBind();
            AddNew(ST_XUELITYPE);
            //最高学历类型
            list = new List <string>()
            {
                "普通统招", "成教", "自考", "专升本", "电大", "网络教育"
            };
            ST_XUELITYPEHI.DataSource = list;
            ST_XUELITYPEHI.DataBind();
            AddNew(ST_XUELITYPEHI);
        }
コード例 #2
0
        private void DropBind() //绑定下拉框信息
        {
            //  List<DropDownList> ddl = new List<DropDownList>() { ST_GENDER, DEP_NAME, ST_SEQUEN };
            //  DropListBind(ddl);

            string    sql = "select DEP_NAME,DEP_CODE from TBDS_DEPINFO where DEP_CODE like '[0-9][0-9]'";
            DataTable dt  = DBCallCommon.GetDTUsingSqlText(sql);

            DEP_NAME.DataSource     = dt;
            DEP_NAME.DataTextField  = "DEP_NAME";
            DEP_NAME.DataValueField = "DEP_CODE";
            DEP_NAME.DataBind();
            AddNew(DEP_NAME);


            //性别
            List <string> list = new List <string>()
            {
                "男", "女"
            };

            ST_GENDER.DataSource = list;
            ST_GENDER.DataBind();
            AddNew(ST_GENDER);
            //岗位序列
            list = new List <string>()
            {
                "管理", "技术", "操作"
            };
            ST_SEQUEN.DataSource = list;
            ST_SEQUEN.DataBind();
            AddNew(ST_SEQUEN);



            //绑定名族
            list = new List <string>()
            {
                "汉族", "蒙古族", "回族", "藏族", "维吾尔族", "苗族", "彝族", "壮族", "布依族", "朝鲜族", "满族", "侗族", "瑶族", "白族", "土家族", "哈尼族", "哈萨克族", "傣族", "黎族", "僳僳族", "佤族", "畲族", "高山族", "拉祜族", "水族", "东乡族", "纳西族", "景颇族", "柯尔克孜族", "土族", "达斡尔族", "仫佬族", "羌族", "布朗族", "撒拉族", "毛南族", "仡佬族", "锡伯族", "阿昌族", "普米族", "塔吉克族", "怒族", "乌孜别克族", "俄罗斯族", "鄂温克族", "德昂族", "保安族", "裕固族", "京族", "塔塔尔族", "独龙族", "鄂伦春族", "赫哲族", "门巴族", "珞巴族", "基诺族"
            };
            ST_PEOPLE.DataSource = list;
            ST_PEOPLE.DataBind();
            AddNew(ST_PEOPLE);
            //绑定政治面貌
            list = new List <string>()
            {
                "群众", "中共党员", "共青团员", "民主党派", "无党派", "农工民主党", "致公党", "九三学社", "预备党员"
            };
            ST_POLITICAL.DataSource = list;
            ST_POLITICAL.DataBind();
            AddNew(ST_POLITICAL);
            //婚姻状况
            list = new List <string>()
            {
                "未婚", "再婚", "丧偶", "离异", "已婚"
            };
            ST_MARRY.DataSource = list;
            ST_MARRY.DataBind();
            AddNew(ST_MARRY);
            //第一学历  最高学历
            list = new List <string>()
            {
                "本科", "大普", "大专", "中专", "高中", "初中", "小学", "研究生", "在职研究生"
            };
            ST_XUELI.DataSource = list;
            ST_XUELI.DataBind();
            AddNew(ST_XUELI);
            ST_XUELIHI.DataSource = list;
            ST_XUELIHI.DataBind();
            AddNew(ST_XUELIHI);
            //第一学位  最高学位
            list = new List <string>()
            {
                "博士后", "博士", "硕士", "双学士", "学士", "无"
            };
            ST_XUEWEI.DataSource = list;
            ST_XUEWEI.DataBind();
            AddNew(ST_XUEWEI);
            ST_XUEWEIHI.DataSource = list;
            ST_XUEWEIHI.DataBind();
            AddNew(ST_XUEWEIHI);
            //技术职务(称)
            list = new List <string>()
            {
                "技术员", "助理工程师", "工程师", "高级工程师", "教授级高级工程师", "助理经济师", "经济师", "高级经济师", "助理政工师", "政工师", "高级政工师", "会计员", "助理会计师", "会计师", "高级会计师", "助理国际商务师", "国际商务师", "高级国务商务师", "助理馆员", "馆员", "副研究馆员", "研究馆员", "护师", "主管护师", "主任护师", "助理统计师", "统计师"
            };
            ST_ZHICH.DataSource = list;
            ST_ZHICH.DataBind();
            AddNew(ST_ZHICH);
            //职能等级
            list = new List <string>()
            {
                "高级技师", "技师", "普通工", "初级工", "中级工", "高级工"
            };
            ST_ZHICHXU.DataSource = list;
            ST_ZHICHXU.DataBind();
            AddNew(ST_ZHICHXU);

            //学历类型
            list = new List <string>()
            {
                "普通统招", "成教", "自考", "专升本", "电大", "网络教育"
            };
            ST_XUELITYPE.DataSource = list;
            ST_XUELITYPE.DataBind();
            AddNew(ST_XUELITYPE);
            //最高学历类型
            list = new List <string>()
            {
                "普通统招", "成教", "自考", "专升本", "电大", "网络教育"
            };
            ST_XUELITYPEHI.DataSource = list;
            ST_XUELITYPEHI.DataBind();
            AddNew(ST_XUELITYPEHI);
        }