Exemple #1
0
 public ActionResult Edit([Bind(Include = "Authorid,FirstName,Insertion,LastName,Birthdate")] Authors authors)
 {
     if (ModelState.IsValid)
     {
         db.Entry(authors).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(authors));
 }
Exemple #2
0
 public ActionResult Edit([Bind(Include = "Publisherid,FullName,City")] Publishers publishers)
 {
     if (ModelState.IsValid)
     {
         db.Entry(publishers).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(publishers));
 }
Exemple #3
0
 public ActionResult Edit([Bind(Include = "Bookid,Title,Authorid,Publisherid,Languages,Dimensions,Weights,Prints,ISBN,Cover")] Books books)
 {
     if (ModelState.IsValid)
     {
         db.Entry(books).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Authorid    = new SelectList(db.Authors, "Authorid", "FirstName", books.Authorid);
     ViewBag.Publisherid = new SelectList(db.Publishers, "Publisherid", "FullName", books.Publisherid);
     return(View(books));
 }
 public ActionResult Edit([Bind(Include = "Magazineid,Title,Authorid,Publisherid,Publishdate,Languages,Dimensions,ISSN,Cover")] Magazines magazines)
 {
     if (ModelState.IsValid)
     {
         db.Entry(magazines).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Authorid    = new SelectList(db.Authors, "Authorid", "FirstName", magazines.Authorid);
     ViewBag.Publisherid = new SelectList(db.Publishers, "Publisherid", "FullName", magazines.Publisherid);
     return(View(magazines));
 }