This commit is contained in:
Yunusov_Niyaz 2024-05-07 22:57:55 +04:00
parent 90c855661f
commit e0707a69e3

View File

@ -82,14 +82,6 @@ namespace CarRepairShopFileImplement.Implements
}
public OrderViewModel AccessStorage(OrderViewModel model)
{
if (model == null)
return null;
var repair = source.Repairs.FirstOrDefault(x => (x.Id == model.RepairId));
if (repair == null)
return model;
model.RepairName = repair.RepairName;
return model;
}
var repair = source.Repairs.FirstOrDefault(x => x.Id == model.Id);
var client = source.Clients.FirstOrDefault(x => x.Id == model.Id);
var implementer = source.Implementers.FirstOrDefault(x => x.Id == model.ImplementerId);
@ -101,15 +93,5 @@ namespace CarRepairShopFileImplement.Implements
model.ImplementerFIO = implementer.ImplementerFIO;
return model;
}
public OrderViewModel AccessClientStorage(OrderViewModel model)
{
if (model == null)
return null;
var client = source.Clients.FirstOrDefault(x => x.Id == model.Id);
if (client != null)
model.ClientFIO = client.ClientFIO;
return model;
}
}
}