Example #1
0
 internal static (string email, string password) TakeUserDataToEnter()
 {
     (string email, string password)UserDataTuple;
     Console.WriteLine("Enter your email: ");
     UserDataTuple.email = ConsoleManager.ReadString();
     Console.WriteLine("Enter your password: ");
     UserDataTuple.password = ReadPassword();
     return(UserDataTuple);
 }
Example #2
0
        public static void FindCommodityByName()
        {
            Console.WriteLine("Please enter the name of commodity: ");
            string nameOfCommodity = ConsoleManager.ReadString();

            foreach (var item in commodities)
            {
                if (nameOfCommodity.Equals(item.Name))
                {
                    Console.WriteLine("Your commodity is: {0}", item.Name);
                    Console.WriteLine("It's price is: {0}", item.Price);
                    Console.WriteLine("Date of waranty expiration: {0}", item.TimeOfExpiration.ToString());
                    Console.WriteLine("Type of commodity is: {0}", item.Type.ToString());
                    Console.WriteLine("Please, type enter to continue...)");
                    Console.ReadKey();
                    return;
                }
            }
        }