public static void editBooks(List <Books> BookList) { //Showing Existing Books DisplayExistingItems.Display(BookList); Console.WriteLine("Choose Book For Edit:"); int index = Convert.ToInt32(Console.ReadLine()) - 1; var book = BookList[index]; if (book._endingDate != DateTime.MinValue) { Console.WriteLine("You Cant't Edit This!!! Its Already End!!!!"); } else { book._totalTime += AddTime(); book._totalDay += AddDay(); book._rating = ChangeRating(book._rating); book._endingDate = AddEndingDate(); // OverAll Result Program.TotalConsumptionTime += book._totalTime; Program.TotalDaysOfConsumption += book._totalDay; // Individual Result Program.ConsumptiontimeForBooks += book._totalTime; Program.ConsumptionDaysForBooks += book._totalDay; } }
public static void editMovies(List <Movies> MovieList) { //Showing Existing Movies DisplayExistingItems.Display(MovieList); Console.WriteLine("Choose Series For Edit:"); int index = Convert.ToInt32(Console.ReadLine()) - 1; var movie = MovieList[index]; if (movie._endingDate != DateTime.MinValue) { Console.WriteLine("You Cant't Edit This!! Its Already End!!!!"); } else { movie._totalTime += AddTime(); movie._totalDay += AddDay(); movie._rating = ChangeRating(movie._rating); movie._endingDate = AddEndingDate(); // OverAll Result Program.TotalConsumptionTime += movie._totalTime; Program.TotalDaysOfConsumption += movie._totalDay; // Individual Result Program.ConsumptiontimeForMovies += movie._totalTime; Program.ConsumptionDaysForMovies += movie._totalDay; } }
public static void Display(List <Books> BookList) { DisplayExistingItems.Display(BookList); int index = ChooseIndex(); isIndexValid(index, BookList.Count); var book = BookList[index]; Console.WriteLine("Name= {0} Days= {1} Hours= {2} Rating= {3}", book._name, book._totalDay, book._totalTime, book._rating); }
public static void Display(List <Movies> MovieList) { DisplayExistingItems.Display(MovieList); int index = ChooseIndex(); isIndexValid(index, MovieList.Count); var movie = MovieList[index]; Console.WriteLine("Name= {0} Days= {1} Hours= {2} Rating= {3}", movie._name, movie._totalDay, movie._totalTime, movie._rating); }
public static void Display(List <Series> SeriesList) { DisplayExistingItems.Display(SeriesList); int index = ChooseIndex(); isIndexValid(index, SeriesList.Count); var series = SeriesList[index]; Console.WriteLine("Name= {0} Days= {1} Hours= {2} Rating= {3}", series._name, series._totalDay, series._totalTime, series._rating); }
public static void delete(List <Books> BookList) { if (BookList.Count == 0) { Console.WriteLine("No item Left add First!!"); Program.MainMenu(); } DisplayExistingItems.Display(BookList); int index = ChooseIndex(); BookList.RemoveAt(IndexValid(index, BookList.Count)); }