Пример #1
0
        public ViewResult Search(EventSearchModel eventSearch)
        {
            eventSearch.EventSearchParams.EventStartTime = GetTimespanFromStringValues(Request["startHour"], Request["startMinute"], Request["startMeridian"]);
            eventSearch.EventSearchParams.EventEndTime = GetTimespanFromStringValues(Request["endHour"], Request["endMinute"], Request["endMeridian"]);
            //eventSearch.EventSearchParams.ServerID = (eventSearch.EventSearchParams.ServerID > 0) ? eventSearch.EventSearchParams.ServerID : null;

            eventSearch.Events = eventInterface.SearchEvents(eventSearch.EventSearchParams, MemberInfo.MemberID);
            if (eventSearch.Events.Count < 1)
            {
                //No Events were found
            }

            //Re-pop games
            eventSearch.Games = gameInterface.GetAllGames(true).ToList();
            eventSearch.Games.Insert(0, new Game() { GameID = -1, GameName = "Select a Game" });

            //SelectList startMeridian = new SelectList(new List<string> { "AM", "PM" }, Request["startMeridian"]);
            //ViewData["startMeridianList"] =

            //Re-pop Times
            ViewData.Add("StartHour", Request["startHour"]);
            ViewData.Add("StartMinute", Request["startMinute"]);
            ViewData.Add("StartMeridian", Request["startMeridian"]);

            ViewData.Add("EndHour", Request["endHour"]);
            ViewData.Add("EndMinute", Request["endMinute"]);
            ViewData.Add("EndMeridian", Request["endMeridian"]);

            return View(eventSearch);
        }
Пример #2
0
        public ViewResult Search()
        {
            EventSearchModel model = new EventSearchModel();

            model.Games = gameInterface.GetAllGames(true).ToList();
            model.Games.Insert(0, new Game(){GameID = -1, GameName = "Select a Game"});

            ViewData.Add("StartMeridian", "PM");
            ViewData.Add("EndMeridian", "PM");

            return View(model);
        }