Пример #1
0
        private async Task GetDestinations()
        {
            this.Destinations = await DestinationRepository.GetDestinations();

            if (VindRitFilterVM.SelectedDestination != null)
            {
                this.SelectedDestination_ID = VindRitFilterVM.SelectedDestination.Destinations_ID;
            }


            RaiseAll();
        }
Пример #2
0
        private async Task GetDestinations()
        {
            this.Loading = true;
            RaisePropertyChanged("Loading");

            destinations_all = await DestinationRepository.GetDestinations();

            var count = destinations_all.Count;

            if (destinations_all.Count >= 10)
            {
                count = 10;
            }

            for (int i = 0; i < count; i++)
            {
                if (destinations_all[i].Default == false)
                {
                    destinations_all[i].VisibleDefault = Visibility.Visible;
                    destinations_all[i].SetDefault     = new RelayCommand <object>(SetDefault);
                }
                else
                {
                    destinations_all[i].VisibleDefault = Visibility.Collapsed;
                }

                destinations_all[i].Remove = new RelayCommand <object>(Remove);
            }
            this.Destinations = destinations_all;
            if (this.Destinations == null || this.Destinations.Count == 0)
            {
                this.Error = "Geen bestemmingen gevonden";
            }
            this.Loading = false;
            RaiseAll();
        }