public ActionResult SetDefaultKeysForEnrichment(ThirdPartyAPIForEnrichmentEntity model) { try { ThirdPartyAPICredentialsFacade fac = new ThirdPartyAPICredentialsFacade(this.CurrentClient.ApplicationDBConnectionString); fac.UpdateUXDefaultCredentialsForEnrichment(model.EnrichmentType, model.DnBAPIId, model.CredentialId); return(Json(new { result = true, Message = DandBSettingLang.msgSettingUpdate }, JsonRequestBehavior.AllowGet)); } catch (Exception) { return(Json(new { result = false, Message = CommonMessagesLang.msgSomethingWrong }, JsonRequestBehavior.AllowGet)); } }
public ActionResult SetDefaultInteractiveKeys(ThirdPartyAPIEntity model) { try { List <string> lstCodes = new List <string>(); List <string> credIds = new List <string>(); ThirdPartyAPICredentialsFacade fac = new ThirdPartyAPICredentialsFacade(this.CurrentClient.ApplicationDBConnectionString); if (Helper.LicenseBuildAList) { lstCodes.Add("DNB_BUILD_A_LIST"); credIds.Add(model.DNB_BUILD_A_LIST); } if (Helper.LicenseEnableInvestigations) { lstCodes.Add("DNB_INVESTIGATIONS"); credIds.Add(model.DNB_INVESTIGATIONS); } lstCodes.Add("DNB_SINGLE_ENTITY_SEARCH"); credIds.Add(model.DNB_SINGLE_ENTITY_SEARCH); lstCodes.Add("DNB_TYPEAHEAD_SEARCH"); credIds.Add(model.DNB_TYPEAHEAD_SEARCH); lstCodes.Add("GOOGLE"); credIds.Add(model.GOOGLE); lstCodes.Add("DESCARTES"); credIds.Add(model.DESCARTES); fac.UpdateUXDefaultCredentials(string.Join(",", lstCodes), string.Join(",", credIds), Helper.oUser.UserId); if (Helper.LicenseEnableCompliance) { //Update Ownership creds fac.UpdateUXDefaultCredentialsForEnrichment(model.TypeOWNERSHIP, model.OwnershipDnBAPIId, model.OwnershipCredId); CommonMethod.GetUXDefaultUXEnrichments(this.CurrentClient.ApplicationDBConnectionString); } //update session for UX default Credentials(for Auth tokens) CommonMethod.GetThirdPartyAPICredentials(this.CurrentClient.ApplicationDBConnectionString); return(Json(new { result = true, Message = DandBSettingLang.msgSettingUpdate }, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { return(Json(new { result = false, Message = CommonMessagesLang.msgSomethingWrong }, JsonRequestBehavior.AllowGet)); } }