/// <summary> /// Initializes the ListView bag. /// </summary> /// <param name="redirectPageUrl">The redirect page URL.</param> protected virtual void InitializeListViewBag(string redirectPageUrl) { var timezoneInfo = UserManager.GetManager().GetUserTimeZone(); this.ViewBag.WidgetId = EventSchedulerHelper.GetWidgetId(this); this.ViewBag.DetailsPageId = this.DetailsPageId == Guid.Empty ? (SiteMapBase.GetActualCurrentNode() == null ? Guid.Empty : SiteMapBase.GetActualCurrentNode().Id) : this.DetailsPageId; this.ViewBag.UiCulture = SystemManager.CurrentContext.AppSettings.Multilingual ? CultureInfo.CurrentUICulture.ToString() : string.Empty; this.ViewBag.TimeZoneOffset = timezoneInfo.BaseUtcOffset.TotalMilliseconds.ToString(); this.ViewBag.TimeZoneId = timezoneInfo.Id; }
/// <summary> /// Initializes the ListView bag. /// </summary> /// <param name="redirectPageUrl">The redirect page URL.</param> protected virtual void InitializeListViewBag(string redirectPageUrl) { var timezoneInfo = UserManager.GetManager().GetUserTimeZone(); this.ViewBag.IsRtl = EventSchedulerHelper.IsRtl(); if (this.HttpContext != null && this.HttpContext.Items.Contains("versionpreview") && this.HttpContext.Items["versionpreview"].ToString().ToLowerInvariant() == "true") { this.ViewBag.WidgetId = EventSchedulerHelper.GetWidgetId(this); } else { this.ViewBag.WidgetId = this.ViewData["controlDataId"]; } this.ViewBag.CurrentPageId = this.GetPageId(); this.ViewBag.DetailsPageId = this.DetailsPageId == Guid.Empty ? (SiteMapBase.GetActualCurrentNode() == null ? Guid.Empty : SiteMapBase.GetActualCurrentNode().Id) : this.DetailsPageId; this.ViewBag.UiCulture = SystemManager.CurrentContext.AppSettings.Multilingual ? CultureInfo.CurrentUICulture.ToString() : string.Empty; this.ViewBag.TimeZoneOffset = timezoneInfo.BaseUtcOffset.TotalMilliseconds.ToString(); this.ViewBag.TimeZoneId = timezoneInfo.Id; }