private void iGridToolBar2_NewRecord(object sender, EventArgs e) { if (this.gridUsers.CurrentRow != null) { var user = (UserDto)this.gridUsers.CurrentRow.DataRow; if (user != null) { UCAccountEntry entry = new UCAccountEntry(); ISE.UILibrary.Utils.UIUtils.SetFrmTrans(entry, "ایجاد حساب", FormBorderStyle.FixedDialog); if (entry.DialogResult != DialogResult.OK) { return; } if (view.AddAccount(entry.Account, user)) { ISE.Framework.Client.Win.Viewer.MessageViewer.ShowMessage(ISE.Framework.Client.Win.Viewer.OperationType.Insert); } } } }
private void iGridToolBar2_EditRecord(object sender, EventArgs e) { if (this.iGridEXAcc.CurrentRow != null) { var account = (AccountDto)this.iGridEXAcc.CurrentRow.DataRow; if (account != null) { UCAccountEntry entry = new UCAccountEntry(ClassLibrary.TransMode.EditRecord, account); ISE.UILibrary.Utils.UIUtils.SetFrmTrans(entry, "تغییر حساب", FormBorderStyle.FixedDialog); if (entry.DialogResult != DialogResult.OK) { return; } if (view.UpdateAccount(entry.Account)) { ISE.Framework.Client.Win.Viewer.MessageViewer.ShowMessage(ISE.Framework.Client.Win.Viewer.OperationType.Insert); } } } }