Beispiel #1
0
 public ActionResult Delete(string id)
 {
     try
     {
         JSONReadWrite ex     = new JSONReadWrite();
         var           result = ex.deteleMaterialById(id);
         if (result)
         {
             return(Json(new { success = true, html = GlobalClass.RenderRazorViewToString(this, "ViewAlll", GetAllConsumableMaterial()), message = "Deleted Successfully" }, JsonRequestBehavior.AllowGet));
         }
         else
         {
             return(Json(new { success = false, message = "Delete Fail" }, JsonRequestBehavior.AllowGet));
         }
     }
     catch (Exception ex)
     {
         return(Json(new { success = false, message = ex.Message }, JsonRequestBehavior.AllowGet));
     }
 }