Beispiel #1
0
        public ActionResult AddSurvey(Survey model, string id)
        {
            ViewBag.visable = "hidden";
            if (!ModelState.IsValid)
            {
                ViewBag.visable = "";
                return(View("AddSurvey"));
            }
            ISurveyDAL newSurvey = new SurveySqlDAL();

            model.ParkCode = id;
            if (newSurvey.addNewSurvey(model))
            {
                return(RedirectToAction("SurveyList", "Survey"));
            }
            else
            {
                return(View("AddSurvey"));
            }
        }