Example #1
0
 public ActionResult Edit([Bind(Include = "ID,Name,MetaTitle,ParentID,DisplayOrder,SeoTitle,CreateDate,CreateBy,ModifiedDate,ModifiedBy,MetaKeywords,MetaDescriptions,Status,ShowOnHome")] ProductCategory productCategory)
 {
     if (ModelState.IsValid)
     {
         db.Entry(productCategory).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(productCategory));
 }
Example #2
0
 public ActionResult Edit([Bind(Include = "ID,CreatedDate,CustomerID,ShipName,ShipMobile,ShipAddress,ShipEmail,Status")] Order order)
 {
     if (ModelState.IsValid)
     {
         db.Entry(order).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(order));
 }
Example #3
0
 public ActionResult Edit([Bind(Include = "ID,Name,Phone,Email,Address,Content,CreateDate,Status")] Feedback feedback)
 {
     if (ModelState.IsValid)
     {
         db.Entry(feedback).State = EntityState.Modified;
         db.SaveChanges();
         SetAlert("Cập nhật thông tin phản hồi thành công", "success");
         return(RedirectToAction("Index"));
     }
     return(View(feedback));
 }
 public ActionResult Edit([Bind(Include = "ID,Name,Code,MetaTitle,Description,Image,MoreImages,Price,PromotionPrice,IncludedVAT,Quantity,CategoryID,Detail,Warranty,CreateDate,CreateBy,ModifiedDate,ModifiedBy,MetaKeywords,MetaDescriptions,Status,TopHot,ViewCount")] Product product)
 {
     if (ModelState.IsValid)
     {
         db.Entry(product).State = EntityState.Modified;
         db.SaveChanges();
         SetAlert("Cập nhật thông tin sản phẩm thành công", "success");
         return(RedirectToAction("Index"));
     }
     SetViewBag(product.CategoryID);
     return(View(product));
 }