/// <summary> /// /// </summary> public AwardBonus() { _objIFormatXmlUtility = new FormatXmlUtility(); //This class is also called from Batch, where HttpContext is not available, hence putting this if condition. if (HttpContext.Current != null) { if (HttpContext.Current.Session["sessionKey"] == null) { HttpContext.Current.Session["sessionKey"] = RetalixSessionManagement.CreateSessionKey(); } _logMsg = new LogMessage { SessionKey = (string)HttpContext.Current.Session["sessionKey"], Module = StaticData.ManageHouseholdModule, ClassName = GetType().Name }; } else { _logMsg = new LogMessage { SessionKey = "Batch", Module = StaticData.ManageHouseholdModule, ClassName = GetType().Name }; } }
/// <summary> /// Constructor /// </summary> public ValidateRegisterPromotion() { //This class is also called from Batch, where HttpContext is not available, hence putting this if condition. if (HttpContext.Current != null) { if (HttpContext.Current.Session["sessionKey"] == null) { HttpContext.Current.Session["sessionKey"] = RetalixSessionManagement.CreateSessionKey(); } _logMsg = new LogMessage { SessionKey = (string)HttpContext.Current.Session["sessionKey"], Module = "Register to Promotion", ClassName = GetType().Name, }; } else { _logMsg = new LogMessage { SessionKey = "Batch", Module = "Register to Promotion", ClassName = GetType().Name, }; } }