public void AddCustomerRecursively(Customer c) { CMgr.AddCustomer(c); foreach (Account a in c.Accounts) { AMgr.AddAccount(a); foreach (Transaction t in a.Transactions) { TMgr.AddTransaction(t); } } }
public Account GetPagedStatementByAccountNumber(int accNo, int page) { Account a = AMgr.GetAccountByAccountNumber(accNo); if (a is null) { throw new KeyNotFoundException( "no account with this account number exists"); } List <Transaction> tHistory = TMgr.GetTransactionsForAccount(accNo, TransactionPageSize, page); a.Transactions = tHistory; return(a); }
public void RegisterManager <TMgr>() where TMgr : IManager <TObj>, new() { _managers[typeof(TMgr)] = new TMgr(); }