public ActionResult Details(ExcursionIndexWebParam param, int? id)
        {
            if ((param != null) && (param.visualtheme != null))
            {
                new VisualThemeManager(this).SafeSetThemeName(param.visualtheme);
            }
            ExcursionIndexContext model = new ExcursionIndexContext();
            PartnerSessionManager.CheckPartnerSession(this, param);
            model.PartnerSessionId = param.PartnerSessionID;
            if (model.PartnerSessionId == null)
            {
                model.PartnerAlias = (param.PartnerAlias != null) ? param.PartnerAlias : Settings.ExcursionDefaultPartnerAlias;
                if (string.IsNullOrEmpty(model.PartnerAlias))
                {
                    throw new ArgumentException("partner alias is not specified");
                }
            }

            model.StartPointAlias = param.StartPointAlias;
            model.ExcursionDate = DateTime.Today.Date.AddDays((double)Settings.ExcursionDefaultDate);
            model.ExternalCartId = param.ExternalCartId;

            model.NavigateState = new ExcursionIndexNavigateCommand();
            param.sc = "description";
            param.ex = id;
            param.dt = DateTime.Today.AddDays(2);

            var seoObject = Data.SeoObjectProvider.GetSeoObject(id.Value, "excursion", UrlLanguage.CurrentLanguage);
            model.Description = seoObject.Description;
            model.Keywords = seoObject.Keywords;
            model.Title = seoObject.Title;
            model.SeoText = seoObject.SeoText;

            model.NavigateState.Cmd = "description";
            ExcursionIndexNavigateOptions options2 = new ExcursionIndexNavigateOptions
            {
                  excursion = param.Excursion,
                  date = param.Date
            };
            model.NavigateState.Options = options2;

            return base.View(model);
        }
        public ActionResult Logout(ExcursionIndexWebParam param)
        {
            base.Session.Abandon();

            ExcursionIndexContext context = new ExcursionIndexContext();

            return base.View(context);
        }
        public ActionResult HowToPay(ExcursionIndexWebParam param)
        {
            ExcursionIndexContext context = new ExcursionIndexContext();

            return base.View(context);
        }
        public ActionResult Index(ExcursionIndexWebParam param)
        {
            if ((param != null) && (param.visualtheme != null))
                new VisualThemeManager(this).SafeSetThemeName(param.visualtheme);

            ExcursionIndexContext model = new ExcursionIndexContext();
            PartnerSessionManager.CheckPartnerSession(this, param);
            model.PartnerSessionId = param.PartnerSessionID;

            if (model.PartnerSessionId == null)
            {
                model.PartnerAlias = (param.PartnerAlias != null) ? param.PartnerAlias : Settings.ExcursionDefaultPartnerAlias;
                if (string.IsNullOrEmpty(model.PartnerAlias))
                    throw new ArgumentException("partner alias is not specified");
            }
            model.StartPointAlias = param.StartPointAlias;
            model.ExcursionDate = DateTime.Today.Date.AddDays((double) Settings.ExcursionDefaultDate);
            model.ExternalCartId = param.ExternalCartId;

            if (!string.IsNullOrEmpty(param.region))
            {
                var regionId = GetDepartByName(param.region);

                if (regionId == 0) return RedirectPermanent("/error/404");

                param.sc = "search";
                param.d = new int[] { GetDepartByName(param.region) };
                param.s = "";

                var seoObject = SeoObjectProvider.GetSeoObject(regionId, "region", UrlLanguage.CurrentLanguage);

                model.Title = seoObject.Title;
                model.SeoText = seoObject.SeoText;
                model.Keywords = seoObject.Keywords;
                model.Description = seoObject.Description;
            }

            if (param.ShowCommand != null)
            {
                model.NavigateState = new ExcursionIndexNavigateCommand();
                if (param.ShowCommand.ToLower() == "search")
                {
                    if ((((param.SearchText != null) || (param.Categories != null)) || (param.Destinations != null)) || (param.ExcursionLanguages != null))
                    {
                        model.NavigateState.Cmd = "search";
                        ExcursionIndexNavigateOptions options = new ExcursionIndexNavigateOptions {
                            text = param.SearchText,
                            categories = param.Categories,
                            destinations = param.Destinations,
                            departures = param.Destinations,
                            languages = param.ExcursionLanguages
                        };
                        model.NavigateState.Options = options;
                    }
                }
                else if ((param.ShowCommand.ToLower() == "description") && param.Excursion.HasValue)
                {
                    model.NavigateState.Cmd = "description";
                    ExcursionIndexNavigateOptions options2 = new ExcursionIndexNavigateOptions {
                        excursion = param.Excursion,
                        date = param.Date
                    };
                    model.NavigateState.Options = options2;
                }
            }
            if (param.Excursion.HasValue)
            {
                model.NavigateState.Cmd = "description";
                ExcursionIndexNavigateOptions options2 = new ExcursionIndexNavigateOptions
                {
                    excursion = param.Excursion,
                    date = param.Date
                };
                model.NavigateState.Options = options2;
            }

            return base.View(model);
        }
        public ActionResult Details(ExcursionIndexWebParam param, int? id)
        {
            if ((param != null) && (param.visualtheme != null))
            {
                new VisualThemeManager(this).SafeSetThemeName(param.visualtheme);
            }
            ExcursionIndexContext model = new ExcursionIndexContext();
            PartnerSessionManager.CheckPartnerSession(this, param);
            model.PartnerSessionId = param.PartnerSessionID;
            if (model.PartnerSessionId == null)
            {
                model.PartnerAlias = (param.PartnerAlias != null) ? param.PartnerAlias : Settings.ExcursionDefaultPartnerAlias;
                if (string.IsNullOrEmpty(model.PartnerAlias))
                {
                    throw new ArgumentException("partner alias is not specified");
                }
            }

            model.StartPointAlias = param.StartPointAlias;
            model.ExcursionDate = DateTime.Today.Date.AddDays((double)Settings.ExcursionDefaultDate);
            model.ExternalCartId = param.ExternalCartId;
            model.NavigateState = new ExcursionIndexNavigateCommand();
            param.sc = "description";
            param.ex = id;

            var paramsFilter = Request.QueryString["filter"];

            if (!String.IsNullOrEmpty(paramsFilter))
            {
                var jsonFilter = JsonConvert.DeserializeObject<CatalogParam>(paramsFilter);
                var dateTmp = jsonFilter.fd;

                if (dateTmp.HasValue)
                    param.dt = dateTmp.Value;
                else
                    param.dt = DateTime.Today.AddDays(2);
            }
            else if (!String.IsNullOrEmpty(Request.QueryString["dt"]))
                param.dt = Convert.ToDateTime(Request.QueryString["dt"]);
            else//по умолчанию берем цены на послезавтра
                param.dt = DateTime.Today.AddDays(2);

            var seoObject = Data.SeoObjectProvider.GetSeoObject(id.Value, "excursion", UrlLanguage.CurrentLanguage);
            model.Description = seoObject.Description;
            model.Keywords = seoObject.Keywords;
            model.Title = seoObject.Title;
            model.SeoText = seoObject.SeoText;

            model.NavigateState.Cmd = "description";
            ExcursionIndexNavigateOptions options2 = new ExcursionIndexNavigateOptions
            {
                  excursion = param.Excursion,
                  date = param.Date
            };
            model.NavigateState.Options = options2;

            return base.View(model);
        }