Exemple #1
0
        /// <summary>
        /// Gets customer details for login
        /// </summary>
        /// <returns></returns>
        public Customer GetCustomerDetails()
        {
            string email, pw;

            do
            {
                Console.WriteLine("Email: ");
                email = Console.ReadLine().ToLower();
                Console.WriteLine("Password: ");
                pw = Console.ReadLine();
            } while (!menuBL.EmailValidation(email));

            return(customerService.GetCustomerByLogin(pw, email));
        }
        /// <summary>
        /// Get manger details from user
        /// </summary>
        /// <returns></returns>
        public void GetManagerDetails()
        {
            string name, email, password;

            do
            {
                Console.WriteLine("Please enter your information to sign up to SoilMates");
                Console.WriteLine("Enter your name:");
                name = Console.ReadLine();
                Console.WriteLine("Enter your Email: ");
                email = Console.ReadLine().ToLower();
                Console.WriteLine("Enter your password: ");
                password = Console.ReadLine();
            } while (!menuBL.NameValidation(name) || !menuBL.EmailValidation(email));

            try
            {
                managerService.SignUpManager(name, email, password);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }