private void addToolStripMenuItem_Click(object sender, EventArgs e) { AccountSaveForm form = new AccountSaveForm(); form.AccountSaved += new AccountSaveForm.AccountSavedEventHandler(refreshForm); form.ShowDialog(); }
private void editAccountToolStripMenuItem_Click(object sender, EventArgs e) { Account account = selectedAccount(); account.Load(DatabaseFactory.Default); Form editAccountForm = new AccountSaveForm(account); editAccountForm.Show(); }
private void editButton_Click(object sender, EventArgs e) { Account account = new Account(); account.Id = (long)accountListGrid.CurrentRow.Cells["id"].Value; account.Load(DatabaseFactory.Default); currentAccount = account; Form accountSaveForm = new AccountSaveForm(account); accountSaveForm.FormClosing += new FormClosingEventHandler(accountSaveForm_FormClosing); accountSaveForm.ShowDialog(); }