важное исправление
This commit is contained in:
parent
5fc6f569ac
commit
2a951510ab
@ -41,7 +41,7 @@ namespace FurnitureAssemblyBusinessLogic
|
|||||||
if (!ChangeStatus(model, OrderStatus.Принят))
|
if (!ChangeStatus(model, OrderStatus.Принят))
|
||||||
{
|
{
|
||||||
_logger.LogWarning("Order's status is wrong");
|
_logger.LogWarning("Order's status is wrong");
|
||||||
return false;
|
throw new InvalidOperationException("Order's status is wrong");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_orderStorage.Insert(model) == null)
|
if (_orderStorage.Insert(model) == null)
|
||||||
@ -64,7 +64,7 @@ namespace FurnitureAssemblyBusinessLogic
|
|||||||
if (!ChangeStatus(model, OrderStatus.Выполняется))
|
if (!ChangeStatus(model, OrderStatus.Выполняется))
|
||||||
{
|
{
|
||||||
_logger.LogWarning("Order's status is wrong");
|
_logger.LogWarning("Order's status is wrong");
|
||||||
return false;
|
throw new InvalidOperationException("Order's status is wrong");
|
||||||
}
|
}
|
||||||
_orderStorage.Update(model);
|
_orderStorage.Update(model);
|
||||||
return true;
|
return true;
|
||||||
@ -81,7 +81,7 @@ namespace FurnitureAssemblyBusinessLogic
|
|||||||
if (!ChangeStatus(model, OrderStatus.Готов))
|
if (!ChangeStatus(model, OrderStatus.Готов))
|
||||||
{
|
{
|
||||||
_logger.LogWarning("Order's status is wrong");
|
_logger.LogWarning("Order's status is wrong");
|
||||||
return false;
|
throw new InvalidOperationException("Order's status is wrong");
|
||||||
}
|
}
|
||||||
model.DateImplement = DateTime.Now;
|
model.DateImplement = DateTime.Now;
|
||||||
_orderStorage.Update(model);
|
_orderStorage.Update(model);
|
||||||
|
Loading…
Reference in New Issue
Block a user