Exemple #1
0
        public void AirportSelected(Airport airport)
        {
            Arrivals.Clear();
            Departures.Clear();

            _flightsService.GetFlightsFrom(_selectedAirport).Subscribe(LoadFlights);
        }
        public void LoadFlightsFromAirport(Airport airport)
        {
            IsBusy = true;
            Arrivals.Clear();
            Departures.Clear();

            _flightsService.GetFlightsFrom(FlightsLoaded, _selectedAirport);
        }
 private void ClearDeparturesArrivalsTable()
 {
     if (SelectedDepFlight != null)
     {
         SelectedDepFlight = null;
     }
     if (SelectedArrFlight != null)
     {
         SelectedArrFlight = null;
     }
     DepFlightDetailsVisibility = "Hidden";
     DepartureFlightDetails     = null;
     ArrFlightDetailsVisibility = "Hidden";
     ArrivalFlightDetails       = null;
     Departures.Clear();
     Arrivals.Clear();
 }
Exemple #4
0
 private void ExecuteClearListMenuItemCommand()
 {
     Departures.Clear();
     Arrivals.Clear();
 }
        private void SearchInFlights()
        {
            DepSearchExcludedItems.ForEach(d => { if (!Departures.Contains(d))
                                                  {
                                                      Departures.Add(d);
                                                  }
                                           });
            ArrSearchExcludedItems.ForEach(d => { if (!Arrivals.Contains(d))
                                                  {
                                                      Arrivals.Add(d);
                                                  }
                                           });

            DepSearchResultItems.Clear();
            ArrSearchResultItems.Clear();
            DepSearchExcludedItems.Clear();
            ArrSearchExcludedItems.Clear();

            DepSearchResultItems = Departures.Where(d =>
                                                    d.AirwayCompany.name.ToUpper().Contains(SearchText.ToUpper()) ||
                                                    d.AirwayCompany.ID_comp.ToString().Contains(SearchText) ||
                                                    d.DepTimeString.Contains(SearchText) ||
                                                    d.ArrTimeString.Contains(SearchText) ||
                                                    d.Date.Contains(SearchText) ||
                                                    d.Plane.ToUpper().Contains(SearchText.ToUpper()) ||
                                                    d.TownFrom.ToUpper().Contains(SearchText.ToUpper()) ||
                                                    d.TownTo.ToUpper().Contains(SearchText.ToUpper()) ||
                                                    d.TripNumber.ToString().Contains(SearchText)
                                                    ).ToList();

            ArrSearchResultItems = Arrivals.Where(d =>
                                                  d.AirwayCompany.name.ToUpper().Contains(SearchText.ToUpper()) ||
                                                  d.AirwayCompany.ID_comp.ToString().Contains(SearchText) ||
                                                  d.DepTimeString.Contains(SearchText) ||
                                                  d.ArrTimeString.Contains(SearchText) ||
                                                  d.Date.Contains(SearchText) ||
                                                  d.Plane.ToUpper().Contains(SearchText.ToUpper()) ||
                                                  d.TownFrom.ToUpper().Contains(SearchText.ToUpper()) ||
                                                  d.TownTo.ToUpper().Contains(SearchText.ToUpper()) ||
                                                  d.TripNumber.ToString().Contains(SearchText)
                                                  ).ToList();

            DepSearchExcludedItems = Departures.Where(d =>
                                                      !d.AirwayCompany.name.ToUpper().Contains(SearchText.ToUpper()) ||
                                                      !d.AirwayCompany.ID_comp.ToString().Contains(SearchText) ||
                                                      !d.DepTimeString.Contains(SearchText) ||
                                                      !d.ArrTimeString.Contains(SearchText) ||
                                                      !d.Date.Contains(SearchText) ||
                                                      !d.Plane.ToUpper().Contains(SearchText.ToUpper()) ||
                                                      !d.TownFrom.ToUpper().Contains(SearchText.ToUpper()) ||
                                                      !d.TownTo.ToUpper().Contains(SearchText.ToUpper()) ||
                                                      !d.TripNumber.ToString().Contains(SearchText)).ToList();
            Departures.Clear();

            ArrSearchExcludedItems = Arrivals.Where(d =>
                                                    !d.AirwayCompany.name.ToUpper().Contains(SearchText.ToUpper()) ||
                                                    !d.AirwayCompany.ID_comp.ToString().Contains(SearchText) ||
                                                    !d.DepTimeString.Contains(SearchText) ||
                                                    !d.ArrTimeString.Contains(SearchText) ||
                                                    !d.Date.Contains(SearchText) ||
                                                    !d.Plane.ToUpper().Contains(SearchText.ToUpper()) ||
                                                    !d.TownFrom.ToUpper().Contains(SearchText.ToUpper()) ||
                                                    !d.TownTo.ToUpper().Contains(SearchText.ToUpper()) ||
                                                    !d.TripNumber.ToString().Contains(SearchText)).ToList();
            Arrivals.Clear();

            DepSearchResultItems.ForEach(d => Departures.Add(d));
            ArrSearchResultItems.ForEach(a => Arrivals.Add(a));
        }