Пример #1
0
        public ActionResult Survey(Survey model)
        {
            //checks to make sure all of the data in the Survey object that is required passed in
            if (!ModelState.IsValid)
            {
                //returns to the Survey View if not all the data that is required is not passed in
                return(View("Survey", GetListOfParks()));
            }

            //if the data is valid, the controller redirects to the FavoritePark View
            _surveyDAL.PostSurvey(model);
            return(RedirectToAction("FavoritePark"));
        }