Esempio n. 1
0
 public ActionResult Edit([Bind(Include = "MId,Mname,Price")] Movie movie)
 {
     if (ModelState.IsValid)
     {
         db.Entry(movie).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(movie));
 }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "TId,Tname,Tlocation,MovieMId")] Theatre theatre)
 {
     if (ModelState.IsValid)
     {
         db.Entry(theatre).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MovieMId = new SelectList(db.Movies, "MId", "Mname", theatre.MovieMId);
     return(View(theatre));
 }