private void btnEdit_Click(object sender, EventArgs e) { Account account = (Account)lstAccounts.SelectedItem; var accountFrm = new AccountInfo(account); var result = accountFrm.ShowDialog(this); if (result == DialogResult.OK) { AddOrUpdateAccount?.Invoke(accountFrm._account); } }
private void btnAdd_Click(object sender, EventArgs e) { var account = new Account { UserId = Program.Global.global.CurrentUser.Id, }; var accountFrm = new AccountInfo(account); var result = accountFrm.ShowDialog(this); if (result == DialogResult.OK) { AddOrUpdateAccount?.Invoke(accountFrm._account); } }