Esempio n. 1
0
 public ActionResult Edit(SupplierViewModel model)
 {
     if (ModelState.IsValid)
     {
         if (SupplierRepo.Update(model))
         {
             return(Json(new { success = true }, JsonRequestBehavior.AllowGet));
         }
         else
         {
             return(Json(new { success = false, message = SupplierRepo.Message }, JsonRequestBehavior.AllowGet));
         }
     }
     else
     {
         return(Json(new { success = false, message = "Invalid" }, JsonRequestBehavior.AllowGet));
     }
 }