Beispiel #1
0
 /// <summary>
 ///     Lädt die VM relevanten Daten
 /// </summary>
 public void LoadData()
 {
     DifficultyLevelScales.Clear();
     foreach (DifficultyLevelScale difficultyLevelScale in _difficultyLevelScaleService.GetAll())
     {
         IItemWithNameViewModel <DifficultyLevelScale> difficultyLevelScaleViewModel = new ItemWithNameViewModel <DifficultyLevelScale>();
         difficultyLevelScaleViewModel.LoadData(difficultyLevelScale);
         DifficultyLevelScales.Add(difficultyLevelScaleViewModel);
     }
 }
 private void RefreshRoutesInSelectedCountry()
 {
     RoutesInSelectedCountry.Clear();
     if (SelectedCountry != null)
     {
         foreach (Route route in _routeService.GetRoutesIn(SelectedCountry.Item))
         {
             IItemWithNameViewModel<Route> routeViewModel = new ItemWithNameViewModel<Route>();
             routeViewModel.LoadData(route);
             RoutesInSelectedCountry.Add(routeViewModel);
         }
     }
 }
 private void RefreshCountries()
 {
     Countries.Clear();
     foreach (Country country in _countryService.GetAll())
     {
         IItemWithNameViewModel<Country> itemViewModel = new ItemWithNameViewModel<Country>();
         itemViewModel.LoadData(country);
         Countries.Add(itemViewModel);
     }
     RefreshAreas();
     RefreshRoutesInSelectedCountry();
 }
        private void RefreshSummits()
        {
            SummitsInSelectedSummitGroup.Clear();
            if (SelectedSummitGroup != null)
            {
                foreach (Summit summit in _summitService.GetAllIn(SelectedSummitGroup.Item))
                {
                    IItemWithNameViewModel<Summit> summitViewModel = new ItemWithNameViewModel<Summit>();
                    summitViewModel.LoadData(summit);
                    SummitsInSelectedSummitGroup.Add(summitViewModel);
                }
            }

            RefreshRoutesInSelectedSummit();
        }
 private void RefreshSummitGroups()
 {
     SummitGroupsInSelectedArea.Clear();
     if (SelectedArea != null)
     {
         foreach (SummitGroup summitGroup in _summitGroupService.GetAllIn(SelectedArea.Item))
         {
             IItemWithNameViewModel<SummitGroup> summitGroupViewModel = new ItemWithNameViewModel<SummitGroup>();
             summitGroupViewModel.LoadData(summitGroup);
             SummitGroupsInSelectedArea.Add(summitGroupViewModel);
         }
     }
     RefreshSummits();
     RefreshRoutesInSelectedSummitGroup();
 }
 private void RefreshAreas()
 {
     AreasInSelectedCountry.Clear();
     if (SelectedCountry != null)
     {
         foreach (Area area in _areaService.GetAllIn(SelectedCountry.Item))
         {
             IItemWithNameViewModel<Area> areaViewModel = new ItemWithNameViewModel<Area>();
             areaViewModel.LoadData(area);
             AreasInSelectedCountry.Add(areaViewModel);
         }
     }
     RefreshSummitGroups();
     RefreshRoutesInSelectedArea();
 }
 /// <summary>
 ///     Lädt die VM relevanten Daten
 /// </summary>
 public void LoadData()
 {
     DifficultyLevelScales.Clear();
     foreach (DifficultyLevelScale difficultyLevelScale in _difficultyLevelScaleService.GetAll())
     {
         IItemWithNameViewModel<DifficultyLevelScale> difficultyLevelScaleViewModel = new ItemWithNameViewModel<DifficultyLevelScale>();
         difficultyLevelScaleViewModel.LoadData(difficultyLevelScale);
         DifficultyLevelScales.Add(difficultyLevelScaleViewModel);
     }
 }