public JsonResult GetRecords() { int start = int.Parse(HttpContext.Request["start"]); int limit = int.Parse(HttpContext.Request["limit"]); string employeeCode = HttpContext.Request["Employee"]; DateTime fromDate = DateTime.Parse(HttpContext.Request["FromDate"]); DateTime toDate = DateTime.Parse(HttpContext.Request["ToDate"]); int workRecordCount = WorkRecord.GetAllCount(employeeCode, fromDate, toDate); List <WorkRecord.DTO> workRecordSome = WorkRecord.GetSome(employeeCode, fromDate, toDate, start, limit); var result = new { totalProperty = workRecordCount, root = workRecordSome }; return(Json(result)); }