From 9f8ec53755a86b954d5a3d7b9239cbbda89fcef3 Mon Sep 17 00:00:00 2001 From: "ityurner02@mail.ru" Date: Tue, 18 Apr 2023 14:23:13 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B1=D1=80=D0=B0=D0=BB=20=D0=BB=D0=B8?= =?UTF-8?q?=D1=88=D0=BD=D0=B5=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusinessLogic/OrderLogic.cs | 39 ------------------- 1 file changed, 39 deletions(-) diff --git a/PlumbingRepair/PlumbingRepairBusinessLogic/BusinessLogic/OrderLogic.cs b/PlumbingRepair/PlumbingRepairBusinessLogic/BusinessLogic/OrderLogic.cs index 042aed0..bdb6d72 100644 --- a/PlumbingRepair/PlumbingRepairBusinessLogic/BusinessLogic/OrderLogic.cs +++ b/PlumbingRepair/PlumbingRepairBusinessLogic/BusinessLogic/OrderLogic.cs @@ -40,45 +40,6 @@ namespace PlumbingRepairBusinessLogic.BusinessLogic return true; } - - /*public bool StatusUpdate(OrderBindingModel model, OrderStatus newStatus) - { - CheckModel(model, false); - - OrderViewModel? order = _orderStorage.GetElement(new OrderSearchModel - { - Id = model.Id - }); - - if (order == null) - { - _logger.LogWarning("Status update to " + newStatus.ToString() + " operation failed. Order not found."); - return false; - } - - model.Status = order.Status; - if (!model.ImplementerId.HasValue) model.ImplementerId = order.ImplementerId; - - if (model.Status + 1 != newStatus) - { - _logger.LogWarning("Status update to " + newStatus.ToString() + " operation failed. Incorrect Order status."); - return false; - } - - model.Status = newStatus; - - if (newStatus == OrderStatus.Готов) - { - model.DateImplement = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc); - } - - if (_orderStorage.Update(model) == null) - { - _logger.LogWarning("Update operation failed"); - return false; - } - return true; - }*/ public bool StatusUpdate(OrderBindingModel model, OrderStatus newStatus) { var viewModel = _orderStorage.GetElement(new OrderSearchModel { Id = model.Id });