feat: GUID

This commit is contained in:
2026-03-02 14:23:15 +01:00
parent f6b70fa387
commit 48be020dc4
7 changed files with 158 additions and 44 deletions

View File

@@ -21,7 +21,7 @@ namespace CarManagerV3
nudPrice.Value = car.Price;
tbxAge.Text = car.AgeString;
pbxCarImage.Image = ImageManager.GetImage(car);
if (car.Id == 0)
if (car.Id == "0")
{
lblID.Text = "New Car";
}
@@ -125,7 +125,7 @@ namespace CarManagerV3
msgbox.Show();
await Task.Run(() =>
{
if(car.Id == 0) {
if(car.Id == "0") {
car = StateManager.CreateCar(car.Make, car.Model, car.Year, car.Color, car.Mileage, car.Price);
}
else {
@@ -145,7 +145,7 @@ namespace CarManagerV3
private void btnDelete_Click(object sender, EventArgs e)
{
if(car.Id == 0)
if(car.Id == "0")
{
//just close form if car is not saved yet
this.Close();