Add clanker code

This commit is contained in:
2026-02-17 15:33:05 +01:00
parent ced3cbfe6e
commit 9874f78329
24 changed files with 1884 additions and 31 deletions

View File

@@ -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();
}
}
}