public JsonResult GetJsonNguoiDung(JQueryDataTableParamModel param) { // check login int sortColumnIndex = param.ISortCol_0; string order = param.SSortDir_0; string orderBy = string.Empty; switch (sortColumnIndex) { case 0: orderBy = "Name"; break; case 1: orderBy = "Description"; break; case 2: orderBy = "Code"; break; case 3: orderBy = "CreateDate"; break; } PhongBanBussinessService phongBanBussinessService = new PhongBanBussinessService(); List <User> listUser = phongBanBussinessService.GetListNguoiDung(param); int totalRecords = 0; totalRecords = phongBanBussinessService.GetCountListNguoiDung(param); // return jon datatable return(Json(new { sEcho = param.SEcho, iTotalRecords = totalRecords, iTotalDisplayRecords = totalRecords, aaData = listUser }, JsonRequestBehavior.AllowGet)); }