PIbd-21 Lab6 KozyrevSS SewingDresses #19

Closed
Serxionaft wants to merge 10 commits from Lab6 into Lab5Magic
2 changed files with 3 additions and 2 deletions
Showing only changes of commit 6a2ccb3787 - Show all commits

View File

@ -59,7 +59,8 @@ namespace SewingDressesBusinessLogic.BusinessLogic
_logger.LogDebug("DoWork. Worker {Id} finish order { Order}", implement.Id, order.Id);
_orderLogic.FinishOrder(new OrderBindingModel
{
Id = order.Id
Id = order.Id,
ImplementId = implement.Id
});
}
catch (InvalidOperationException ex)

View File

@ -48,7 +48,7 @@ namespace SewingDressesDatabaseImplement.Implements
if (string.IsNullOrEmpty(model.ImplementFIO) && !model.Id.HasValue)
return null;
using var context = new SewingDressesDatabase();
return context.Implements.FirstOrDefault(x => (string.IsNullOrEmpty(model.ImplementFIO) || x.ImplementFIO.Equals(model.ImplementFIO)) && (!model.Id.HasValue && model.Id == x.Id))?.GetViewModel;
return context.Implements.FirstOrDefault(x => (string.IsNullOrEmpty(model.ImplementFIO) || x.ImplementFIO.Equals(model.ImplementFIO)) && (!model.Id.HasValue || model.Id == x.Id))?.GetViewModel;
}
public List<ImplementViewModel> GetFullList()
{