public void WithDraw(Customer customer, Account account, double amount) { double previous = account.AccountBalance; account.WithDraw(amount); createTransaction(account, customer, previous, account.AccountBalance, amount, "WithDraw"); }
public void Transfer(Customer customer, Account account, Account account2, double amount) { if (account.AccountNumber == account2.AccountNumber) { Console.WriteLine("Can't Transfer to the same account"); } else { if (account.AccountType.Equals("Checking Account") || account.AccountType.Equals("Business Account") && account2.AccountType.Equals("Checking Account") || account2.AccountType.Equals("Business Account")) { account.WithDraw(amount); account2.Deposit(amount); transferTransaction(account, customer, account2, account.AccountBalance, account2.AccountBalance, amount, "Transfer"); } } }