コード例 #1
0
        public ActionResult Index()
        {
            int         accId     = _auth.Decrypt();
            List <Film> listFilms = _winkelmandRepository.GetFilmsInWinkelmand(_winkelmandRepository.GetWinkelmandId(accId));
            AccountWinkelmandGenreViewmodel viewmodel = new AccountWinkelmandGenreViewmodel
            {
                Winkelmand = new Winkelmand(listFilms, _winkelmandRepository.GetPrijs(listFilms)),
                Genres     = _genreRepository.GetAllGenres(),
                Account    = _accountRepository.GetAccountById(accId)
            };

            return(View(viewmodel));
        }
コード例 #2
0
        public ActionResult Index()
        {
            int         accId        = _auth.Decrypt();
            int         winkelmandId = _winkelmandRepository.GetWinkelmandId(accId);
            List <Film> listFilms    = _winkelmandRepository.GetFilmsInWinkelmand(winkelmandId);
            AccountWinkelmandGenreViewmodel viewmodel = new AccountWinkelmandGenreViewmodel
            {
                Winkelmand    = new Winkelmand(listFilms, _winkelmandRepository.GetPrijs(listFilms)),
                Genres        = _genreRepository.GetAllGenres(),
                Account       = _accountRepository.GetAccountById(accId),
                AllFilmsCount = _winkelmandRepository.GetFilmsInWinkelmand(winkelmandId).Count
            };

            if (_teWeinig)
            {
                ViewBag.teWeinig = "Te weinig credits";
            }
            return(View(viewmodel));
        }