Пример #1
0
            public override void OnActionExecuting(ActionExecutingContext filterContext)
            {
                SiteDT site = SitesManager.GetSiteFromHostname(filterContext.HttpContext.Request.Url.Host);

                filterContext.Controller.ViewBag.Site = site;

                if (filterContext.HttpContext.Request.QueryString.AllKeys.Contains("s"))
                {
                    filterContext.Controller.ViewBag.Referrer = ReferrersManagers.GetReferrer(filterContext.HttpContext.Request.QueryString["s"]).Name;
                }
                else
                {
                    filterContext.Controller.ViewBag.Referrer = "PartsGeek.com";
                }

                base.OnActionExecuting(filterContext);
            }