public void OnPost()
 {
     Movies = MovieDatabase.Search(SearchTerms);
     Movies = MovieDatabase.FilterByMPAARating(Movies, MPAARatings);
     Movies = MovieDatabase.FilterByGenre(Movies, Genres);
     Movies = MovieDatabase.FilterByIMDBRating(Movies, IMDBMin, IMDBMax);
 }
示例#2
0
 public void OnPost()
 {
     Movies = MovieDatabase.Search(SearchTerms);
     Movies = MovieDatabase.FilterByMPAARating(Movies, MPAARatings);
     Movies = MovieDatabase.FilterByIMDBRating(Movies, IMDBin, IMDBMax);
     Movies = MovieDatabase.FilterByRottenTomatoesRating(Movies, TomatoesMin, TomatoesMax);
 }
 public void OnGet()
 {
     MPAARatings = Request.Query["MPAARatings"];
     SearchTerms = Request.Query["SearchTerms"];
     Movies      = MovieDatabase.Search(SearchTerms);
     Movies      = MovieDatabase.FilterByMPAARating(Movies, MPAARatings);
     Movies      = MovieDatabase.FilterByIMDBRating(Movies, IMDBMin, IMDBMax);
     Movies      = MovieDatabase.FilterByRottenTomatoesRating(Movies, RTMin, RTMax);
 }
 /// <summary>
 /// Gets the search results for display on the page
 /// </summary>
 public void OnGet(double?IMDBMin, double?IMDBMax, double?RottenMin, double?RottenMax)
 {
     this.IMDBMin   = IMDBMin;
     this.IMDBMax   = IMDBMax;
     this.RottenMin = RottenMin;
     this.RottenMax = RottenMax;
     Movies         = MovieDatabase.Search(SearchTerms);
     Movies         = MovieDatabase.FilterByMPAARating(Movies, MPAARatings);
     Movies         = MovieDatabase.FilterByGenre(Movies, Genres);
     Movies         = MovieDatabase.FilterByIMDBRating(Movies, this.IMDBMin, this.IMDBMax);
     Movies         = MovieDatabase.FilterByRottenRating(Movies, this.RottenMin, this.RottenMax);
 }
 /// <summary>
 /// Gets the search results for display on the page
 /// </summary>
 public void OnGet(double?IMDBMin, double?IMDBMax)
 {
     SearchTerms = Request.Query["SearchTerms"];
     MPAARatings = Request.Query["MPAARating"];
     Genres      = Request.Query["Genres"];
     // Nullable conversion workaround
     this.IMDBMin = IMDBMin;
     this.IMDBMax = IMDBMax;
     Movies       = MovieDatabase.Search(SearchTerms);
     Movies       = MovieDatabase.FilterByMPAARating(Movies, MPAARatings);
     Movies       = MovieDatabase.FilterByGenre(Movies, Genres);
     Movies       = MovieDatabase.FilterByIMDBRating(Movies, IMDBMin, IMDBMax);
 }
 /// <summary>
 /// Does the response initialization for incoming GET requests
 /// </summary>
 public void OnGet(double?IMDBMin, double?IMDBMax, double?RottenTomatoeMin, double?RottenTomatoeMax)
 {
     // Nullable conversion workaround
     this.IMDBMin          = IMDBMin;
     this.IMDBMax          = IMDBMax;
     this.RottenTomatoeMin = RottenTomatoeMin;
     this.RottenTomatoeMax = RottenTomatoeMax;
     Movies = MovieDatabase.Search(SearchTerms);
     Movies = MovieDatabase.FilterByMPAARating(Movies, MPAARatings);
     Movies = MovieDatabase.FilterByGenre(Movies, Genres);
     Movies = MovieDatabase.FilterByIMDBRating(Movies, IMDBMin, IMDBMax);
     Movies = MovieDatabase.FilterByRottenTomatoeRating(Movies, RottenTomatoeMin, RottenTomatoeMax);
 }
示例#7
0
 /// <summary>
 /// Gets the search results for display on the page
 /// </summary>
 public void OnGet(double?IMDBMin, double?IMDBMax)
 {
     this.IMDBMin = IMDBMin;
     this.IMDBMax = IMDBMax;
     //SearchTerms = Request.Query["SearchTerms"];
     //MPAARatings = Request.Query["MPAARatings"];
     //Genres = Request.Query["Genres"];
     //IMDBMin = float.Parse(Request.Query["IMDBMin"]);
     Movies = MovieDatabase.Search(SearchTerms);
     Movies = MovieDatabase.FilterByMPAARating(Movies, MPAARatings);
     Movies = MovieDatabase.FilterByGenre(Movies, Genres);
     Movies = MovieDatabase.FilterByIMDBRating(Movies, IMDBMin, IMDBMax);
 }
