private static void UpdateSerie() { Console.Write("Enter with serie id: "); int serieIndex = int.Parse(Console.ReadLine()); foreach (int i in Enum.GetValues(typeof(Genre))) { Console.WriteLine("{0}-{1}", i, Enum.GetName(typeof(Genre), i)); } Console.Write("Enter the desired option: "); int inGenre = int.Parse(Console.ReadLine()); Console.Write("Enter with serie title: "); string inTitle = Console.ReadLine(); Console.Write("Enter with serie year: "); int inYear = int.Parse(Console.ReadLine()); Console.Write("Enter with serie description: "); string inDescription = Console.ReadLine(); Serie updateSerie = new Serie(id: serieIndex, genre: (Genre)inGenre, title: inTitle, year: inYear, description: inDescription); repository.Update(serieIndex, updateSerie); }
private static void UpdateSerie() { Console.WriteLine("Digite o Id da série:"); int indexSerie = int.Parse(Console.ReadLine()); foreach (int i in Enum.GetValues(typeof(Genre))) { Console.WriteLine("{0} - {1}", i, Enum.GetName(typeof(Genre), i)); } Console.Write("Digite o gênero entre as opções acima: "); int genreEntry = int.Parse(Console.ReadLine()); Console.Write("Digite o Título da Série: "); string titleEntry = Console.ReadLine(); Console.Write("Digite o Ano de Inicio da Série: "); int yearEntry = int.Parse(Console.ReadLine()); Console.Write("Digite a Descrição da Série: "); string descriptionEntry = Console.ReadLine(); Serie updateSerie = new Serie(id: indexSerie, genre: (Genre)genreEntry, title: titleEntry, year: yearEntry, description: descriptionEntry); repository.Update(indexSerie, updateSerie); }
private static void UpdateSerie() { Console.WriteLine("3- To update serie"); Console.WriteLine("Type the Id of the serie: "); int id = int.Parse(Console.ReadLine()); foreach (int item in Enum.GetValues(typeof(Genres))) { Console.WriteLine("{0}-{1}", item, Enum.GetName(typeof(Genres), item)); } Console.Write("Choose a genre referring to the items above: "); int genre = int.Parse(Console.ReadLine()); Console.Write("Type the title of the series: "); string title = Console.ReadLine(); Console.Write("Type the release year of the serie: "); int year = int.Parse(Console.ReadLine()); Console.Write("Type the description of the serie: "); string description = Console.ReadLine(); Serie updateSerie = new Serie(id: repository.NextId(), genres: (Genres)genre, title: title, year: year, description: description); repository.Update(id, updateSerie); }
private static void UpdateSerie() { Console.Write("Inform the Serie Id: "); int serieIndex = int.Parse(Console.ReadLine()); foreach (int i in Enum.GetValues(typeof(Genre))) { Console.WriteLine("{0}-{1}", i, Enum.GetName(typeof(Genre), i)); } Console.Write("Select the category between the options above: "); int genreEntry = int.Parse(Console.ReadLine()); Console.Write("Inform the Serie Title: "); string titleEntry = Console.ReadLine(); Console.Write("Inform the Serie release year "); int yearEntry = int.Parse(Console.ReadLine()); Console.Write("Inform the Serie description: "); string descriptionEntry = Console.ReadLine(); Serie updateSerie = new Serie(id: serieIndex, genre: (Genre)genreEntry, title: titleEntry, year: yearEntry, description: descriptionEntry); repository.Update(serieIndex, updateSerie); }