예제 #1
0
        // GET: Movie
        public ActionResult Edit(int id)
        {
            var model = new MovieEditVM();
            var movieOps = new MovieOperations();
            var genreOps = new GenreOperations();
            var actorOps = new ActorOperations();

            model.MovieToEdit = movieOps.Get(id);
            model.CreateGenreList(genreOps.GetGenres());
            model.CreateActorsNotInMovie(actorOps.GetActorsNotInMovie(id));
            model.ActorsInMovie = actorOps.GetActorsInMovie(id);

            return View(model);
        }
예제 #2
0
        // GET: Movie

        public ActionResult Edit(int movieID)
        {
            var model = new MovieEditVM();

            var movieOps = new MovieOperations();
            var genreOps = new GenreOperations();
            var actorOps = new ActorOperations();

            var listOfGenres = genreOps.GetGenres();
            var listOfActors = actorOps.GetActorsNotInMovie(movieID);

            model.MovieToEdit = movieOps.Get(movieID);
            model.ActorsInMovie = actorOps.GetActorsInMovie(movieID);

            //generates selectlistitem for genres & actorsnotinmovie
            model.CreateGenreList(listOfGenres);
            model.CreateActorsNotInMovie(listOfActors);


            return View(model);
        }