private void MainForum_Load(object sender, EventArgs e) { // Create a new accounts collection BankAccountCollection accounts = new BankAccountCollection(); // Add accounts to the accounts collection accounts.Add(new SavingsAccount(0)); accounts.Add(new SavingsAccount(0)); accounts.Add(new LineOfCreditAccount(0, 10000)); // Create a new customer with the accounts collection this.customer = new Customer(accounts); lstAccounts.DataSource = customer.Accounts; }
public WithdrawForm(Customer customer, int selectedAccount) { InitializeComponent(); this.customer = customer; this.selectedAccount = selectedAccount; }