示例#1
0
        /// <summary>
        /// Populates the selection lists for the events controller
        /// </summary>
        private void PopulateSelectionLists()
        {
            //populates the host dropdown with  clubs drom db
            List <SelectListItem> clubs = SQLUtilities.GetAllHosts();

            ViewData["ClubHosts"] = clubs;

            //Gets all the categories and creates selection list
            List <SelectListItem> cats = SQLUtilities.GetCategories();

            ViewData["cats"] = cats;

            List <SelectListItem> camp = new List <SelectListItem>();

            camp.Add(new SelectListItem()
            {
                Value = "1", Text = "Stevens Point"
            });
            camp.Add(new SelectListItem()
            {
                Value = "2", Text = "Wisconsin Rapids"
            });
            camp.Add(new SelectListItem()
            {
                Value = "3", Text = "Marshfield"
            });
            camp.Add(new SelectListItem()
            {
                Value = "4", Text = "Adams"
            });
            camp.Add(new SelectListItem()
            {
                Value = "5", Text = "Off Campus"
            });

            ViewData["campuses"] = camp;
        }
示例#2
0
        /// <summary>
        /// Populates the posted by selection list
        /// </summary>
        private void PopulateSelectionList()
        {
            List <SelectListItem> clubs = SQLUtilities.GetAllHosts();

            ViewData["ClubHosts"] = clubs;
        }