Beispiel #1
0
        static void CreateBank()
        {
            BankRepository br = new BankRepository();

            Bank b = new Bank("Burns Bank", "BUBKFIHH");

            br.CreateBank(b);

            Bank b2 = new Bank("Flanders Bank", "FABKFIHH");

            br.CreateBank(b2);
        }
Beispiel #2
0
        public void CreateBank()
        {
            Bank bank = new Bank
            {
                Name = "OmaSP",
                Bic  = "ITELFIHH"
            };

            _bankRepository.CreateBank(bank);
        }
Beispiel #3
0
        public void CreateBank()
        {
            Bank bank = new Bank
            {
                Name = "Danske Bank",
                Bic  = "DABAFIHH"
            };

            _bankRepository.CreateBank(bank);
        }
Beispiel #4
0
        public static void AddBank(string name)
        {
            if (Banks.Any(c => c.Name == name))
            {
                return;
            }

            BankRepository.CreateBank(name);
            Banks = BankRepository.GetAllBanks();
        }
        public void CreateSystem()
        {
            Bank bank = new Bank();

            BankProfile profile = new BankProfile
            {
                BankProfileId = bank.BankId,
                Name          = "Bank of Tokyo-Mitsubishi UFJ",
                Location      = "Tokyo - Shibuya - Sector II - Building 'Mitsubishi Corporation Office'",
                Code          = "JAP_MITSU_BANK_MAIN",
                Country       = "Japan"
            };
            List <BankAccount> accounts = new List <BankAccount>
            {
                new BankAccount
                {
                    AccountCode        = profile.Code,
                    AccountName        = profile.Name.Replace("MAIN", "TOKYO"),
                    TotalFinanceAmount = 2000000000,
                },
                new BankAccount
                {
                    AccountCode        = profile.Code,
                    AccountName        = profile.Name.Replace("MAIN", "OSAKA"),
                    TotalFinanceAmount = 1000000000,
                },
                new BankAccount
                {
                    AccountCode        = profile.Code,
                    AccountName        = profile.Name.Replace("MAIN", "KYOTO"),
                    TotalFinanceAmount = 500000000,
                }
            };

            bank.Profile = profile;
            foreach (var e in accounts)
            {
                bank.Accounts.Add(e);
            }
            foreach (var e in accounts)
            {
                sum = sum += e.TotalFinanceAmount;
            }
            List <AutomatedTellerMachine> automatedTellerMachines = new List <AutomatedTellerMachine>();

            for (int i = 0; i < 10; i++)
            {
                automatedTellerMachines.Add(new AutomatedTellerMachine
                {
                    AutomatedTellerMachineCode =
                        profile.Code.Replace("MAIN", "ATM_" + "ID_" + rand.Next(0, 9) + rand.Next(0, 9)),
                    CurrentAviableMoneyAmount = sum / 10,
                    OwnerBankCode             = profile.Code
                });
            }
            foreach (var e in automatedTellerMachines)
            {
                bank.BankAutomatedTellerMachines.Add(e);
            }

            Repository.CreateBank(bank, AdministrationAccessLevel.FullAccessToSystem);
        }