コード例 #1
0
        /// <summary>
        /// Entry point for signup menu UI
        /// </summary>
        public void Start()
        {
            bool isValidInput;

            do
            {
                PrintSignUpOptions();
                userInput    = Console.ReadLine();
                isValidInput = menuBL.LoginInInputValidation(userInput);
                switch (userInput)
                {
                case "0":
                    GetCustomerDetails();
                    return;

                case "1":
                    GetManagerDetails();
                    return;
                }
            } while (!isValidInput || !userInput.Equals("x"));
        }
コード例 #2
0
        /// <summary>
        /// Entry point for login UI
        /// </summary>
        public void Start()
        {
            bool isValidInput;

            do
            {
                PrintLoginOptions();
                userInput    = Console.ReadLine();
                isValidInput = menuBL.LoginInInputValidation(userInput);
                switch (userInput)
                {
                case "0":
                    Customer customer = GetCustomerDetails();
                    if (customer == null)
                    {
                        Console.WriteLine("User Not Found");
                    }
                    else
                    {
                        Console.WriteLine("Customer Login successfull\n");
                        customerMenu.Start(customer);
                    }
                    break;

                case "1":
                    Manager manager = GetManagerDetails();
                    if (manager == null)
                    {
                        Console.WriteLine("Login unsuccessfull");
                    }
                    else
                    {
                        Console.WriteLine("Manager Login successfull\n");
                        managerMenu.Start(manager);
                    }
                    break;
                }
            } while (!isValidInput || !userInput.Equals("x"));
        }