示例#1
0
 public ActionResult Edit([Bind(Include = "Id,Name,Email,Address,Details,Mobile,Seats,Status,Price")] Hall hall)
 {
     if (ModelState.IsValid)
     {
         db.Entry(hall).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(hall));
 }
示例#2
0
 public ActionResult Edit([Bind(Include = "Id,Name,Address,Mobile,DateTime,HallId")] Book book)
 {
     if (ModelState.IsValid)
     {
         db.Entry(book).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.HallId = new SelectList(db.Halls, "Id", "Name", book.HallId);
     return(View(book));
 }