Beispiel #1
0
        public void StartWithdrawal(decimal amount, string currency)
        {
            RandomError();
            if (Account.ConvertToUAH(amount, currency) > 3000)
            {
                throw new LimitExceededException();
            }
            string NumberCredirCard = EnterConsoleValue.GetNumberCard("Enter Number Credir Card");

            Console.WriteLine($"You’ve deposit {amount} {currency} to your {NumberCredirCard} card successfully");
        }
Beispiel #2
0
        public void StartDeposit(decimal amount, string currency)
        {
            RandomError();
            if (Account.ConvertToUAH(amount, currency) > limitOfTransactions)
            {
                throw new LimitExceededException();
            }
            string NumberCredirCard = EnterConsoleValue.GetNumberCard("Enter Number Credir Card");
            string ExpiryDate       = EnterConsoleValue.GetExpiryDate("Enter Expiry Date");
            string CVV = EnterConsoleValue.GetCVV("Enter CVV");

            Console.WriteLine($"You’ve withdraw {amount} {currency} from your {NumberCredirCard} card successfully");
        }
Beispiel #3
0
        public virtual void StartWithdrawal(decimal amount, string currency)
        {
            Console.WriteLine($"Welcome, dear client, to the online bank {Name}!");
            Console.WriteLine("Please, enter your login");
            string login = Console.ReadLine();

            Console.WriteLine("Please, enter your passwor");
            Console.WriteLine($"Hello Mr {login}. Pick a card to proceed the transaction");
            for (int i = 0; i < AvailableCards.Length; i++)
            {
                Console.WriteLine($"{i}. {AvailableCards[i]}");
            }
            string card = EnterConsoleValue.GetCreditCardInBank("Enter Bank Card", AvailableCards);

            Console.WriteLine("You’ve deposit  {amount} {currency} from your {card[n]} card successfully", amount, currency, card);
        }
Beispiel #4
0
 public void StartDeposit(decimal amount, string currency)
 {
     RandomError();
     if (amount == 100 || amount == 500 || amount == 1000)
     {
         string GiftCardNumber = EnterConsoleValue.GetGiftCardNumber();
         foreach (string GiftNumber in usedGiftCardNumbers)
         {
             if (GiftNumber == GiftCardNumber)
             {
                 Console.WriteLine("This GiftCard was used");
                 return;
             }
         }
         usedGiftCardNumbers.Add(GiftCardNumber);
         Console.WriteLine($"You’ve deposit {amount} {currency} to your Account from {GiftCardNumber} GiftCard successfully");
     }
     else
     {
         Console.WriteLine("You must enter the correct amount equal to the face value of the certificate(100 / 500 / 1000).");
     }
 }