public void OnPost()
        {
            Movies = MovieDatabase.All;
            if (search != null)
            {
                Movies = MovieDatabase.Search(Movies, search);
            }

            if (rating.Count != 0)
            {
                Movies = MovieDatabase.FilterByMPAA(Movies, rating);
            }

            if (minIMDB != null)
            {
                Movies = MovieDatabase.FilterByMinIMDB(Movies, (float)minIMDB);
            }

            if (maxIMDB != null)
            {
                Movies = MovieDatabase.FilterByMaxIMDB(Movies, (float)maxIMDB);
            }
        }
Example #2
0
        public void OnPost(string search, List <string> mpaa, float?minIMDB, float?maxIMDB)
        {
            Movies = MovieDatabase.All;

            if (search != null)
            {
                Movies = MovieDatabase.SearchAndFilter(Movies, search);
            }

            if (mpaa.Count != 0)
            {
                Movies = MovieDatabase.FilterByMPAA(Movies, mpaa);
            }

            if (minIMDB != null)
            {
                Movies = MovieDatabase.FilterByMinIMDB(Movies, (float)minIMDB);
            }

            if (maxIMDB != null)
            {
                Movies = MovieDatabase.FilterByMaxIMDB(Movies, (float)maxIMDB);
            }
        }
        public void OnPost()
        {
            Movies = MovieDatabase.All;

            if (search != null)
            {
                Movies = MovieDatabase.Search(search, Movies);
            }

            if (rating.Count > 0)
            {
                Movies = MovieDatabase.FilterByMPAA(rating, Movies);
            }

            if (minIMDB != null)
            {
                Movies = MovieDatabase.FilterByMinIMDB(minIMDB, Movies);
            }

            if (maxIMDB != null)
            {
                Movies = MovieDatabase.FilterByMaxIMDB(maxIMDB, Movies);
            }
        }