private void RefreshButton_Click(object sender, RoutedEventArgs e) { Buses = _dlAdmin.GetAllBuses(); Customers = _dlAdmin.GetAllCustomers(); Directions = _dlAdmin.GetAllDirections(); Orders = _dlAdmin.GetAllOrders(); Trips = _dlAdmin.GetAllTrips(); }
public AddTrips() { InitializeComponent(); DataContext = this; _Directions = new ObservableCollection <Direction>(); _buses = new ObservableCollection <Bus>(); Buses = dl.GetAllBuses(); foreach (var dir in dl.GetAllDirections()) { if (dir.IsActive == true) { _Directions.Add(dir); } } }