private void FillRouteSource() { if (CurStation.Name == AllStations.First().Name) { ComboBoxRoutes.ItemsSource = AllRoutes.Concat(Db.Routes.Items); } else { StationSelect(); } }
private void StationSelect() { ComboBoxRoutes.ItemsSource = AllRoutes.Concat(Db.Routes.Items.Where(r => r.Stations.FirstOrDefault(s => s.StationId == CurStation.Id) != null)); }