parent
2419c6fc25
commit
baf4bfba6d
@ -80,15 +80,8 @@ namespace ComputersShopBusinessLogic.BusinessLogic
|
||||
{
|
||||
model.ImplementerId = element.ImplementerId;
|
||||
}
|
||||
CheckModel(model);
|
||||
var result = _orderStorage.Update(model);
|
||||
if (result == null)
|
||||
{
|
||||
model.Status--;
|
||||
_logger.LogWarning("Update operation failed");
|
||||
return false;
|
||||
}
|
||||
SendOrderStatusMail(result.ClientId, $"DNS, Заказ №{result.Id}", $"Заказ №{model.Id} изменен статус на {result.Status}");
|
||||
if (model.Status == OrderStatus.Выдан) model.DateImplement = DateTime.Now;
|
||||
_orderStorage.Update(model);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user