public ActionResult DeleteThirdPartyEnrichments(string Parameters) { try { int enrichId = 0; if (!string.IsNullOrEmpty(Parameters)) { enrichId = Convert.ToInt32(StringCipher.Decrypt(Parameters.Replace(Utility.Utility.urlseparator, "+"), General.passPhrase)); } ThirdPartyEnrichmentsFacade fac = new ThirdPartyEnrichmentsFacade(this.CurrentClient.ApplicationDBConnectionString); if (enrichId > 0) { fac.DeleteThirdPartyEnrichmentsByEnrichmentId(enrichId, Helper.oUser.UserId); return(Json(new { result = true, message = CommonMessagesLang.msgCommanDeleteMessage }, JsonRequestBehavior.AllowGet)); } else { return(Json(new { result = false, message = CommonMessagesLang.msgCommanErrorMessage }, JsonRequestBehavior.AllowGet)); } } catch (Exception) { return(Json(new { result = false, message = CommonMessagesLang.msgCommanErrorMessage }, JsonRequestBehavior.AllowGet)); } }
public ActionResult UpsertThirdPartyEnrichments(string Parameters) { ThirdPartyEnrichmentsEntity thirdPartyEnrichments = new ThirdPartyEnrichmentsEntity(); int enrichId = 0; if (!string.IsNullOrEmpty(Parameters) && Parameters != "null") { enrichId = Convert.ToInt32(StringCipher.Decrypt(Parameters.Replace(Utility.Utility.urlseparator, "+"), General.passPhrase)); } ThirdPartyEnrichmentsFacade fac = new ThirdPartyEnrichmentsFacade(this.CurrentClient.ApplicationDBConnectionString); if (enrichId > 0) { thirdPartyEnrichments = fac.GetThirdPartyEnrichmentsByEnrichmentId(enrichId); } return(PartialView(thirdPartyEnrichments)); }
public ActionResult UpsertThirdPartyEnrichments(ThirdPartyEnrichmentsEntity enrichmentsEntity) { try { ThirdPartyEnrichmentsFacade fac = new ThirdPartyEnrichmentsFacade(this.CurrentClient.ApplicationDBConnectionString); enrichmentsEntity.EnrichmentURL = ConfigurationManager.AppSettings[enrichmentsEntity.ThirdPartyProvider].ToString() + enrichmentsEntity.EnrichmentFields; fac.UpsertThirdPartyEnrichments(enrichmentsEntity, Helper.oUser.UserId); if (enrichmentsEntity.EnrichmentId > 0) { return(Json(new { result = true, message = CommonMessagesLang.msgCommanUpdateMessage }, JsonRequestBehavior.AllowGet)); } else { return(Json(new { result = true, message = CommonMessagesLang.msgCommanInsertMessage }, JsonRequestBehavior.AllowGet)); } } catch (Exception) { return(Json(new { result = false, message = CommonMessagesLang.msgCommanErrorMessage }, JsonRequestBehavior.AllowGet)); } }
public ActionResult ThirdPartyEnrichmentsIndex() { List <ThirdPartyEnrichmentsEntity> lstEnrichments = new List <ThirdPartyEnrichmentsEntity>(); List <CVRefEntity> lstProviders = new List <CVRefEntity>(); lstProviders = CommonDropdown.GetThirdPartyProviders(0, this.CurrentClient.ApplicationDBConnectionString); ViewBag.IsThirdPartyProvidersAvailable = lstProviders.Any(); if (lstProviders.Any()) { ThirdPartyEnrichmentsFacade fac = new ThirdPartyEnrichmentsFacade(this.CurrentClient.ApplicationDBConnectionString); lstEnrichments = fac.GetThirdPartyEnrichments(); } // MP-1046 Create Individual URL redirection for all Tabs to make better format for URL if (Request.Headers["X-PJAX"] == "true") { return(PartialView(lstEnrichments)); } else { ViewBag.SelectedTab = "Data Enrichment"; ViewBag.SelectedIndividualTab = "Third Party Enrichment"; return(View("~/Views/DandB/Index.cshtml", lstEnrichments)); } }