예제 #1
0
 public ActionResult Index(FilmeIndexViewModel ViewModel)
 {
     ViewModel.Filmes          = db.Filme.Where(f => f.FilmeID == (ViewModel.FilmeID ?? f.FilmeID));
     ViewModel.FilmeSelectLIst = new SelectList(db.Filme, "FilmeID", "Titulo", ViewModel.FilmeID ?? ViewModel.FilmeID);
     ViewModel.FilmePerPage    = FilmePerPageSetting;
     return(PartialView("_Index", ViewModel));
 }
예제 #2
0
        // GET: Filmes
        public ActionResult Index(int page = 1)
        {
            var ViewModel = new FilmeIndexViewModel
            {
                FilmePerPage    = FilmePerPageSetting,
                Filmes          = db.Filme.OrderBy(d => d.Titulo),
                FilmeSelectLIst = new SelectList(db.Filme, "FilmeID", "Titulo"),
                CurrentPage     = page
            };

            return(View(ViewModel));
        }
예제 #3
0
        public ActionResult Index()
        {
            var view = new FilmeIndexViewModel();

            return(View(view));
        }