コード例 #1
0
        //startup for first menu
        public void Run()
        {
            while (true)
            {
                PrintHeader();
                PrintMainMenu();

                string command = Console.ReadLine();

                if (command.ToUpper() == "Q")
                {
                    return;
                }
                try
                {
                    Console.Clear();
                    int          parkID = int.Parse(command);
                    IList <Park> parks  = parkDAO.GetAllParks();

                    Park selectedPark = parkDAO.GetInfo(parkID);

                    PrintSelectedPark(selectedPark);
                }
                catch (Exception ex)
                {
                    System.Console.WriteLine("Please select valid park");
                }
            }
        }