public ActionResult IndexThirdPartyAPICredentials() { ThirdPartyAPICredentialsFacade fac = new ThirdPartyAPICredentialsFacade(this.CurrentClient.ApplicationDBConnectionString); List <ThirdPartyAPICredentialsEntity> lstThirdPartyAPICredentials = fac.GetThirdPartyAPICredentials(ThirdPartyProvider.ORB.ToString()); return(PartialView("~/Views/OI/OISetting/_indexThirdPartyAPICredentials.cshtml", lstThirdPartyAPICredentials)); }
public ActionResult GetDandBCredentials() { ThirdPartyAPICredentialsFacade fac = new ThirdPartyAPICredentialsFacade(this.CurrentClient.ApplicationDBConnectionString); List <ThirdPartyAPICredentialsEntity> lstThirdPartyAPICredentials = fac.GetThirdPartyAPICredentials(ThirdPartyProvider.DNB.ToString()); return(View("~/Views/DNBLicence/DnBLicenseCredential.cshtml", lstThirdPartyAPICredentials)); }
public ActionResult GetThirdPartyAPICredentials(string Parameters) { string Provider = string.Empty; if (!string.IsNullOrEmpty(Parameters)) { Provider = StringCipher.Decrypt(Parameters.Replace(Utility.Utility.urlseparator, "+"), General.passPhrase); } List <ThirdPartyAPICredentialsEntity> lstThirdPartyAPICredentials = new List <ThirdPartyAPICredentialsEntity>(); ThirdPartyAPICredentialsFacade fac = new ThirdPartyAPICredentialsFacade(this.CurrentClient.ApplicationDBConnectionString); lstThirdPartyAPICredentials = fac.GetThirdPartyAPICredentials(Provider); return(Json(lstThirdPartyAPICredentials, JsonRequestBehavior.AllowGet)); }
public static SelectList GetThirdPartyAPICredentials(string ConnectionString, string thirdPartyProvider) { List <ThirdPartyAPICredentialsEntity> lstThirdPartyAPICredentials = new List <ThirdPartyAPICredentialsEntity>(); ThirdPartyAPICredentialsFacade fac = new ThirdPartyAPICredentialsFacade(ConnectionString); lstThirdPartyAPICredentials = fac.GetThirdPartyAPICredentials(thirdPartyProvider); List <SelectListItem> lstAPICredentials = new List <SelectListItem>(); foreach (var item in lstThirdPartyAPICredentials) { lstAPICredentials.Add(new SelectListItem { Value = item.CredentialId.ToString(), Text = item.CredentialName.ToString() }); } return(new SelectList(lstAPICredentials, "Value", "Text")); }
public ActionResult IndexOILicense() { List <ThirdPartyAPICredentialsEntity> lstThirdPartyAPICredentials = new List <ThirdPartyAPICredentialsEntity>(); ThirdPartyAPICredentialsFacade fac = new ThirdPartyAPICredentialsFacade(this.CurrentClient.ApplicationDBConnectionString); lstThirdPartyAPICredentials = fac.GetThirdPartyAPICredentials(ThirdPartyProvider.ORB.ToString()); OISettingEntity Orbmodel = new OISettingEntity(); if (lstThirdPartyAPICredentials != null && lstThirdPartyAPICredentials.Any()) { Orbmodel.ORB_API_KEY = lstThirdPartyAPICredentials.FirstOrDefault().APICredential; } // MP-1046 Create Individual URL redirection for all Tabs to make better format for URL ViewBag.SelectedTab = "OI Auto Acceptance"; return(PartialView("~/Views/OI/OISetting/IndexOILicense.cshtml", Orbmodel)); }
public ActionResult DnBLicenseCredential() { ThirdPartyAPICredentialsFacade fac = new ThirdPartyAPICredentialsFacade(this.CurrentClient.ApplicationDBConnectionString); List <ThirdPartyAPICredentialsEntity> lstThirdPartyAPICredentials = fac.GetThirdPartyAPICredentials(ThirdPartyProvider.DNB.ToString()); SessionHelper.ThirdPartyAPI = JsonConvert.SerializeObject(lstThirdPartyAPICredentials); // MP-1046 Create Individual URL redirection for all Tabs to make better format for URL if (Request.Headers["X-PJAX"] == "true") { return(View(lstThirdPartyAPICredentials)); } else { ViewBag.SelectedTab = "License"; return(View("~/Views/DandB/Index.cshtml", lstThirdPartyAPICredentials)); } }
public static List <ThirdPartyAPICredentialsEntity> GetCredentials(string connectionString, string thirdPartyProvider, string APIType) { ThirdPartyAPICredentialsFacade fac = new ThirdPartyAPICredentialsFacade(connectionString); List <ThirdPartyAPICredentialsEntity> lst = fac.GetThirdPartyAPICredentials(thirdPartyProvider); if (APIType == "DirectPlus") { lst = lst.Where(x => x.APIType == "DirectPlus").GroupBy(x => x.CredentialName).Select(g => g.First()).ToList(); } else if (APIType == "Direct20") { lst = lst.Where(x => x.APIType == "Direct20").GroupBy(x => x.CredentialName).Select(g => g.First()).ToList(); } lst.Insert(0, new ThirdPartyAPICredentialsEntity { CredentialName = "--Select--" }); return(lst); }
public List <SelectListItem> SyncRegistration() { List <SelectListItem> lstMonitoringRegistrations = new List <SelectListItem>(); ThirdPartyAPICredentialsFacade thirdAPIFac = new ThirdPartyAPICredentialsFacade(this.CurrentClient.ApplicationDBConnectionString); //Get DirectPlus Credentials List <ThirdPartyAPICredentialsEntity> lstAuth = thirdAPIFac.GetThirdPartyAPICredentials(ThirdPartyProvider.DNB.ToString()); if (lstAuth != null && lstAuth.Any()) { List <ThirdPartyAPICredentialsEntity> lstDirectPlusAuth = lstAuth.Where(x => x.APIType.ToLower() == ApiLayerType.Directplus.ToString().ToLower()).ToList(); if (lstDirectPlusAuth != null && lstDirectPlusAuth.Any()) { foreach (var authItem in lstDirectPlusAuth) { ListMonitoringRegistrationResponse objtMonitoringRegistrationResponse = GetListMonitoringRegistrationResponse(authItem.AuthToken); if (objtMonitoringRegistrationResponse != null && objtMonitoringRegistrationResponse.messages != null && objtMonitoringRegistrationResponse.messages.references != null) { SettingFacade fac = new SettingFacade(this.CurrentClient.ApplicationDBConnectionString); string NotDeleteRegistration = string.Join(",", objtMonitoringRegistrationResponse.messages.references.ToArray()); //sync DPMRegistration Name fac.DeleteAllDPMRegistration(NotDeleteRegistration, authItem.CredentialId); foreach (var item in objtMonitoringRegistrationResponse.messages.references) { MonitoringRegistrationDetailResponse monitoringRegistrationDetailResponse = new MonitoringRegistrationDetailResponse(); monitoringRegistrationDetailResponse = GetMonitoringRegistrationDetailResponse(item.ToString(), authItem.AuthToken); //insert Registration name in database fac.DPMInsertRegistration(monitoringRegistrationDetailResponse.messages.registration.reference, monitoringRegistrationDetailResponse.messages.registration.Tags, monitoringRegistrationDetailResponse.messages.notificationsSuppressed, monitoringRegistrationDetailResponse.messages.registration.productId, monitoringRegistrationDetailResponse.messages.registration.versionId, monitoringRegistrationDetailResponse.messages.registration.email, monitoringRegistrationDetailResponse.messages.registration.fileTransferProfile, monitoringRegistrationDetailResponse.messages.registration.description, monitoringRegistrationDetailResponse.messages.registration.deliveryTrigger, monitoringRegistrationDetailResponse.messages.registration.deliveryFrequency, monitoringRegistrationDetailResponse.messages.dunsCount, monitoringRegistrationDetailResponse.messages.registration.seedData, authItem.CredentialId, monitoringRegistrationDetailResponse.messages.registration.blockIds); //insert Registration name in List lstMonitoringRegistrations.Add(new SelectListItem { Value = item.ToString(), Text = item.ToString() }); } } } } } return(lstMonitoringRegistrations); }