Пример #1
0
        // confirm a registration
        public static void ConfirmRegistration()
        {
            int roomNum = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("Confirm your selection? Yes/No");
            string confirmation = Console.ReadLine();

            switch (confirmation)
            {
            case ("Yes"):
                CustomerRoom.AssignRoom(roomNum);
                for (int i = 0; i < Hotel.HotelRooms.Length; i++)
                {
                    if (i == roomNum)
                    {
                        if (i == 0)
                        {
                            Hotel.HotelRooms[i] = roomNum + 1;
                        }
                        else
                        {
                            Hotel.HotelRooms[i] = roomNum;
                        }
                    }
                }
                break;

            case ("No"):
                RequestController.SelectCategory();
                break;
            }
        }
Пример #2
0
        // there is a method to show available room //Show available rooms

        // Show info about the provided funcitons
        public static void ShowInfo()
        {
            Console.WriteLine("[Tour agent list] [Hotel's guests info] [Available rooms] [Customer's tour agent] [Tour agent's statistics]");
            Console.WriteLine("Or write anything to come back to the main menu");
            string input = Console.ReadLine();

            switch (input)
            {
            case ("Tour agent list"):
                TourAgentList();
                ShowInfo();
                break;

            case ("Hotel's guests info"):
                ShowBookedRoomCustomerInfo();
                ShowInfo();
                break;

            case ("Available rooms"):
                TourAgent.ShowAvailableRoom();
                ShowInfo();
                break;

            case ("Customer's tour agent"):
                Console.Write("Customer's id: ");
                int id = Convert.ToInt32(Console.ReadLine());
                CustomerTourAgent(id);
                ShowInfo();
                break;

            case ("Tour agent's statistics"):
                Console.Write("Tour agnet's name&surname: ");
                string tourAgentNameSurname = Console.ReadLine();
                ShowTourAgentStatics(tourAgentNameSurname);
                ShowInfo();
                break;

            default:
                RequestController.SelectCategory();
                break;
            }
        }
Пример #3
0
        //Register a customer by tour agent in the hotel
        public static void RegisterCustomer(string tourAgent)
        {
            switch (tourAgent)
            {
            case ("false"):
                Console.WriteLine("Wrong info try again");
                RequestController.SelectCategory();
                break;

            default:
                Console.Write("Customer name: ");
                string name = Console.ReadLine();
                Console.Write("Customer surname: ");
                string surname = Console.ReadLine();
                Console.Write("Customer id: ");
                int      id          = Convert.ToInt32(Console.ReadLine());
                Customer newCustomer = new Customer(name, surname, id, tourAgent);
                CustomerRoom = newCustomer;
                break;
            }
        }
Пример #4
0
 static void Main(string[] args)
 {
     RequestController.SelectCategory();
 }