public ActionResult GetResultData() { var dc = new PinereDataContext(PinereConstant.PinereConnectionString); List <SearchResult> ResultList = new List <SearchResult>(); try { var Result = (from a in dc.GetPasienListForLitbang() select a); Result = Result.OrderByDescending(o => o.KKPId); ResultList = (from a in Result select new SearchResult { NamaAirline = a.NamaAirline, NomorPenerbangan = a.NomorPenerbangan, NamaPasien = a.NamaPasien, TanggalLahir = DataRepository.GetDateStringFromDate(a.TanggalLahir), HasilDiagnosa = a.Diagnosa, RujukRS = a.Rujuk_RS_Dis, LitbangFlag = a.Litbang_Flag.ToString(), ActionEdit = Url.Action("Input", new { @KKPId = a.KKPId }) }).ToList(); } catch (Exception e) { throw new Exception(e.Message); } return(Json(new { iTotalRecords = ResultList.Count(), iTotalDisplayRecords = ResultList.Count(), aaData = ResultList }, JsonRequestBehavior.AllowGet)); }