private void populateDropDownsWithFilteredData(string filmID, string directorID, string actorID) //populates the drop down list with the filtered data. { mcl.Films films = getFilms(); using (mbl bl1 = new mbl()) { mcl.Films tmp = bl1.GetFilmsSubset(filmID, directorID, actorID, films); List <mcl.Actor> actors = (actorID == null) ? bl1.GetDistinctActorsFromFilms(tmp) : bl1.GetDistinctActor(tmp, actorID); List <mcl.Director> directors = (directorID == null) ? bl1.GetDistinctDirectorsFromFilms(tmp) : bl1.GetDistinctDirector(tmp, directorID); List <mcl.SimplisticFilm> sFilms = (filmID == null) ? bl1.GetDistinctSimplisticFilmsFromFilms(tmp) : tmp.GetDistinctSimplisticFilm(filmID); populateDropDowns(ddl.UseBlankItem, sFilms, directors, actors); } }
private void populateDropDownsWithFilteredData(string filmID, string directorID, string actorID, string filmYear , string imdbRating, string rottenRating) { mcl.Films films = getFilms(); mbl bl1 = new mbl(); mcl.Films tmp = bl1.GetFilmsSubset(filmID, directorID, actorID, filmYear, imdbRating, rottenRating, films); List <mcl.Actor> actors = (actorID == null) ? bl1.GetDistinctActorsFromFilms(tmp) : bl1.GetDistinctActor(tmp, actorID); List <mcl.Director> directors = (directorID == null) ? bl1.GetDistinctDirectorsFromFilms(tmp) : bl1.GetDistinctDirector(tmp, directorID); List <mcl.SimplisticFilm> sFilms = (filmID == null) ? bl1.GetDistinctSimplisticFilmsFromFilms(tmp) : tmp.GetDistinctSimplisticFilm(filmID); List <string> filmYears = (filmYear == null) ? bl1.GetDistinctFilmYearFromFilms(tmp) : tmp.GetDistinctFilmYear(filmYear); List <string> imdbRatings = (imdbRating == null) ? bl1.GetDistinctImdbRatingFromFilms(tmp) : tmp.GetDistinctImdbRating(imdbRating); List <string> rottenRatings = (rottenRating == null) ? bl1.GetDistinctRottenRatingFromFilms(tmp) : tmp.GetDistinctRottenRating(rottenRating); populateDropDowns(avSV.DropDownLists.UseBlankItem, sFilms, directors, actors, filmYears, imdbRatings, rottenRatings); if (isSelectionComplete(sFilms, actors, directors)) { mcl.Film film = new mcl.Film(tmp.GetDistinctFilm(sFilms[0].FilmID), actors, directors); selectionComplete(film); } }