Пример #1
0
        public void OnPost()
        {
            Movies = MovieDatabase.All;

            if (search != null && mpaa.Count != 0)
            {
                Movies = MovieDatabase.SearchAndFilter(search, mpaa);
            }
            else if (mpaa.Count != 0)
            {
                Movies = MovieDatabase.Filter(mpaa);
            }
            else if (search != null)
            {
                Movies = MovieDatabase.Search(Movies, search);
            }
            else
            {
                Movies = MovieDatabase.All;
            }

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

            if (minIMDB != null)
            {
                Movies = MovieDatabase.FilterByMinIMDB(Movies, (float)minIMDB);
            }
        }
Пример #2
0
        public void OnPost(string search, List <string> rating, float?minIMDB, float?maxIMDB)
        {
            Movies = MovieDatabase.All;

            if (search != null && rating.Count != 0)
            {
                Movies = MovieDatabase.SearchAndFilter(search, rating);
            }
            else if (rating.Count != 0)
            {
                Movies = MovieDatabase.Filter(rating);
            }
            else if (search != null)
            {
                Movies = MovieDatabase.Search(Movies, search);
            }
            else
            {
                Movies = MovieDatabase.All;
            }

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

            if (minIMDB != null)
            {
                Movies = MovieDatabase.FilterByMinIMDB(Movies, (float)minIMDB);
            }
        }
Пример #3
0
        public void OnPost(string search, List <string> mpaa, float?minIMDB, float?maxIMDB)
        {
            Movies = MovieDatabase.All;

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

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

            if (minIMDB is float min)
            {
                this.minIMDB = minIMDB;
                Movies       = MovieDatabase.FilterByMinIMDB(Movies, min);
            }

            if (maxIMDB is float max)
            {
                this.maxIMDB = maxIMDB;
                Movies       = MovieDatabase.FilterByMaxIMDB(Movies, max);
            }
        }
Пример #4
0
        public void OnPost()
        {
            Movies = MovieDatabase.All;

            /*  if (search != null && mpaa.Count > 0)
             * {
             *    Movies = MovieDatabase.Search(search);
             *    Movies = MovieDatabase.FilterByMPAA(Movies, mpaa);
             * }
             * else*/if (search != null)
            {
                Movies = MovieDatabase.Search(Movies, search);
            }
            else if (mpaa.Count > 0)
            {
                Movies = MovieDatabase.FilterByMPAA(Movies, mpaa);
            }
            else
            {
                Movies = MovieDatabase.All;
            }

            if (minIMDB is float min)
            {
                Movies = MovieDatabase.FilterByMinIMDB(Movies, min);
            }
        }
Пример #5
0
        public void OnPost()
        {
            if (search != null && mpaa.Count > 0)
            {
                Movies = MovieDatabase.Search(search);
                Movies = MovieDatabase.FilterByMPAA(Movies, mpaa);
            }
            else if (search != null)
            {
                Movies = MovieDatabase.Search(search);
            }
            else if (mpaa.Count > 0)
            {
                Movies = MovieDatabase.FilterByMPAA(MovieDatabase.All, mpaa);
            }
            else
            {
                Movies = MovieDatabase.All;
            }

            if (minIMDB is float min)
            {
                Movies = MovieDatabase.FilterByMinIMDB(Movies, min);
            }
            if (maxIMDB is float max)
            {
                Movies = MovieDatabase.FilterByMaxIMDB(Movies, max);
            }
        }
Пример #6
0
        public void OnPost(string search, List <string> mpaa)
        {
            // search and filter
            if (search != null && mpaa.Count > 0)
            {
                Movies = MovieDatabase.Search(search);
                Movies = MovieDatabase.FilterByMPAA(Movies, mpaa);
            }

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

            else if (mpaa.Count > 0)
            {
                Movies = MovieDatabase.FilterByMPAA(MovieDatabase.All, mpaa);
            }
            else
            {
                Movies = MovieDatabase.All;
            }

            if (minIMDB is float min)
            {
                Movies = MovieDatabase.FilterByMinIMDB(Movies, min);
            }
        }
Пример #7
0
 public void OnPost()
 {
     movies = MovieDatabase.All;
     if (search != null)
     {
         movies = MovieDatabase.Search(movies, search);
     }
     if (mpaa.Count > 0)
     {
         movies = MovieDatabase.FilterByMPAA(movies, mpaa);
     }
     if (minIMDB is float min)
     {
         movies = MovieDatabase.FilterByMinIMDB(movies, min);
     }
 }
