public ActionResult GetUniqueCaseIds(Guid loanId, string integration) { var integrationType = GetIntegrationType(integration); var serviceTrack = AUSServiceFacade.ServiceTrackingRetrieveAllByLoanId(loanId, integrationType); var caseIds = (from st in serviceTrack where st.EndTime.HasValue && !string.IsNullOrEmpty(st.CaseId) orderby st.EndTime.Value descending select st.CaseId).Distinct(); var output = new List <LoanCaseId>(); // add a blank item output.Add(new LoanCaseId() { CaseId = string.Empty, isDefault = false }); var isdef = true; foreach (var caseid in caseIds) { output.Add(new LoanCaseId() { isDefault = isdef, CaseId = caseid }); isdef = false; } return(Json(output, JsonRequestBehavior.AllowGet)); }
public ActionResult ShowFreddieMacLp(string LoanId) { var loanId = Guid.Empty; var serviceTrackingModel = new List <ServiceTrackingContract>(); var serviceValidationModel = new List <ServiceValidationContract>(); var caseids = new List <string>(); var freddieMacLpViewModel = new FreddieMacLpViewModel(); if (Guid.TryParse(LoanId, out loanId)) { freddieMacLpViewModel.LoanId = loanId; serviceTrackingModel = AUSServiceFacade.ServiceTrackingRetrieveAllByLoanId(loanId, AusType.LP); serviceValidationModel = AUSServiceFacade.ServiceValidationRetrieveAllByLoanId(loanId); if (serviceTrackingModel != null) { freddieMacLpViewModel.LpResults = serviceTrackingModel; freddieMacLpViewModel.LpResultsTitle = serviceTrackingModel.FirstOrDefault(); if (freddieMacLpViewModel.LpResultsTitle == null) { freddieMacLpViewModel.ProcessingItem = false; } else if (freddieMacLpViewModel.LpResultsTitle.EndTime == null || freddieMacLpViewModel.LpResultsTitle.EndTime == DateTime.MinValue) { freddieMacLpViewModel.ProcessingItem = true; } else { freddieMacLpViewModel.ProcessingItem = false; } } if (serviceValidationModel != null) { freddieMacLpViewModel.LpValidation = serviceValidationModel; } // get list of unique caseids caseids = (from st in serviceTrackingModel orderby st.StartTime.Value descending /* where st.EndTime.HasValue */ select st.CaseId).Distinct().ToList <string>(); freddieMacLpViewModel.CaseIds = caseids; } else { freddieMacLpViewModel.LoanId = Guid.Empty; } return(PartialView("Aus/_freddieMacLp", freddieMacLpViewModel)); }
public ActionResult GetVendorLoanIdForCase(Guid loanId, string integration, string caseId) { var integrationType = GetIntegrationType(integration); var serviceTrack = AUSServiceFacade.ServiceTrackingRetrieveAllByLoanId(loanId, integrationType); if (serviceTrack != null) { var vendorLoanId = (from st in serviceTrack where st.CaseId == caseId select st.VendorLoanId).FirstOrDefault(); return(Json(string.IsNullOrEmpty(vendorLoanId) ? string.Empty : vendorLoanId, JsonRequestBehavior.AllowGet)); } else { return(Json(string.Empty, JsonRequestBehavior.AllowGet)); } }
public ActionResult GetServiceTrackingContract(Guid serviceTrackingId) { var errorReturn = Json(new ServiceTrackingContract() { ErrorMessage = "An error occured while retrieving the data" }, JsonRequestBehavior.AllowGet); try { var data = AUSServiceFacade.ServiceTrackingRetrieveByServiceTrackingId(serviceTrackingId, AusType.NotSpecified); return(data != null && data.Count > 0 ? Json(data[0], JsonRequestBehavior.AllowGet) : errorReturn); } catch { return(errorReturn); } }