пофиксила

балдеж
This commit is contained in:
VictoriaPresnyakova 2023-05-05 15:51:49 +04:00
parent 3609582418
commit 3b98ee933a
2 changed files with 2 additions and 1 deletions

View File

@ -207,7 +207,7 @@ namespace TransportGuide
Id = _id ?? 0,
Name = textBoxName.Text,
IP = textBoxIP.Text,
TransportTypeId = comboBoxTransportType.SelectedIndex,
TransportTypeId = comboBoxTransportType.SelectedIndex + 1,
StopRoutes = _RouteStops
};
var operationResult = _id.HasValue ? _logic.Update(model) :

View File

@ -53,6 +53,7 @@ namespace TransportGuideDatabaseImplements.Models
Id = model.Id,
Name = model.Name,
IP = model.IP,
TransportTypeId = model.TransportTypeId,
Stops = model.StopRoutes.Select(x => new StopRoute
{
Stop = context.Stops.First(y => y.Id == x.Key),