lab-6 some minor fixes
This commit is contained in:
parent
05ac38f5f9
commit
6b0de7b41d
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user