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);
            }
        }
Beispiel #2
0
        private void populateDropDownsWithOriginalData() // returns the original data selected.
        {
            using (mbl bl1 = new mbl())
            {
                mcl.Films films = getFilms();

                List <mcl.Director>       directors = bl1.GetDistinctDirectorsFromFilms(films);
                List <mcl.Actor>          actors    = bl1.GetDistinctActorsFromFilms(films);
                List <mcl.SimplisticFilm> sFilms    = bl1.GetDistinctSimplisticFilmsFromFilms(films);

                populateDropDowns(ddl.UseBlankItem, sFilms, directors, actors);
            }
        }
Beispiel #3
0
        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 populateDropDownsWithOriginalData()
        {
            mbl bl1 = new mbl();

            mcl.Films films = getFilms();

            List <mcl.Director>       directors     = bl1.GetDistinctDirectorsFromFilms(films);
            List <mcl.Actor>          actors        = bl1.GetDistinctActorsFromFilms(films);
            List <mcl.SimplisticFilm> sFilms        = bl1.GetDistinctSimplisticFilmsFromFilms(films);
            List <string>             filmYears     = bl1.GetDistinctFilmYearFromFilms(films);
            List <string>             imdbRatings   = bl1.GetDistinctImdbRatingFromFilms(films);
            List <string>             rottenRatings = bl1.GetDistinctRottenRatingFromFilms(films);

            populateDropDowns(avSV.DropDownLists.UseBlankItem, sFilms, directors, actors, filmYears, imdbRatings, rottenRatings);
        }