ПИбд-23 Захаров Ростислав Андреевич Лабораторная работа №6 усложненная #19

Closed
Zakharov_Rostislav wants to merge 16 commits from lab-6-hard into lab-5-hard
2 changed files with 6 additions and 6 deletions
Showing only changes of commit 6b0de7b41d - Show all commits

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)