public ActionResult CheckElligibility() { var gVal = new GenericValidator(); try { var importerInfo = GetLoggedOnUserInfo(); if (importerInfo.Id < 1) { gVal.Code = -1; gVal.Error = "Invalid Operation. Please try again."; return(Json(gVal, JsonRequestBehavior.AllowGet)); } var response = new GeneralInformationServices().GetApplicantUnsuppliedDocumentTypes(importerInfo.Id); if (!response.Any()) { gVal.DocumentTypeObjects = new List <DocumentTypeObject>(); } else { gVal.DocumentTypeObjects = response; } return(Json(gVal, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { ErrorLogger.LoggError(ex.StackTrace, ex.Source, ex.Message); gVal.Code = -1; gVal.Error = "An unknown error was encountered. Request could not be serviced. Please try again later."; return(Json(gVal, JsonRequestBehavior.AllowGet)); } }
public ActionResult GetStructures() { try { var response = new GeneralInformationServices().GetStructures(); if (response == null || !response.Any()) { return(Json(new List <StructureObject>(), JsonRequestBehavior.AllowGet)); } return(Json(response, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { ErrorLogger.LoggError(ex.StackTrace, ex.Source, ex.Message); return(Json(new List <StructureObject>(), JsonRequestBehavior.AllowGet)); } }
public ActionResult CheckImporterElligibility(long id) { try { if (id < 1) { return(Json(new List <StandardRequirementTypeObject>(), JsonRequestBehavior.AllowGet)); } var response = new GeneralInformationServices().GetUStandardRequirements(id); if (!response.Any()) { return(Json(new List <StandardRequirementTypeObject>(), JsonRequestBehavior.AllowGet)); } return(Json(response, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { ErrorLogger.LoggError(ex.StackTrace, ex.Source, ex.Message); return(Json(new List <StandardRequirementTypeObject>(), JsonRequestBehavior.AllowGet)); } }