Пример #1
0
 public ActionResult Edit([Bind(Include = "BookListID,BookListName,BookListType,BookListContent,BookClubID")] BookList bookList)
 {
     if (ModelState.IsValid)
     {
         db.MarkAsModified(bookList);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(bookList));
 }
Пример #2
0
 public ActionResult Edit([Bind(Include = "BookISBN,BookTitle,AuthorName,Genre,GenreType")] Book book)
 {
     if (ModelState.IsValid)
     {
         db.MarkAsModified(book);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(book));
 }
Пример #3
0
 public ActionResult Edit([Bind(Include = "BookClubID,BookClubName,AdminEmail,Profile,Status,Province,County,Area,LibraryID,NextMeeting,CurrentRead")] BookClub bookClub)
 {
     if (ModelState.IsValid)
     {
         db.MarkAsModified(bookClub);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.LibraryID = new SelectList(db.Libraries, "LibraryID", "LibraryName", bookClub.LibraryID);
     return(View(bookClub));
 }
Пример #4
0
 public ActionResult Edit([Bind(Include = "BookTitle,ReviewID,UserID,BookISBN,Rating,Comment")] Review review)
 {
     if (ModelState.IsValid)
     {
         db.MarkAsModified(review);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.BookTitle = new SelectList(db.Books, "BookTitle", "AuthorName", review.BookISBN);
     return(View(review));
 }