/// <summary> /// 异步加载数据 /// </summary> /// <param name="dRequest"></param> /// <returns></returns> public ActionResult Read([DataSourceRequest] DataSourceRequest dRequest) { SortModel sort = null; if (dRequest.Sorts != null && dRequest.Sorts.Count > 0) { sort = dRequest.Sorts[0].ToSortModel(); } FilterModel filter = null; if (dRequest.Filters != null && dRequest.Filters.Count > 0) { filter = ((FilterDescriptor)dRequest.Filters[0]).ToSortModel(); } var areaResult = OvertimeService.List(dRequest.Page, dRequest.PageSize, sort, filter); DataSourceResult result = new DataSourceResult() { Data = areaResult.Data, Total = areaResult.Total }; return(Json(result)); }