From 2a951510ab600168d736ff825cb015da79b71b26 Mon Sep 17 00:00:00 2001 From: prodigygirl Date: Fri, 21 Apr 2023 15:07:57 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B2=D0=B0=D0=B6=D0=BD=D0=BE=D0=B5=20=D0=B8?= =?UTF-8?q?=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FurnitureAssemblyBusinessLogic/OrderLogic.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/FurnitureAssembly/FurnitureAssemblyBusinessLogic/OrderLogic.cs b/FurnitureAssembly/FurnitureAssemblyBusinessLogic/OrderLogic.cs index cb95d28..36b3f18 100644 --- a/FurnitureAssembly/FurnitureAssemblyBusinessLogic/OrderLogic.cs +++ b/FurnitureAssembly/FurnitureAssemblyBusinessLogic/OrderLogic.cs @@ -41,7 +41,7 @@ namespace FurnitureAssemblyBusinessLogic if (!ChangeStatus(model, OrderStatus.Принят)) { _logger.LogWarning("Order's status is wrong"); - return false; + throw new InvalidOperationException("Order's status is wrong"); } if (_orderStorage.Insert(model) == null) @@ -64,7 +64,7 @@ namespace FurnitureAssemblyBusinessLogic if (!ChangeStatus(model, OrderStatus.Выполняется)) { _logger.LogWarning("Order's status is wrong"); - return false; + throw new InvalidOperationException("Order's status is wrong"); } _orderStorage.Update(model); return true; @@ -81,7 +81,7 @@ namespace FurnitureAssemblyBusinessLogic if (!ChangeStatus(model, OrderStatus.Готов)) { _logger.LogWarning("Order's status is wrong"); - return false; + throw new InvalidOperationException("Order's status is wrong"); } model.DateImplement = DateTime.Now; _orderStorage.Update(model);