private void EditCar_Click(object sender, RoutedEventArgs e) { Car car = (Car)lstCars.SelectedItem; AddEditDialog aeDialog = new AddEditDialog(car, db); aeDialog.Owner = this; aeDialog.ShowDialog(); }
private void AddButtonClicked(object sender, RoutedEventArgs e) { Car car; AddEditDialog aeDialog = new AddEditDialog(null, db); aeDialog.Owner = this; aeDialog.ShowDialog(); }