Beispiel #1
0
        public ActionResult Index()
        {
            var cookie = Request.Cookies["selStudios"];

            var vm = new ScheduleFilterModel();
            vm.Init(cookie != null?cookie.Value:null);

            return View(vm);
        }
Beispiel #2
0
        public ActionResult Index(ScheduleFilterModel model)
        {
            model.Init(null);

            var sels = from sp in model.SelectionPlaces
                       where sp.IsSelected
                       select sp.Code;
            var selStr = string.Join(",", sels);
            HttpCookie stdsCook = new HttpCookie("selStudios", selStr)
            {
                Expires = DateTime.Now.AddDays(5)
            };
            Response.AppendCookie(stdsCook);
            return View(model);
        }