public ActionResult GetResultData() { var dc = new PinereDataContext(PinereConstant.PinereConnectionString); List <SearchResult> ResultList = new List <SearchResult>(); try { var Result = (from a in dc.GetDataAirlineForKKP() select a); Result = Result.OrderByDescending(o => o.CreatedDate); ResultList = (from a in Result select new SearchResult { NamaAirline = a.Nama_Airline_Dis, NomorPenerbangan = a.Nomor_Penerbangan, WaktuBerangkat = DataRepository.GetDateStringFromDate(a.Waktu_Berangkat), KotaAsal = a.Kota_Asal_Dis, KotaTujuan = a.Kota_Tujuan_Dis, PenumpangSakit = a.Penumpang_Sakit_Dis, KKPFlag = a.KKP_Flag.Value.ToString(), ActionEdit = Url.Action("Input", new { @DataAirlineId = a.ID }) }).ToList(); } catch (Exception e) { throw new Exception(e.Message); } return(Json(new { iTotalRecords = ResultList.Count(), iTotalDisplayRecords = ResultList.Count(), aaData = ResultList }, JsonRequestBehavior.AllowGet)); }