/// <summary>
        /// This method accepts and validates the String Input
        /// </summary>
        /// <returns>Returns the String inputted by User</returns>
        internal static string GetUserInputString()
        {
            var userInputString = UserInputGathering.GetStringInput();

            if (!UserInputValidation.IsValidString(userInputString))
            {
                throw new InvalidOperationException(" ");
            }

            return(userInputString);
        }
Beispiel #2
0
        internal static string GetCustomerEmail()
        {
            var customerEmailAddress = UserInputGathering.GetStringInput("Enter Customer Email");

            if (!UserInputValidation.IsValidEmailAddress(customerEmailAddress))
            {
                throw new InvalidOperationException(" ");
            }

            return(customerEmailAddress);
        }
Beispiel #3
0
        internal static string GetBillPaymemtMode()
        {
            var billPaymentMode = UserInputGathering.GetStringInput("Enter Bill Payment Mode");

            if (!UserInputValidation.IsValidString(billPaymentMode))
            {
                throw new InvalidOperationException(" ");
            }

            return(billPaymentMode);
        }
Beispiel #4
0
        internal static string GetCustomerIdentity()
        {
            var customerIdentity = UserInputGathering.GetStringInput("Enter Customer Identity Type");

            if (!UserInputValidation.IsValidCustomerIdentity(customerIdentity))
            {
                throw new InvalidOperationException(" ");
            }

            return(customerIdentity);
        }
Beispiel #5
0
        internal static string GetCustomerName()
        {
            var customerName = UserInputGathering.GetStringInput("Enter Customer Name");

            if (!UserInputValidation.IsValidString(customerName))
            {
                throw new InvalidOperationException(" ");
            }

            return(customerName);
        }
Beispiel #6
0
        internal static decimal GetBillAmount()
        {
            var amount     = UserInputGathering.GetStringInput("Enter Bill Amount");
            var billAmount = Decimal.Parse(amount);

            if (billAmount <= 0 || billAmount >= 1000000)
            {
                Console.WriteLine("Bad Amount Value");
                throw new InvalidOperationException(" ");
            }

            return(billAmount);
        }