private void btnSave_Click(object sender, EventArgs e) { if (CheckValidate()) { string strError = ""; try { strError = busUser.ChangePassword(txtUsername.Text, User.UserInfo.LanguageID, Encryption.Encrypt(txtNewPassword.Text)); if (strError.Equals("")) { txtOldPassword.EditValue = txtNewPassword.EditValue = txtConfirmPassword.EditValue = null; Commons.ShowMessage((User.UserInfo.LanguageID.Equals("VN")) ? "Đổi mật khẩu thành công." : "Change password successfully.", 1); User.UserInfo = busUser.GetDataByID(txtUsername.Text, txtUsername.Text, User.UserInfo.LanguageID); txtOldPassword.Focus(); depError.ClearErrors(); } else { Commons.ShowMessage(strError, 0); txtOldPassword.Focus(); } } catch (Exception ex) { Commons.ShowExceptionMessage(ex); txtOldPassword.Focus(); } } }
private void btnUpdate_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (curRow != null) { SYS_tblUserDTO item = busUser.GetDataByID(curRow["Username"] + "", User.UserInfo.Username, User.UserInfo.LanguageID); if (item != null) { Commons.OpenInputForm(new uc_UserDetail(this, item), "Cập Nhật Người Dùng", "Update User", new System.Drawing.Size(455, 460)); } } }