private void btnOk_Click(object sender, EventArgs e) { if (this.ValidateChildren(ValidationConstraints.Enabled) == false) { return; } if (txtConfirmPassword.Text != txtPassword.Text) { DlgHelper.ShowAlertMsgBox("输入密码不一致,请重新输入!"); return; } if (txtConfirmPassword.Text.Trim().Length < 6) { DlgHelper.ShowAlertMsgBox("密码长度最少是6位!"); return; } var result = new UserBLL().ChangePassword(txtOldPassword.Text.Trim(), txtConfirmPassword.Text.Trim(), _userName); if (result.Code > 0) { DlgHelper.ShowAlertMsgBox(result.Msg); return; } else { DlgHelper.ShowSuccessBox(); this.Close(); } }
private void btnConfirm_Click(object sender, EventArgs e) { if (this.ValidateChildren(ValidationConstraints.Enabled) == false) { return; } if (_editOrView == true) { var userInfo = new WebUserInfo() { ID = _userID, UserName = txtUserName.Text.Trim(), Adress = txtAddress.Text.Trim(), Phone = txtPhone.Text.Trim(), IsMonitor = ckBoxIsMonitor.Checked, IsRemovalMan = ckBoxIsRemovalMan.Checked, IsPutinMan = ckBoxIsPutinMan.Checked, }; var result = new UserBLL().UpdateUser(userInfo); if (result.Code > 0) { DlgHelper.ShowAlertMsgBox(result.Msg); return; } else { DlgHelper.ShowSuccessBox(); this.Close(); if (CallBack != null) { CallBack(); } } } }