Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Pelicula_Protagonista pelicula_Protagonista = db.Pelicula_Protagonista.Find(id);

            db.Pelicula_Protagonista.Remove(pelicula_Protagonista);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
 public ActionResult Edit([Bind(Include = "id_PP,id_pelicula,id_protagonista,Dummy")] Pelicula_Protagonista pelicula_Protagonista)
 {
     if (ModelState.IsValid)
     {
         db.Entry(pelicula_Protagonista).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.id_pelicula     = new SelectList(db.Pelicula, "id_pelicula", "titulo_pelicula", pelicula_Protagonista.id_pelicula);
     ViewBag.id_protagonista = new SelectList(db.Protagonista, "id_protagonista", "nombre_protagonista", pelicula_Protagonista.id_protagonista);
     return(View(pelicula_Protagonista));
 }
Exemple #3
0
        // GET: Pelicula_Protagonista/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Pelicula_Protagonista pelicula_Protagonista = db.Pelicula_Protagonista.Find(id);

            if (pelicula_Protagonista == null)
            {
                return(HttpNotFound());
            }
            return(View(pelicula_Protagonista));
        }
Exemple #4
0
        // GET: Pelicula_Protagonista/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Pelicula_Protagonista pelicula_Protagonista = db.Pelicula_Protagonista.Find(id);

            if (pelicula_Protagonista == null)
            {
                return(HttpNotFound());
            }
            ViewBag.id_pelicula     = new SelectList(db.Pelicula, "id_pelicula", "titulo_pelicula", pelicula_Protagonista.id_pelicula);
            ViewBag.id_protagonista = new SelectList(db.Protagonista, "id_protagonista", "nombre_protagonista", pelicula_Protagonista.id_protagonista);
            return(View(pelicula_Protagonista));
        }