Example #1
0
        private void UCPersonnelAddOrEdit_Load(object sender, EventArgs e)
        {
            base.SetOpButtonVisible(uc.Name);
            base.SetBtnStatus(wStatus);
            if (windowStatus == WindowStatus.View)
            {
                Common.SetControlEnable(this, false);
            }
            //加载公司
            CommonFuncCall.BindCompanyComBox(this.cmbCompany, "请选择", "");
            // DataSources.BindComBoxDataEnum(cbojkzk, typeof(DataSources.Enumjkzk), false);//健康状况
            DataSources.BindComBoxDataEnum(cbois_operator, typeof(DataSources.EnumYesNo), false, false); //是否操作员
            CommonFuncCall.BindRoleComBox(cmbRole, "", "请选择");
            CommonFuncCall.BindComBoxDataSource(cbonation, "sys_nation", "请选择");                         //民族
            CommonFuncCall.BindComBoxDataSource(cbosex, "sys_sex", "请选择");                               //性别
            CommonFuncCall.BindComBoxDataSource(cboidcard_type, "sys_certificates_type", "请选择");         //证件类型
            CommonFuncCall.BindComBoxDataSource(cboeducation, "sys_education", "请选择");                   //学历
            CommonFuncCall.BindComBoxDataSource(cboposition, "sys_post", "请选择");                         //岗位
            CommonFuncCall.BindComBoxDataSource(cbolevel, "sys_personnel_level", "请选择");                 //级别

            if (wStatus == WindowStatus.Edit || wStatus == WindowStatus.Copy)
            {
                txtland_name.ReadOnly = true;
                DataTable dt = DBHelper.GetTable("查询人员信息", GlobalStaticObj_Server.DbPrefix + GlobalStaticObj_Server.CommAccCode, "v_User", "*", "user_id='" + userid + "'", "", "");
                if (dt != null && dt.Rows.Count > 0)
                {
                    BindControls(dt);
                }
            }
            else
            {
                txtuser_code.Caption     = CommonUtility.GetNewNo(SYSModel.DataSources.EnumProjectType.User);
                cmbCompany.SelectedIndex = 0;
            }
        }