private void btnOk_Click(object sender, System.EventArgs e) { dxErrorProvider1.ClearErrors( ); bool isOk = true; if (string.IsNullOrEmpty(texNumPerson.Text)) { dxErrorProvider1.SetError(texNumPerson, "用户编号不可为空"); isOk = false; } if (string.IsNullOrEmpty(texNamePerson.Text)) { dxErrorProvider1.SetError(texNamePerson, "用户姓名不可为空"); isOk = false; } if (string.IsNullOrEmpty(texPW.Text)) { dxErrorProvider1.SetError(texPW, "口令不可为空"); isOk = false; } if (string.IsNullOrEmpty(texPWS.Text)) { dxErrorProvider1.SetError(texNumPerson, "请确认口令"); isOk = false; } if (isOk == false) { return; } if (texPW.Text.Trim( ) != texPWS.Text.Trim( )) { XtraMessageBox.Show("两次输入口令不一致,请重新输入"); return; } string pwdMD5 = Utility.DesEncryptUtil.EncryptMD5(texPW.Text); LineProductMesBll.Bll.EmployeeBll _bll = new LineProductMesBll.Bll.EmployeeBll( ); isOk = _bll.EditPw(texNumPerson.Text, pwdMD5); if (isOk == true) { XtraMessageBox.Show("成功设置口令"); } else { XtraMessageBox.Show("设置口令失败"); } }
public FormEmployee( ) { InitializeComponent( ); _bll = new LineProductMesBll.Bll.EmployeeBll( ); _model = new LineProductMesEntityu.EmployeeEntity( ); ToolBarContain.ToolbarC(barTool, toolExamin); UnEnable( ); GridViewMoHuSelect.SetFilter(gridView1); FieldInfo fi = typeof(DevExpress.Utils.Paint.XPaint).GetField("graphics", BindingFlags.Static | BindingFlags.NonPublic); fi.SetValue(null, new DrawXPaint( )); wait.Hide( ); getValueForPUATask( ); getDepart( ); clear( ); }
public FormLogin( ) { InitializeComponent( ); this.StartPosition = FormStartPosition.CenterScreen; _bll = new LineProductMesBll.Bll.EmployeeBll( ); labUserName.Visible = labPassW.Visible = labTip.Visible = false; SetImage.setImage(pictureBox1, "SetConn.png"); UserInfoMation.userName = config.AppSettings.Settings ["UserName"].Value; UserInfoMation.userNum = config.AppSettings.Settings ["UserNum"].Value; UserInfoMation.sign = config.AppSettings.Settings ["Sign"].Value; if (UserInfoMation.sign.Equals("1")) { txtUserName.Text = UserInfoMation.userName; txtUserName.Tag = UserInfoMation.userNum; } }