Правочки

This commit is contained in:
Табеев Александр 2024-04-29 22:25:39 +04:00
parent e6e1457eef
commit d5f8d5f99b
4 changed files with 10 additions and 0 deletions

View File

@ -18,6 +18,8 @@ namespace ServiceStationContracts.BindingModels
public int ExecutorId { get; set; }
public int? RepairId { get; set; }
public Dictionary<int, ICarModel> DefectCars { get; set; } = new();
}
}

View File

@ -21,6 +21,8 @@ namespace ServiceStationContracts.ViewModels
public int ExecutorId { get; set; }
public int? RepairId { get; set; }
public Dictionary<int, ICarModel> DefectCars { get; set; } = new();
}
}

View File

@ -12,6 +12,7 @@ namespace ServiceStationDataModels.Models
string DefectType { get; }
double DefectPrice { get; }
int ExecutorId { get; }
int? RepairId { get; }
public Dictionary<int, ICarModel> DefectCars { get; }
}
}

View File

@ -66,6 +66,11 @@ namespace ServiceStationDatabaseImplement.Models
public void Update(DefectBindingModel model)
{
if(model == null) return;
if (model.RepairId.HasValue)
{
RepairId = model.RepairId;
return;
}
DefectType = model.DefectType;
DefectPrice = model.DefectPrice;
}