Exemplo n.º 1
0
        public ActionResult AddSurvey(Survey survey)
        {
            if (!ModelState.IsValid)
            {
                return(View("AddSurvey", survey));
            }

            surveyDal.SubmitSurvey(survey);
            return(RedirectToAction("TopParks", "Survey"));
        }
Exemplo n.º 2
0
        public void SubmitSurveyTests()
        {
            SurveyDAL dal = new SurveyDAL(connectionString);

            Survey s = new Survey
            {
                ParkCode      = "YNP",
                Email         = "*****@*****.**",
                State         = "Ohio",
                ActivityLevel = "Sedentary",
            };

            bool newSurvey = dal.SubmitSurvey(s);

            Assert.AreEqual(true, newSurvey);
        }