Пример #1
0
        public ActionResult Index()
        {
            string role = Convert.ToString(System.Web.HttpContext.Current.Session["memberRole"]);

            ViewBag.Log = true;
            if (role.Trim() == "")
            {
                ViewBag.Log = false;
            }

            //front page postal
            ViewBag.HasFixedBanner1 = false;
            ViewBag.HasFixedBanner2 = false;
            ViewBag.HasFixedBanner3 = false;

            ViewBag.FixedBanner1 = CalendarRepository.GetCalendarByDescription("FixedBanner1");
            ViewBag.FixedBanner2 = CalendarRepository.GetCalendarByDescription("FixedBanner2");
            ViewBag.FixedBanner3 = CalendarRepository.GetCalendarByDescription("FixedBanner3");

            if (ViewBag.FixedBanner1 != null)
            {
                ViewBag.HasFixedBanner1 = true;
            }

            if (ViewBag.FixedBanner2 != null)
            {
                ViewBag.HasFixedBanner2 = true;
            }

            if (ViewBag.FixedBanner3 != null)
            {
                ViewBag.HasFixedBanner3 = true;
            }
            ViewBag.DisplayFixedBanner = false;
            constant DisplayFixedBanner = ConstantRepository.GetConstantByName("DisplayFixedBanner");

            if (DisplayFixedBanner.Value1 == "Yes")
            {
                ViewBag.DisplayFixedBanner = true;
            }


            ViewBag.Role = role;
            return(PartialView());
        }
Пример #2
0
        public ActionResult UpdateFixedBanner(string Description)
        {
            calendar c = CalendarRepository.GetCalendarByDescription(Description);

            return(RedirectToAction("Edit", new { calendarID = c.calendarID, ReturnBeginDate = DateTime.Today.Date, ReturnEndDate = DateTime.Today.Date, ReturnCallerType = "FixedBanner" }));
        }