public JsonResult Lists(string jtSearching = null, int jtStartIndex = 0, int jtPageSize = 0, string jtSorting = null) { try { //Thread.Sleep(200); var itemCount = ProductTypeManager.GetCountByFiltering(jtSearching); var items = ProductTypeManager.GetByFilterings(jtSearching, jtStartIndex, jtPageSize, jtSorting).ToList(); return(Json(new { Result = "OK", Records = items, TotalRecordCount = itemCount }, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { return(Json(new { Result = "ERROR", Message = ex.Message })); } }