示例#8
0
 /// <summary>
 /// Gets the search results for display on the page
 /// </summary>
 public void OnGet(double?IMDBMin, double?IMDBMax, int?RottenMin, int?RottenMax)
 {
     this.IMDBMin   = IMDBMin;
     this.IMDBMax   = IMDBMax;
     this.RottenMin = RottenMin;
     this.RottenMax = RottenMax;
     MPAARatings    = Request.Query["MPAARatings"];
     Genres         = Request.Query["Genres"];
     Movies         = MovieDatabase.Search(SearchTerms);
     Movies         = MovieDatabase.FilterByMPAARating(Movies, MPAARatings);
     Movies         = MovieDatabase.FilterByGenre(Movies, Genres);
     Movies         = MovieDatabase.FilterByIMDBRating(Movies, IMDBMin, IMDBMax);
     Movies         = MovieDatabase.FilterByRottenTomatoes(Movies, RottenMin, RottenMax);
 }
 /// <summary>
 /// Gets the search results for display on the page
 /// </summary>
 public void OnGet(string SearchTerms, string[] MPAARatings, string[] Genres, double?IMDBMin, double?IMDBMax, double?TomatoesMin, double?TomatoesMax)
 {
     // Nullable conversion workaround
     this.TomatoesMax = TomatoesMax;
     this.TomatoesMin = TomatoesMin;
     this.IMDBMin     = IMDBMin;
     this.IMDBMax     = IMDBMax;
     this.SearchTerms = SearchTerms;
     this.MPAARatings = MPAARatings;
     this.Genres      = Genres;
     Movies           = MovieDatabase.Search(SearchTerms);
     Movies           = MovieDatabase.FilterByMPAARating(Movies, MPAARatings);
     Movies           = MovieDatabase.FilterByGenre(Movies, Genres);
     Movies           = MovieDatabase.FilterByIMDBRating(Movies, IMDBMin, IMDBMax);
     Movies           = MovieDatabase.FilterByRTRating(Movies, TomatoesMin, TomatoesMax);
 }
        public void OnGet(double?IMDBMin, double?IMDBMax, double?RottenMax, double?RottenMin, string[] MPAARatings, string[] Genres, string SearchTerms)
        {
            this.SearchTerms = SearchTerms;
            this.Genres      = Genres;
            this.MPAARatings = MPAARatings;
            this.IMDBMin     = IMDBMin;
            this.IMDBMax     = IMDBMax;
            this.RottenMax   = RottenMax;
            this.RottenMin   = RottenMin;

            Movies = MovieDatabase.Search(SearchTerms);
            Movies = MovieDatabase.FilterByMPAARating(Movies, MPAARatings);
            Movies = MovieDatabase.FilterByGenre(Movies, Genres);
            Movies = MovieDatabase.FilterByIMDBRating(Movies, IMDBMin, IMDBMax);
            Movies = MovieDatabase.FilterByRottenRating(Movies, RottenMin, RottenMax);
        }
示例#11
0
        public void OnGet(string SearchTerms, string[] MPAARatings, string[] Genres, double IMDBMin, double IMDBMax, uint RTMin, uint RTMax) // string SearchTerms, string[] MPAARatings, string[] Genre, double IMDBMin, double IMDBMax, uint RTMin, uint RTMax (as parameters)
        {
            //SearchTerms = Request.Query["SearchTerms"];
            Movies = MovieDatabase.Search(SearchTerms);

            //MPAARatings = Request.Query["MPAARatings"];
            Movies = MovieDatabase.FilterByMPAARating(Movies, MPAARatings);

            //Genres = Request.Query["Genres"];
            Movies = MovieDatabase.FilterByMPAARating(Movies, Genres);

            this.IMDBMax = IMDBMax;
            this.IMDBMin = IMDBMin;
            //IMDBMin = double.Parse(Request.Query["IMDBMin"]);
            //IMDBMax = double.Parse(Request.Query["IMDBMax"]);
            Movies = MovieDatabase.FilterByIMDBRating(Movies, IMDBMin, IMDBMax);

            this.RTMax = RTMax;
            this.RTMin = RTMin;

            Movies = MovieDatabase.FilterByRTRating(Movies, RTMin, RTMax);
        }
        /// <summary>
        /// Gets the search results for display on the page
        /// </summary>
        public void OnGet(double?IMDBMin, double?IMDBMax)
        {
            this.IMDBMin = IMDBMin;
            this.IMDBMax = IMDBMax;
            Movies       = MovieDatabase.All;

            // Search movie titles for the SearchTerms
            if (SearchTerms != null)
            {
                Movies = Movies.Where(movie => movie.Title != null && movie.Title.Contains(SearchTerms, StringComparison.InvariantCultureIgnoreCase));
            }
            // Filter by MPAA Rating
            if (MPAARatings != null && MPAARatings.Length != 0)
            {
                Movies = Movies.Where(movie =>
                                      movie.MPAARating != null &&
                                      MPAARatings.Contains(movie.MPAARating)
                                      );
            }
            Movies = MovieDatabase.FilterByMPAARating(Movies, MPAARatings);
            Movies = MovieDatabase.FilterByGenre(Movies, Genres);
            Movies = MovieDatabase.FilterByIMDBRating(Movies, IMDBMin, IMDBMax);
        }