Пример #8
0
 public void OnPost(string search, List <string> rating, float?minIMDB, float?maxIMDB)
 {
     Movies = MovieDatabase.All;
     if (search != null)
     {
         Movies = MovieDatabase.SearchAndFilter(search, rating, Movies);
     }
     if (mpaa.Count != 0)
     {
         Movies = MovieDatabase.FilterByMPAA(Movies, mpaa);
     }
     if (minIMDB != null)
     {
         Movies = MovieDatabase.FilterByMinIMDB(Movies, (float)minIMDB);
     }
 }
Пример #9
0
        public void OnPost(string search, string[] rating, float?minIMDB, float?maxIMDB)
        {
            Movies = movieDatabase.All;
            if (search != null)
            {
                Movies = movieDatabase.Search(Movies, search);
            }

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

            if (minIMDB != null)
            {
                Movies = movieDatabase.FilterByMinIMDB(Movies, (float)minIMDB);
            }
        }
Пример #10
0
        public void OnPost(string search, List <string> mpaa)
        {
            Movies = MovieDatabase.All;

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

            if (mpaa.Count > 0)
            {
                Movies = MovieDatabase.Filter(Movies, mpaa);
            }

            if (minIMDB is float min)
            {
                Movies = MovieDatabase.FilterByMinIMDB(Movies, min);
            }
        }
Пример #11
0
        public void OnPost()
        {
            Movies = MovieDatabase.All;

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

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

            if (minIMDB is float nonNullMinIMDB)
            {
                Movies = MovieDatabase.FilterByMinIMDB(Movies, nonNullMinIMDB);
            }
        }
Пример #12
0
        public void OnPost(string search, List <string> mpaa, float?minIMDB, float?maxIMDB)
        {
            Movies = MovieDatabase.All;

            if (search != null)
            {
                Movies = MovieDatabase.Search(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);
            }



            /*if (search != null && rating.Count != 0)
             * {
             *  Movies = MovieDataBase.SearchAndFilter(search, rating);
             * }
             * else if (rating.Count != 0)
             * {
             *  Movies = MovieDataBase.Filter(rating);
             * }
             * else if (search != null)
             * {
             *  Movies = MovieDataBase.Search(search);
             * }
             * else
             * {
             *  Movies = MovieDataBase.All;
             * }*/
        }
Пример #13
0
 public void OnPost()
 {
     Movies = MovieDatabase.All;
     if (search != null)
     {
         Movies = MovieDatabase.Search(Movies, search);
     }
     if (ratings.Count != 0)
     {
         Movies = MovieDatabase.FilterByMPAA(Movies, ratings);
     }
     if (minIMDB != null)
     {
         Movies = MovieDatabase.FilterByMinIMDB(Movies, (float)minIMDB);
     }
     if (maxIMDB != null)
     {
         Movies = MovieDatabase.FilterByMaxIMDB(Movies, (float)maxIMDB);
     }
 }
Пример #14
0
 public void OnPost(string search, List <string> mpaa, float?minIMDB, float?maxIMDB)
 {
     Movies = MovieDatabase.All;
     if (search != null)
     {
         Movies = MovieDatabase.Search(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);
     }
 }
Пример #15
0
        public void OnPost(string search, List <string> rating, float?minIMDB, float?maxIMDB)
        {
            Search  = search;
            Mpaa    = rating;
            MinIMDB = minIMDB;
            MaxIMDB = maxIMDB;
            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);
            }

            //if(search != null && rating.Count != 0)
            //{
            //    Movies = movieDatabase.SearchAndFilter(search, rating);
            //}
            //else if(rating.Count != 0)
            //{
            //    Movies = movieDatabase.Filter(rating);
            //}
            //else if(search != null)
            //{
            //    Movies = movieDatabase.Search(search);
            //}
            //else
            //{
            //    Movies = movieDatabase.All;
            //}
        }
Пример #16
0
        public void OnPost(bool Clear)
        {
            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.FilterByMinIMDB(Movies, (float)MaxIMDB);
            }
        }
Пример #17
0
        public void OnPost()
        {
            Movies = MovieDatabase.All;

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

            if (mpaa.Count > 0)
            {
                // Filter by MPAA Rating
                Movies = MovieDatabase.FilterByMPAA(Movies, mpaa);
            }

            if (minIMDB is float min)
            {
                // Filter by min IMDB Rating
                Movies = MovieDatabase.FilterByMinIMDB(Movies, min);
            }
        }
Пример #18
0
 public void OnPost()
 {
     //default with the entire database
     Movies = MovieDatabase.All;
     //filter if the search terms exist and pare down the movie list
     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);
     }
 }
Пример #19
0
        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);
            }
        }