public ActionResult Edit([Bind(Include = "BookID,BookName,BookGenre,BookYear")] BookInfo bookInfo) { if (ModelState.IsValid) { db.Entry(bookInfo).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(bookInfo)); }
public ActionResult Edit([Bind(Include = "CUSTOMERID,FirstName,Surname,TelephoneNumber,EmailAddress,Username,Password")] Customer customer) { if (ModelState.IsValid) { db.Entry(customer).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(customer)); }
public ActionResult Edit([Bind(Include = "BookID,ISBN,Title,Author,Barcode")] Books1 books1) { if (ModelState.IsValid) { db.Entry(books1).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(books1)); }
public ActionResult Edit([Bind(Include = "AuthorID,FirstName,MiddleName,Surname,DateOfBirth,PlaceOfBirth")] Author author) { if (ModelState.IsValid) { db.Entry(author).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(author)); }
public ActionResult Edit([Bind(Include = "BorrowerID,FirstName,MiddleName,LastName,DateOfBirth")] Borrower borrower) { if (ModelState.IsValid) { db.Entry(borrower).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.BorrowerID = new SelectList(db.Borrows, "BorrowID", "BorrowID", borrower.BorrowerID); return(View(borrower)); }
public ActionResult Edit([Bind(Include = "BorrowID,BorrowDate,BorrowReturn")] Borrow borrow) { if (ModelState.IsValid) { db.Entry(borrow).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.BorrowID = new SelectList(db.Borrowers, "BorrowerID", "FirstName", borrow.BorrowID); return(View(borrow)); }
public ActionResult Edit([Bind(Include = "BookCopyID,CustomerID,ReturnDate,BookID")] BookCopy bookCopy) { if (ModelState.IsValid) { db.Entry(bookCopy).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CustomerID = new SelectList(db.Customers, "CUSTOMERID", "FirstName", bookCopy.CustomerID); ViewBag.BookID = new SelectList(db.Books1, "BookID", "ISBN", bookCopy.BookID); ViewBag.BookCopyID = new SelectList(db.BookCopies, "BookCopyID", "BookID", bookCopy.BookCopyID); ViewBag.BookCopyID = new SelectList(db.BookCopies, "BookCopyID", "BookID", bookCopy.BookCopyID); ViewBag.BookID = new SelectList(db.Books1, "BookID", "ISBN", bookCopy.BookID); return(View(bookCopy)); }