public ActionResult Edit(Project project) { if (ModelState.IsValid) { AdminDb.Entry(project).State = EntityState.Modified; AdminDb.SaveChanges(); return(RedirectToAction("Index")); } return(View(project)); }
public ActionResult Edit(CmsPage cmspage) { if (ModelState.IsValid) { AdminDb.Entry(cmspage).State = EntityState.Modified; AdminDb.SaveChanges(); return(RedirectToAction("Index")); } return(View(cmspage)); }
public ActionResult Edit([Bind(Include = "Id,Name,StreetNumber,Zip,City,Region,Default,Invoice,CreatedAt,ModifiedAt")] AddressBook addressbook) { if (ModelState.IsValid) { AdminDb.Entry(addressbook).State = EntityState.Modified; AdminDb.SaveChanges(); return(RedirectToAction("Index")); } return(View(addressbook)); }
public ActionResult Edit(User user) { if (ModelState.IsValid) { AdminDb.Entry(user).State = EntityState.Modified; AdminDb.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Id = new SelectList(AdminDb.UserProfiles, "Id", "Description", user.Id); return(View(user)); }
public ActionResult Edit(OrderProduct orderproduct) { if (ModelState.IsValid) { AdminDb.Entry(orderproduct).State = EntityState.Modified; AdminDb.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.DeliveryAddressId = new SelectList(AdminDb.AddressBook, "Id", "Name", orderproduct.ShippingAddress.Id); ViewBag.BillingAddressId = new SelectList(AdminDb.AddressBook, "Id", "Name", orderproduct.BillingAddress.Id); return(View(orderproduct)); }
public ActionResult EditUserRole(UserRoleSetting model) { try { if (ModelState.IsValid) { adminDb.UserRoleSettings.Attach(model); adminDb.Entry(model).State = EntityState.Modified; adminDb.SaveChanges(); } return(RedirectToAction("UserRoleSetting")); } catch (Exception ex) { throw ex; } }