private void BtnView_Click(object sender, RoutedEventArgs e) { VehicleWindow vehicleWindow = new VehicleWindow(Journeys, FuelPurchases, Services, false) { Owner = this, DataContext = selectedVehicle }; vehicleWindow.ShowDialog(); }
private void BtnAdd_Click(object sender, RoutedEventArgs e) { if (Online) { VehicleWindow vehicleWindow = new VehicleWindow(Journeys, FuelPurchases, Services, true) { Owner = this, DataContext = new Vehicle(Vehicles.FindId()) }; vehicleWindow.ShowDialog(); } else { MessageBox.Show("Limited 'View Only' Capabilities on Offline Mode"); } }