You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
3.6 KiB
67 lines
3.6 KiB
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<string>("KtmCfg:BuCode", true);
|
|
cfg.CCAvenueAccessCode = ConfigurationHelper.GetSetting<string>("KtmCfg:CCAvenueAccessCode", true);
|
|
cfg.CCAvenueMerchantCode = ConfigurationHelper.GetSetting<string>("KtmCfg:CCAvenueMerchantCode", true);
|
|
cfg.CCAvenueWorkingKey = ConfigurationHelper.GetSetting<string>("KtmCfg:CCAvenueWorkingKey", true);
|
|
cfg.WebengageEventName = ConfigurationHelper.GetSetting<string>("KtmCfg:WebengageEventName", true);
|
|
cfg.WebEngageLicenseCode = ConfigurationHelper.GetSetting<string>("KtmCfg:WebEngageLicenseCode", true);
|
|
cfg.WebEngageAuthToken = ConfigurationHelper.GetSetting<string>("KtmCfg:WebEngageAuthToken", true);
|
|
cfg.WebengageApiHost = ConfigurationHelper.GetSetting<string>("KtmCfg:WebengageApiHost", true);
|
|
cfg.BuId = buId;
|
|
cfg.DeafaultDealerCode = ConfigurationHelper.GetSetting<string>("KtmCfg:DefaultDealerCode", true);
|
|
//cfg.ClientId = ConfigurationHelper.GetSetting<string>("KtmCfg:ClientId", true);
|
|
//cfg.ClientSecret = ConfigurationHelper.GetSetting<string>("KtmCfg:ClientSecret", true);
|
|
// cfg.Key = ConfigurationHelper.GetSetting<string>("KtmCfg:Key", true);
|
|
// cfg.Audience = ConfigurationHelper.GetSetting<string>("KtmCfg:Audience", true);
|
|
// cfg.Issuer = ConfigurationHelper.GetSetting<string>("KtmCfg:Issuer", true);
|
|
// cfg.Role = ConfigurationHelper.GetSetting<string>("KtmCfg:Role", true);
|
|
// cfg.ExpireMinutes = ConfigurationHelper.GetSetting<string>("KtmCfg:ExpireMinutes", true);
|
|
break;
|
|
default:
|
|
cfg.BuId = buId;
|
|
break;
|
|
}
|
|
return cfg;
|
|
|
|
}
|
|
}
|
|
|
|
}
|