private void btnChangePass_Click(object sender, EventArgs e) { if (this.gridUsers.CurrentRow != null && this.iGridEXAcc.CurrentRow != null) { var user = (UserDto)this.gridUsers.CurrentRow.DataRow; var account = (AccountDto)this.iGridEXAcc.CurrentRow.DataRow; if (user != null && account != null) { string text = string.Format("آیا از تغییر رمز عبور {0} , {1} مطمئن هستید؟", account.Description, user.FullName); if (ISE.Framework.Client.Win.Viewer.MessageViewer.ShowAlert(text) != DialogResult.OK) { return; } ChangePasswordEntry entry = new ChangePasswordEntry(); ISE.UILibrary.Utils.UIUtils.SetFrmTrans(entry, "تغییر رمز عبور", FormBorderStyle.FixedDialog); if (entry.DialogResult != DialogResult.OK) { return; } if (view.ChangePassword(account.Username, entry.NewPassword, entry.PrevPassword, account)) { ISE.Framework.Client.Win.Viewer.MessageViewer.ShowMessage("رمز عبور با موفقیت تغییر پیدا کرد."); } } } }