public static Person ShowPeopleFound(string name) { PeopleFound peopleFound = PeopleService.GetPersonByName(name); if (peopleFound.Status == false) { throw new Exception(peopleFound.Message); } int contador = 1; foreach (var person in peopleFound.People) { Console.WriteLine($"{contador} - {person.FullName}"); contador++; } int option = int.Parse(ReadString("Escolha uma pessoa: ")); if (option <1 | option> peopleFound.People.Count) { Console.WriteLine("Opção Inválida"); MainMenu(); } return(peopleFound.People[option - 1]); }
public static void ShowBirthdayPeople() { PeopleFound birthdayPeople = PeopleService.GetBirthdayPeople(); if (!birthdayPeople.Status) { Console.WriteLine(birthdayPeople.Message); } else { Console.WriteLine("Aniversariantes do dia"); foreach (var person in birthdayPeople.People) { Console.WriteLine($"{person.FullName}"); } } }