private void Vehicles_DataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e) { var tmp = (Vehicle)Vehicles_DataGrid.SelectedItem; var window = new VehicleWindow("Edit", tmp); window.ShowDialog(); SetDataGrid(); }
private void AddVehicle_Click(object sender, RoutedEventArgs e) { var vehicle = new Vehicle(); var add = new VehicleWindow("Add new vehicle", vehicle); add.ShowDialog(); what = "vehicles"; SetDataGrid(); }