Пример #1
0
	    public ActionResult Categories(string category)
		{
			// If Events aren't enabled we should 404
            if (!SettingsUtils.EventsEnabled()) { throw new HttpException(404, "Page not Found"); }

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

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

				return View("~/Views/Event/CategoriesSingle.cshtml", model);
			}
		}
Пример #2
0
        public ActionResult Categories(string category)
        {
            // If Events aren't enabled we should 404
            if (!SettingsUtils.EventsEnabled())
            {
                throw new HttpException(404, "Page not Found");
            }

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

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

                return(View("~/Views/Event/CategoriesSingle.cshtml", model));
            }
        }