Merge
This commit is contained in:
parent
90c855661f
commit
e0707a69e3
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user