예제 #1
0
        public MasterBank()
        {
            bankResources   = new BankResources();
            accountServices = new AccountServices(bankResources);
            bankServices    = new BankServices(bankResources);

            /* Import Holders */
            FileManager.HolderImport holderImport = new FileManager.HolderImport();
            holderImport.start();

            foreach (Holder h in holderImport.getHolderCollection())
            {
                bankServices.newHolderForImport(h);
            }

            /* Order account list by Holder ID */
            var holderList       = bankServices.getMasterHolderList().OrderBy(c => c.getID());
            var startingHolderID = holderList.Last().getID();

            bankResources.setHolderIDStarter(startingHolderID);

            /* Order account list by Account Number */
            var newList = bankServices.getAccountList().OrderBy(c => c.getAccountNumber());
            var startingAccountNumber = newList.Last().getAccountNumber();

            bankResources.setAccountNumStarter(startingAccountNumber);
        }
예제 #2
0
 internal AccountServices(BankResources b)
 {
     this.bankResources = b;
 }
예제 #3
0
 internal BankServices(BankResources resource)
 {
     bankResources  = resource;
     masterHolder   = new List <Holder>();
     closedAccounts = new List <Account>();
 }