Full code:
using CMS.Base;
using CMS.DataEngine;
using CMS.Helpers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace EBIZ.Integration.CRM
{
public class CRMContext : AbstractContext<CRMContext>
{
private CRMSystemType mCrmSystemType;
public static CRMSystemType CRMSystemType
{
get
{
CRMContext current = ContextContainer<CRMContext>.Current;
CRMSystemType crmSystemType = current.mCrmSystemType;
if (crmSystemType == null)
{
if (Enum.TryParse<CRMSystemType>(SettingsKeyInfoProvider.GetStringValue("EBIZMembershipCRMSystemType"), out crmSystemType))
{
current.mCrmSystemType = crmSystemType;
}
else
{
current.mCrmSystemType = CRM.CRMSystemType.NoCRM;
}
}
return crmSystemType;
}
}
public static bool AllowKeyUserPromotion
{
get
{
return CRMSystemType == CRM.CRMSystemType.NoCRM;
}
}
}
}