Ejemplo n.º 1
0
        public ActionResult Index(string title)
        {
			// If Events aren't enabled we should 404
            if (!SettingsUtils.EventsEnabled()) { throw new HttpException(404, "Page not Found"); }

			// Event Listing Homepage
			if (String.IsNullOrEmpty(title))
			{
				var model = new EventHomeViewModel();

				return View("~/Views/Home/Event.cshtml", model);
			}
			// Individual Event
			else
			{
				var model = new EventSingleHomeViewModel(title);

				return View("~/Views/Home/EventSingle.cshtml", model);
			}
        }
Ejemplo n.º 2
0
        public ActionResult Index(string title)
        {
            // If Events aren't enabled we should 404
            if (!SettingsUtils.EventsEnabled())
            {
                throw new HttpException(404, "Page not Found");
            }

            // Event Listing Homepage
            if (String.IsNullOrEmpty(title))
            {
                var model = new EventHomeViewModel();

                return(View("~/Views/Home/Event.cshtml", model));
            }
            // Individual Event
            else
            {
                var model = new EventSingleHomeViewModel(title);

                return(View("~/Views/Home/EventSingle.cshtml", model));
            }
        }