lab-6 some minor fixes

This commit is contained in:
Zakharov_Rostislav 2024-04-22 21:26:39 +04:00
parent 05ac38f5f9
commit 6b0de7b41d
2 changed files with 6 additions and 6 deletions

View File

@ -88,11 +88,11 @@ namespace BlacksmithWorkshopFileImplement.Implements
}
public OrderViewModel? AccessStorage(OrderViewModel model)
{
var iceCream = source.Manufactures.FirstOrDefault(x => x.Id == model.Id);
var manufacture = source.Manufactures.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);
if (iceCream != null)
model.ManufactureName = iceCream.ManufactureName;
if (manufacture != null)
model.ManufactureName = manufacture.ManufactureName;
if (client != null)
model.ClientFIO = client.ClientFIO;
if (implementer != null)

View File

@ -108,11 +108,11 @@ namespace BlacksmithWorkshopListImplement.Implements
{
if (model == null)
return null;
var iceCream = _source.Manufactures.FirstOrDefault(x => x.Id == model.Id);
var manufacture = _source.Manufactures.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);
if (iceCream != null)
model.ManufactureName = iceCream.ManufactureName;
if (manufacture != null)
model.ManufactureName = manufacture.ManufactureName;
if (client != null)
model.ClientFIO = client.ClientFIO;
if (implementer != null)