Esempio n. 1
0
        public static int ReadChoice()
        {
            Console.WriteLine("Please, enter the number of menu:");
            Console.WriteLine("1. Edit commodity name");
            Console.WriteLine("2. Edit commodity price");
            Console.WriteLine("3. Edit commodity time of expiration");
            Console.WriteLine("4. Edit commodity type");
            Console.WriteLine("5. Exit");
            int choice = ConsoleManager.ReadInt();

            return(choice);
        }
Esempio n. 2
0
        public static OrderStatuses ChoosenStatus()
        {
            ConsoleManager.ShowAllStatusesForAdmin();
            Console.WriteLine("Please choose the status:");
            int choiceOfUser = ConsoleManager.ReadInt();

            switch (choiceOfUser)
            {
            case 1:
                return(OrderStatuses.New);

                break;

            case 2:
                return(OrderStatuses.PaymentIsReceived);

                break;

            case 3:
                return(OrderStatuses.Received);

                break;

            case 4:
                return(OrderStatuses.Dispatched);

                break;

            case 5:
                return(OrderStatuses.Finished);

                break;

            case 6:
                return(OrderStatuses.CanceledByAdmin);

                break;

            default:
                Console.WriteLine("Please, enter number between 1 and 6");
                break;
            }
            return(OrderStatuses.New);
        }
Esempio n. 3
0
        public static void ChangeTheStatus()
        {
            Console.WriteLine("Enter ID of user:"******"Enter ID of order:");
                int idOfOrder = ConsoleManager.ReadInt();
                if (FindOrderByID(idOfOrder, AccountManager.FindUserById(choiceOfUser)) != null)
                {
                    FindOrderByID(idOfOrder, AccountManager.FindUserById(choiceOfUser)).Status = ChoosenStatus();
                }
                else
                {
                    Console.WriteLine("There is no such order!");
                    Console.WriteLine("Please, type the enter to continue...)");
                }
            }
            else
            {
                Console.WriteLine("There is no such user, \nplease, create it first!");
            }
        }
Esempio n. 4
0
 public static int GetID(string typeOfEntity)
 {
     Console.WriteLine("Please type the Id of your {0}: ", typeOfEntity);
     return(ConsoleManager.ReadInt());
 }