Exemple #1
0
        // GET: Climatogram
        public ActionResult ViewClimatogram(int selectedGrade, string selectedContinent, string selectedCountry, string selectedLocation)
        {
            Grade currentGrade = gradeRepository.FindById(selectedGrade);

            Determinatietabel = currentGrade.DeterminationTable;
            ViewBag.Location  = selectedLocation;

            Continent currentContinent = currentGrade.FindContinentByName(selectedContinent);
            Country   currentCountry   = currentContinent.FindCountryByName(selectedCountry);
            Location  currentLocation  = currentCountry.FindLocationByName(selectedLocation);

            Climatogram climatogram = currentLocation.Climatogram;
            Vragenlijst vragenlijst = new Vragenlijst(currentLocation, climatogram);

            string[]   vragen           = vragenlijst.GeefVragen();
            double[]   juisteAntwoorden = vragenlijst.GeefJuisteAntwoorden();
            double[][] antwoorOpties    = vragenlijst.GeefAntwoordOpties();

            string[]       climatogramSolution = Determinatietabel.Determineer(climatogram);
            List <Boolean> determinatiePad     = Determinatietabel.GetDeterminationPath(climatogram, new List <Boolean>());

            ClimatogramViewModel cvm = new ClimatogramViewModel(currentGrade, currentContinent, currentCountry, currentLocation, juisteAntwoorden, vragen, antwoorOpties, Determinatietabel, climatogramSolution, determinatiePad);

            return(View("ViewClimatogram", cvm));
        }
        public ActionResult SelectLocation(int selectedGrade, string selectedContinent, string selectedCountry)
        {
            Grade currentGrade = gradeRepository.FindById(selectedGrade);

            Continent currentContinent = currentGrade.FindContinentByName(selectedContinent);

            Country currentCountry = currentContinent.FindCountryByName(selectedCountry);

            return(View("SelectLocation", new NavigationViewModel(currentGrade, currentContinent, currentCountry)));
        }