Exemplo n.º 1
0
        public IActionResult Index()
        {
            //get list of parks
            var parks = _parkDAO.GetParks();

            //pass list to VIEW as parameter in get auth view below it
            return(GetAuthenticatedView("Index", parks));
            //on the view, bind the type passed in
            //use to build razer
        }
        public IActionResult Index()
        {
            ParkViewModel vm = new ParkViewModel();

            vm.ParkList = _db2.GetParks();
            return(View(vm));
        }
Exemplo n.º 3
0
        /// <summary>
        /// Retrieve the survey view model for the survey form methods.
        /// </summary>
        /// <returns></returns>
        private SurveyViewModel GetSurveyModel()
        {
            SurveyViewModel vm         = new SurveyViewModel();
            IList <Park>    parksFound = _dao.GetParks();

            foreach (var park in parksFound)
            {
                SelectListItem item = new SelectListItem();
                item.Text  = park.ParkName;
                item.Value = park.ParkCode;
                vm.Parks.Add(item);
            }

            return(vm);
        }
Exemplo n.º 4
0
        public IActionResult Survey()
        {
            IList <Park> Parks = new List <Park>();

            Parks = _db2.GetParks();
            SurveyViewModel vm = new SurveyViewModel();

            foreach (Park p in Parks)
            {
                SelectListItem s = new SelectListItem {
                    Text = p.ParkName, Value = p.ParkCode
                };
                vm.ParkList.Add(s);
            }
            return(View(vm));
        }
Exemplo n.º 5
0
        public IActionResult Index()
        {
            IList <Park> parks = _dao.GetParks();

            return(GetAuthenticatedView("Index", parks));
        }