예제 #1
0
 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);
         }
     }
 }
예제 #2
0
        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);
        }
예제 #3
0
 public void RegisterManager <TMgr>() where TMgr : IManager <TObj>, new()
 {
     _managers[typeof(TMgr)] = new TMgr();
 }