Beispiel #1
0
        public ActionResult SurveyResult()
        {
            SurveyResultVM model = new SurveyResultVM();

            model.ListAllSurveys = dal.GetAllSurveys();
            model.TotalSurveys   = dal.SurveyCount();
            return(View("SurveyResult", model));
        }
Beispiel #2
0
        public ActionResult FavoriteParks()
        {
            List <ParkModel>            parks            = parkDal.GetAllParks();
            Dictionary <ParkModel, int> parksWithSurveys = new Dictionary <ParkModel, int>();

            foreach (ParkModel p in parks)
            {
                int count = surveyDal.SurveyCount(p.ParkCode);
                if (count > 0)
                {
                    parksWithSurveys[p] = count;
                }
            }
            return(View("FavoriteParks", parksWithSurveys));
        }