protected static Account GetAccountFromAccountDetails(AccountDetails details) { if (details == null) throw new Exception("ArticleDetails record is null!"); Account account = new Account(details.AccountID, details.Name, details.BSB, details.Number, details.StartAmount, new Bank(details.BankID)); return account; }
public bool InsertAccount(string name, string bsb, string number, double startAmount) { Account a = new Account(-1, name, bsb, number, startAmount, DefaultBank); _accounts.Add(a); int id = a.Insert(); return id >= 0; }