Пример #1
0
 public JsonResult GetAll()
 {
     try
     {
         var lstSuppliers = dataSource.GetData();
         return(Json(new { result = true, data = lstSuppliers }, JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         return(Json(new { result = false, msg = ex.Message }, JsonRequestBehavior.AllowGet));
     }
 }