public ActionResult Edit([Bind(Include = "ID,Product_id,NickName,Quality,Comment")] Review review) { if (ModelState.IsValid) { db.Entry(review).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(review)); }
public ActionResult Edit([Bind(Include = "ID,Name,Phone,Email,Address,Content,CreatedDate,Status")] Feedback feedback) { if (ModelState.IsValid) { db.Entry(feedback).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(feedback)); }
public ActionResult Edit([Bind(Include = "Material_id,Material_name")] Materials materials) { if (ModelState.IsValid) { db.Entry(materials).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(materials)); }
public ActionResult Edit([Bind(Include = "Size_id,Size_name")] Sizes sizes) { if (ModelState.IsValid) { db.Entry(sizes).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(sizes)); }
public ActionResult Edit([Bind(Include = "Color_id,Color_name")] Colors colors) { if (ModelState.IsValid) { db.Entry(colors).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(colors)); }
public ActionResult Edit([Bind(Include = "ID,Name,MetaTitle,ParentID,DisplayOrder,CreatedDate,Status")] Categories categories) { if (ModelState.IsValid) { categories.CreatedDate = DateTime.Now; db.Entry(categories).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(categories)); }
public ActionResult Edit([Bind(Include = "ID,Category_id,Size_id,Color_id,Contry_id,Material_id,Name,MetaTitle,CreatedDate,Quantity,Price,Image,Warranty,Description,TopHot,Status")] Products products) { if (ModelState.IsValid) { db.Entry(products).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Category_id = new SelectList(db.Categories, "ID", "Name", products.Category_id); ViewBag.Color_id = new SelectList(db.Colors, "Color_id", "Color_name", products.Color_id); ViewBag.Contry_id = new SelectList(db.Contries, "Country_id", "Country_name", products.Contry_id); ViewBag.Material_id = new SelectList(db.Materials, "Material_id", "Material_name", products.Material_id); ViewBag.Size_id = new SelectList(db.Sizes, "Size_id", "Size_name", products.Size_id); return(View(products)); }