Арбайтен

This commit is contained in:
Artyom_Yashin 2024-05-07 23:26:49 +04:00
parent b16989c2cc
commit d2982a5d5f
3 changed files with 4 additions and 4 deletions

View File

@ -201,8 +201,7 @@ namespace ComputersShop
private void запускРаботToolStripMenuItem_Click(object sender, EventArgs e)
{
_workProcess.DoWork((Program.ServiceProvider?.GetService(typeof(IImplementerLogic
)) as IImplementerLogic)!, _orderLogic);
_workProcess.DoWork((Program.ServiceProvider?.GetService(typeof(IImplementerLogic)) as IImplementerLogic)!, _orderLogic);
MessageBox.Show("Процесс обработки запущен", "Сообщение",
MessageBoxButtons.OK, MessageBoxIcon.Information);

View File

@ -139,7 +139,7 @@ namespace ComputersShopBusinessLogic.BusinessLogics
_logger.LogWarning("Read operation failed");
return false;
}
if (element.Status != status - 1 || element.Status == OrderStatus.Готов)
if (!(element.Status == status - 1 || element.Status == OrderStatus.Готов))
{
_logger.LogWarning("Status change operation failed");
throw new InvalidOperationException("Текущий статус заказа не может быть переведен в выбранный");

View File

@ -29,7 +29,8 @@ namespace ComputersShopDatabaseImplement.Implements
(!model.Id.HasValue || x.Id == model.Id) &&
(!model.DateFrom.HasValue || x.DateCreate >= model.DateFrom) &&
(!model.DateTo.HasValue || x.DateCreate <= model.DateTo) &&
(!model.ClientId.HasValue || x.ClientId == model.ClientId)
(!model.ClientId.HasValue || x.ClientId == model.ClientId) &&
(!model.Status.HasValue || x.Status == model.Status)
)
)
.Select(x => x.GetViewModel)