public ActionResult Edit([Bind(Include = "Id,Title,CreatedOn,Active,Notes")] RSOrder rsorder) { if (ModelState.IsValid) { db.Entry(rsorder).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(rsorder)); }
public async Task <ActionResult> Edit(RSProduct rSProduct) { if (ModelState.IsValid) { db.Entry(rSProduct).State = System.Data.Entity.EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(rSProduct)); }
public async Task <ActionResult> Edit(RSNavigationItem rSNavigationItem, int productid) { if (ModelState.IsValid) { db.Entry(rSNavigationItem).State = EntityState.Modified; await db.SaveChangesAsync(); rSNavigationItem = db.Navigation.Find(rSNavigationItem.Id); rSNavigationItem.ProductLink = await db.Products.FindAsync(productid); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(rSNavigationItem)); }
public async Task <ActionResult> Edit(RSUser user, string newpassword, string confirmpassword) { if (ModelState.IsValid) { db.Entry(user).State = EntityState.Modified; if (!string.IsNullOrWhiteSpace(newpassword) & newpassword == confirmpassword) { user.DependencyInjection(); user.CreatePassword(newpassword); } await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(user)); }