예제 #1
0
        private void HandleBankOfBarAccounts()
        {
            var adapter = new BankOfBarAccountAdapter();

            State.BankOfBarAccounts.ForEach(barAccount => {
                adapter.BarAccount     = barAccount;
                IAccountTarget account = DeepClone(adapter);
                State.AccountsToPrint.Add(account);
            });
        }
예제 #2
0
        public static void PrintDescriptions(IAccountTarget account)
        {
            var decimalLocation = account.GetBalance.decimalLocation;
            var stringBalance   = account.GetBalance.balance.ToString();

            if (decimalLocation != 0)
            {
                stringBalance = stringBalance.Insert(stringBalance.Length - decimalLocation, ".");
            }

            Printer.PrintLine();
            Printer.PrintLine("ACCOUNT INFORMATION");
            Printer.PrintLine($"Owner Name: {account.GetHonorific} {account.GetFirstName} {account.GetMiddleName} {account.GetLastName}".Replace("  ", " "));
            Printer.PrintLine($"Account Number: {account.AccountNumber}");
            Printer.PrintLine($"Balance: {stringBalance}");
            Printer.PrintLine();
        }