コード例 #1
0
        public ActionResult Movies(string year, int?page = 1)
        {
            BollyWoodMoviesViewModel model = new BollyWoodMoviesViewModel();

            model.Year = year;
            model.BollywoodMoviesPaged = new MvcPaging.PagedList <Movies>(_bollyWoodMgr.GetByYear(Convert.ToInt32(year)), page.Value, 20);
            return(View("MoviesByYear", model));
        }
コード例 #2
0
        public ActionResult Detail(int id)
        {
            BollyWoodMoviesViewModel model = new BollyWoodMoviesViewModel();

            model.Movie          = _bollyWoodMgr.GetById(id);
            model.UpComingMovies = _bollyWoodMgr.GetUpComingMovies()
                                   .Where(x => x.id != model.Movie.id).ToList();

            return(View(model));
        }
コード例 #3
0
        public ActionResult Index()
        {
            BollyWoodMoviesViewModel model = new BollyWoodMoviesViewModel();

            model.BollywoodMovies = _bollyWoodMgr.GetBollyWoodMovies();
            model.UpComingMovies  = _bollyWoodMgr.GetUpComingMovies();
            model.LatestMovies    = _bollyWoodMgr.GetLatestMovies();
            model.GetByYear       = _bollyWoodMgr.GetByYear(DateTime.Now.Year);
            return(View(model));
        }