public static void SearchCountry(List <Danni> exam) { Console.WriteLine("Molq vavedete darjavata po koqto 6te tarsite"); string tempCountry = Console.ReadLine(); Danni result = exam.Where(item => item.Country == tempCountry).FirstOrDefault(); Console.WriteLine(result); }
public static void SearchCapitalCity(List <Danni> exam) { Console.WriteLine("Molq vavedete stolicata po koqto 6te tarsite"); string tempCapital = Console.ReadLine(); Danni result = exam.Where(item => item.CapitalCity == tempCapital).FirstOrDefault(); Console.WriteLine(result); }
public static void AddDanni() { Console.WriteLine("vavedete stolica:"); string capitalCity = Console.ReadLine(); Console.WriteLine("vavedete darjava"); string country = Console.ReadLine(); Danni entry = new Danni(capitalCity, country); exam.Add(entry); WriteToFile(exam, filename, false); }
public static void RedaktiraneNaZapis(List <Danni> exam) { Console.WriteLine("Molq vavedete darjavata koqto iskate da promenite"); string tempCountry = Console.ReadLine(); Danni result = exam.Where(item => item.Country == tempCountry).FirstOrDefault(); Console.WriteLine("Molq vavedete novata stolica"); result.CapitalCity = Console.ReadLine(); Console.WriteLine("molq vavedete novata darjava"); result.Country = Console.ReadLine(); WriteToFile(exam, filename, false); }