public ActionResult Edit([Bind(Include = "Id,Publisher1")] Publisher publisher)
 {
     if (ModelState.IsValid)
     {
         db.Entry(publisher).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(publisher));
 }
 public ActionResult Edit([Bind(Include = "Id,Genre1,Macro")] Genre genre)
 {
     if (ModelState.IsValid)
     {
         db.Entry(genre).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(genre));
 }
 public ActionResult Edit([Bind(Include = "Id,Email,EmailConfirmed,PasswordHash,SecurityStamp,PhoneNumber,PhoneNumberConfirmed,TwoFactorEnabled,LockoutEndDateUtc,LockoutEnabled,AccessFailedCount,UserName")] AspNetUser aspNetUser)
 {
     if (ModelState.IsValid)
     {
         db.Entry(aspNetUser).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(aspNetUser));
 }
Example #4
0
 public ActionResult Edit([Bind(Include = "Id,User_Id,Order_date")] C_Order c_Order)
 {
     if (ModelState.IsValid)
     {
         db.Entry(c_Order).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.User_Id = new SelectList(db.AspNetUsers, "Id", "Email", c_Order.User_Id);
     return(View(c_Order));
 }
 public ActionResult Edit([Bind(Include = "Id,Title,Description,Price,Cost,Running_time,Abridged,Language,Release_date,Image,Author_Id,Genre_Id,Narrator_Id,Publisher_Id")] Audiobook audiobook)
 {
     if (ModelState.IsValid)
     {
         db.Entry(audiobook).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Author_Id    = new SelectList(db.Authors, "Id", "Author1", audiobook.Author_Id);
     ViewBag.Genre_Id     = new SelectList(db.Genres, "Id", "Genre1", audiobook.Genre_Id);
     ViewBag.Narrator_Id  = new SelectList(db.Narrators, "Id", "Narrator1", audiobook.Narrator_Id);
     ViewBag.Publisher_Id = new SelectList(db.Publishers, "Id", "Publisher1", audiobook.Publisher_Id);
     return(View(audiobook));
 }
 public ActionResult Edit([Bind(Include = "Id,User_Id,State,City,Zip_code,Card_number")] Credit_Card credit_Card)
 {
     if (ModelState.IsValid)
     {
         db.Entry(credit_Card).State = EntityState.Modified;
         db.SaveChanges();
         if (User.IsInRole("Administrator"))
         {
             return(RedirectToAction(actionName: "Index"));
         }
         else
         {
             return(RedirectToAction(actionName: "Index", controllerName: "Manage", routeValues: null));
         }
     }
     ViewBag.User_Id = new SelectList(db.AspNetUsers, "Id", "Email", credit_Card.User_Id);
     return(View(credit_Card));
 }