예제 #1
0
 private void displayInfoEntity(dynamic one, string header)
 {
     if (header != "")
     {
         HelperIO.welcomeMessage(header);
     }
     System.Console.WriteLine(one.ToString());
 }
예제 #2
0
        private void displayInfoEntities(dynamic one, string header)
        {
            if (one.Count > 0)
            {
                HelperIO.welcomeMessage(header);
            }
            int i = 0;

            foreach (Entity element in one)
            {
                System.Console.WriteLine((i++) + " -> " + element.ToString());
            }
        }
예제 #3
0
 private void displayInfoRoutes(int routeId, string header)
 {
     if (RouteList.Count > 0)
     {
         HelperIO.welcomeMessage(header);
         foreach (Route element in RouteList)
         {
             if (element.RouteId == routeId)
             {
                 System.Console.WriteLine(element.ToString());
             }
         }
     }
 }
예제 #4
0
        private string display(string header, IDictionary <string, string> menu, IDictionary <string, string> methtods, string active)
        {
            HelperIO.welcomeMessage(header);
            Console.WriteLine("Будь ласка виберіть один з пунктів:");
            foreach (KeyValuePair <string, string> item in menu)
            {
                Console.WriteLine("{0} - {1}", item.Key, item.Value);
            }
            string choice = Console.ReadLine();

            if (methtods.ContainsKey(choice))
            {
                Console.Clear();
                string value;
                methtods.TryGetValue(choice, out value);
                return(value);
            }
            else
            {
                HelperIO.displayError();
                return(active);
            }
        }