using DealerSelection.Common.Configuration; namespace DealerSelection.Api.CommonUtil { public class CustomCfg { public int BuId { get; set; } public string BuCode { get; set; } public string DeafaultDealerCode { get; set; } public string InfoBipAppilcationId { get; set; } public string InfoBipMessageId { get; set; } public string InfoBipFroms { get; set; } public string CCAvenueAccessCode { get; set; } public string CCAvenueMerchantCode { get; set; } public string CCAvenueBaseUrl { get; set; } public string BookingPrice { get; set; } public string CCAvenueWorkingKey { get; set; } public string WebengageLandingPageUrl { get; set; } public string WebengageEventName { get; set; } public string WebEngageLicenseCode { get; set; } public string WebEngageAuthToken { get; set; } public string WebengageApiHost { get; set; } public string ValidateDuplicate { get; set; } public int ValidateDuplicateHour { get; set; } public string ClientId { get; set; } public string ClientSecret { get; set; } public string Key { get; set; } public string Audience { get; set; } public string Issuer { get; set; } public string Role { get; set; } public string ExpireMinutes { get; set; } public static CustomCfg GetCustomCfg(int buId) { CustomCfg cfg = new CustomCfg(); switch (buId) { case 1: cfg.BuCode= ConfigurationHelper.GetSetting("KtmCfg:BuCode", true); cfg.CCAvenueAccessCode = ConfigurationHelper.GetSetting("KtmCfg:CCAvenueAccessCode", true); cfg.CCAvenueMerchantCode = ConfigurationHelper.GetSetting("KtmCfg:CCAvenueMerchantCode", true); cfg.CCAvenueWorkingKey = ConfigurationHelper.GetSetting("KtmCfg:CCAvenueWorkingKey", true); cfg.WebengageEventName = ConfigurationHelper.GetSetting("KtmCfg:WebengageEventName", true); cfg.WebEngageLicenseCode = ConfigurationHelper.GetSetting("KtmCfg:WebEngageLicenseCode", true); cfg.WebEngageAuthToken = ConfigurationHelper.GetSetting("KtmCfg:WebEngageAuthToken", true); cfg.WebengageApiHost = ConfigurationHelper.GetSetting("KtmCfg:WebengageApiHost", true); cfg.BuId = buId; cfg.DeafaultDealerCode = ConfigurationHelper.GetSetting("KtmCfg:DefaultDealerCode", true); //cfg.ClientId = ConfigurationHelper.GetSetting("KtmCfg:ClientId", true); //cfg.ClientSecret = ConfigurationHelper.GetSetting("KtmCfg:ClientSecret", true); // cfg.Key = ConfigurationHelper.GetSetting("KtmCfg:Key", true); // cfg.Audience = ConfigurationHelper.GetSetting("KtmCfg:Audience", true); // cfg.Issuer = ConfigurationHelper.GetSetting("KtmCfg:Issuer", true); // cfg.Role = ConfigurationHelper.GetSetting("KtmCfg:Role", true); // cfg.ExpireMinutes = ConfigurationHelper.GetSetting("KtmCfg:ExpireMinutes", true); break; default: cfg.BuId = buId; break; } return cfg; } } }