Add clanker code
This commit is contained in:
@@ -79,7 +79,7 @@ namespace dealer
|
||||
|
||||
if (selectedVehicle == null)
|
||||
{
|
||||
System.Windows.MessageBox.Show("Vyberte vozidlo, které chcete zobrazit.", "Upozornění", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
System.Windows.MessageBox.Show("Vyberte vozidlo, ktere chcete zobrazit.", "Upozorneni", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -99,13 +99,13 @@ namespace dealer
|
||||
|
||||
if (selectedVehicle == null)
|
||||
{
|
||||
System.Windows.MessageBox.Show("Vyberte vozidlo, které chcete smazat.", "Upozornění", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
System.Windows.MessageBox.Show("Vyberte vozidlo, ktere chcete smazat.", "Upozorneni", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
var result = System.Windows.MessageBox.Show(
|
||||
$"Opravdu chcete smazat vozidlo {selectedVehicle.Model} (SPZ: {selectedVehicle.Spz})?",
|
||||
"Potvrzení smazání",
|
||||
"Potvrzeni smazani",
|
||||
MessageBoxButton.YesNo,
|
||||
MessageBoxImage.Question);
|
||||
|
||||
@@ -117,5 +117,16 @@ namespace dealer
|
||||
this.VehiclesListView.ItemsSource = this.dataManager.GetAllVehicles();
|
||||
}
|
||||
}
|
||||
|
||||
private void OwnersButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var ownersWindow = new OwnersWindow(this.dataManager);
|
||||
ownersWindow.Owner = this;
|
||||
ownersWindow.ShowDialog();
|
||||
|
||||
// Refresh vehicles list to update owner references
|
||||
this.VehiclesListView.ItemsSource = null;
|
||||
this.VehiclesListView.ItemsSource = this.dataManager.GetAllVehicles();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user