private void displayInfoEntity(dynamic one, string header) { if (header != "") { HelperIO.welcomeMessage(header); } System.Console.WriteLine(one.ToString()); }
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()); } }
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()); } } } }
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); } }