Example #1
0
 private void displayAccount(BankAccount account)
 {
     if (account == null)
     {
         labelAccountBalance.Text = "";
     }
     else
     {
         labelAccountBalance.Text =  string.Format("{0, 10:N2}", account.Balance);
     }
 }
Example #2
0
 public NoSufficientFundsException(BankAccount account, decimal transactionAmount)
     : base("There are not sufficient funds to perform this transaction.")
 {
     this.account = account;
     this.transactionAmount = transactionAmount;
 }
Example #3
0
        private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            BankAccount newAccount = new BankAccount(0m);
            accounts.Add(newAccount);

            repopulateAccountsList();
            listBoxBankAccounts.SelectedItem = newAccount;
        }