public bool VerwijderFilm(Media input) { if (input != null) { if (Films.Count != 0) { if (Films.Contains(input)) { Films.Remove((Film)input); return(true); } else { return(false); } } else { return(false); } } else { throw new ArgumentNullException(); } }
public bool VoegFilmToe(Media input) { if (input != null) { if (Films.Count != 0) { if (Films.Contains(input)) { return(false); } else { Films.Add((Film)input); return(true); } } else { Films.Add((Film)input); return(true); } } else { throw new ArgumentNullException(); } }
public void Add(Film film) { if (film == null) { return; } if (!Films.Contains(film)) { Films.Add(film); if (film.genre != null) { AllGenres.Add(film.genre.name); } if (film.FilmActor != null) { foreach (var fa in film.FilmActor) { if (fa.Actor != null) { AllActors.Add(fa.Actor.fullName); } } } } }
public bool IsFavourite(Film film) { if (Films.Contains(film)) { return(true); } return(false); }
public bool AddFilm(Film film) { if (Films.Contains(film)) { return(false); } Films.Add(film); return(true); }
public void DeleteFilm(Film film) { if (Films.Contains(film)) { Films.Remove(film); } foreach (var actor in film.Actors) { actor.Films.Remove(film); } foreach (var producer in film.Producers) { producer.Films.Remove(film); } DataHelper.FilmToActorConnections.Remove(film.ID); DataHelper.FilmToProducerConnections.Remove(film.ID); }