public ActionResult Edit(Admin admin) { if (ModelState.IsValid) { db.Entry(admin).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(admin)); }
public ActionResult Edit(ProductBrand productbrand) { if (ModelState.IsValid) { db.Entry(productbrand).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(productbrand)); }
public ActionResult Edit(Cart cart) { if (ModelState.IsValid) { db.Entry(cart).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ProductinfoId = new SelectList(db.Productinfoes, "ID", "Name", cart.ProductinfoId); return(View(cart)); }
public ActionResult Edit(Productinfo productinfo) { if (ModelState.IsValid) { db.Entry(productinfo).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ProductBrandId = new SelectList(db.productBrand, "Id", "Brand", productinfo.ProductBrandId); ViewBag.ProductCategoryId = new SelectList(db.productCatagory, "Id", "Category", productinfo.ProductCategoryId); ViewBag.OccasionId = new SelectList(db.occasion, "Id", "ProductOccasion", productinfo.OccasionId); return(View(productinfo)); }