예제 #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()
        {
            TicketAuthenticator auth  = new TicketAuthenticator();
            List <Film>         films = new List <Film>();
            Account             acc   = _accountRepository.GetAccountById(auth.Decrypt());

            acc.Winkelmand       = new Winkelmand();
            acc.Winkelmand.Films = _winkelmandRepository.GetFilmsInWinkelmand(_winkelmandRepository.GetWinkelmandId(acc.Id));;
            FilmIndexViewmodel viewmodel = new FilmIndexViewmodel
            {
                ListFilm   = _filmRepository.GetAllFilms(),
                ListGenres = _genreRepository.GetAllGenres(),
                Account    = acc
            };

            return(View(viewmodel));
        }
예제 #3
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));
        }