diff --git a/ConfectionaryBusinessLogic/OrderLogic.cs b/ConfectionaryBusinessLogic/OrderLogic.cs index 441332b..1471185 100644 --- a/ConfectionaryBusinessLogic/OrderLogic.cs +++ b/ConfectionaryBusinessLogic/OrderLogic.cs @@ -41,10 +41,8 @@ namespace ConfectioneryBusinessLogic.BusinessLogics public bool DeliveryOrder(OrderBindingModel model) => SetOrderStatus(model, OrderStatus.Выдан); public bool FinishOrder(OrderBindingModel model) { - var res = SetOrderStatus(model, OrderStatus.Готов); - if (res) - model.DateImplement = DateTime.Now; - return res; + model.DateImplement = DateTime.Now; + return SetOrderStatus(model, OrderStatus.Готов); } public List? ReadList(OrderSearchModel? model) @@ -99,6 +97,12 @@ namespace ConfectioneryBusinessLogic.BusinessLogics nameof(vmodel)); } model.Status = orderStatus; + model.DateCreate = vmodel.DateCreate; + if (model.DateImplement == null) + model.DateImplement = vmodel.DateImplement; + model.PastryId = vmodel.PastryId; + model.Sum = vmodel.Sum; + model.Count= vmodel.Count; if (_orderStorage.Update(model) == null) { _logger.LogWarning("Update operation failed");