示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Movie_Acted movie_Acted = db.Movies_Acted.Find(id);

            db.Movies_Acted.Remove(movie_Acted);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "Movie_ActedID,MovieID,ActorID")] Movie_Acted movie_Acted)
 {
     if (ModelState.IsValid)
     {
         db.Entry(movie_Acted).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ActorID = new SelectList(db.Actors, "ID", "LastName", movie_Acted.ActorID);
     ViewBag.MovieID = new SelectList(db.Movies, "MovieID", "MovieName", movie_Acted.MovieID);
     return(View(movie_Acted));
 }
示例#3
0
        // GET: Movie_Acted/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Movie_Acted movie_Acted = db.Movies_Acted.Find(id);

            if (movie_Acted == null)
            {
                return(HttpNotFound());
            }
            return(View(movie_Acted));
        }
示例#4
0
        // GET: Movie_Acted/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Movie_Acted movie_Acted = db.Movies_Acted.Find(id);

            if (movie_Acted == null)
            {
                return(HttpNotFound());
            }
            ViewBag.ActorID = new SelectList(db.Actors, "ID", "LastName", movie_Acted.ActorID);
            ViewBag.MovieID = new SelectList(db.Movies, "MovieID", "MovieName", movie_Acted.MovieID);
            return(View(movie_Acted));
        }