Example #1
0
 public ActionResult Edit([Bind(Include = "ProductID,ProductName,Weight,Ingredient")] Product product)
 {
     if (ModelState.IsValid)
     {
         db.Entry(product).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(product));
 }
Example #2
0
 public ActionResult Edit([Bind(Include = "ID,OrderID,Owner,DealerID,ShippingData,ProductName,MFD,Lisence,Declaration,EXP,Discription,Amount,Volume,Weight,Code,Driver,CarNum")] OutboundData outboundRawData)
 {
     if (ModelState.IsValid)
     {
         db.Entry(outboundRawData).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(outboundRawData));
 }
Example #3
0
 public ActionResult Edit([Bind(Include = "ImportDataID,ProductID,MFD,EXP,Lisence,Declaration,Item,PurchaseNum")] ImportData importData)
 {
     if (ModelState.IsValid)
     {
         db.Entry(importData).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ProductID = new SelectList(db.Product, "ProductID", "ProductName", importData.ProductID);
     return(View(importData));
 }