コード例 #1
0
ファイル: Administrator.cs プロジェクト: ngojayev/HotelApp
        // 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;
            }
        }
コード例 #2
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;
            }
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: ngojayev/HotelApp
 static void Main(string[] args)
 {
     RequestController.SelectCategory();
 }