public ActionResult ExportHomecareDetails(CC.Web.Models.AgencyReportingHomecareDetailsModel model) { model.iDisplayLength = int.MaxValue; var all = model.GetAgencyReportingData(db, Permissions); return(this.Excel("AgencyReportingHomecareDetails", "Data", all)); }
public JsonResult HomecareDetailsDataTable(CC.Web.Models.AgencyReportingHomecareDetailsModel model) { if (model.CurId == null) { var empty = new CC.Web.Models.jQueryDataTableResult() { sEcho = model.sEcho, iTotalDisplayRecords = 0, aaData = new List <CC.Web.Models.AgencyReportingHomecareDetailsRow>() }; return(MyJsonResult(empty)); } var all = model.GetAgencyReportingData(db, Permissions); var data = new CC.Web.Models.jQueryDataTableResult() { sEcho = model.sEcho, iTotalDisplayRecords = all.Count() > model.iDisplayLength ? model.iDisplayStart + model.iDisplayLength + 1 : model.iDisplayStart + 1, aaData = all.Take(model.iDisplayLength) }; return(MyJsonResult(data)); }