예제 #1
0
        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);
            }
        }
예제 #2
0
        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);
            }
        }