/// <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); }
internal static string GetCustomerEmail() { var customerEmailAddress = UserInputGathering.GetStringInput("Enter Customer Email"); if (!UserInputValidation.IsValidEmailAddress(customerEmailAddress)) { throw new InvalidOperationException(" "); } return(customerEmailAddress); }
internal static string GetBillPaymemtMode() { var billPaymentMode = UserInputGathering.GetStringInput("Enter Bill Payment Mode"); if (!UserInputValidation.IsValidString(billPaymentMode)) { throw new InvalidOperationException(" "); } return(billPaymentMode); }
internal static string GetCustomerIdentity() { var customerIdentity = UserInputGathering.GetStringInput("Enter Customer Identity Type"); if (!UserInputValidation.IsValidCustomerIdentity(customerIdentity)) { throw new InvalidOperationException(" "); } return(customerIdentity); }
internal static string GetCustomerName() { var customerName = UserInputGathering.GetStringInput("Enter Customer Name"); if (!UserInputValidation.IsValidString(customerName)) { throw new InvalidOperationException(" "); } return(customerName); }
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); }