예제 #1
0
        public ActionResult Films()
        {
            TicketAuthenticator auth = new TicketAuthenticator();
            int     accId            = auth.Decrypt();
            Account acc = _accountRepository.GetAccountById(accId);

            acc.Films = _filmRepository.GetBoughtFilms(accId);
            AccountFilmsViewmodel viewmodel = new AccountFilmsViewmodel
            {
                Genres        = _genreRepository.GetAllGenres(),
                Account       = acc,
                AllFilmsCount = _filmRepository.GetBoughtFilms(accId).Count
            };

            return(View(viewmodel));
        }
예제 #2
0
        public ActionResult Index()
        {
            TicketAuthenticator auth = new TicketAuthenticator();
            Account             acc  = _accountRepository.GetAccountById(auth.Decrypt());

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

            return(View(viewmodel));
        }