Merge branch 'Lab1_Base' into Lab1_Hard
This commit is contained in:
commit
2cb3292cf8
@ -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;
|
||||
return SetOrderStatus(model, OrderStatus.Готов);
|
||||
}
|
||||
|
||||
public List<OrderViewModel>? 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");
|
||||
|
Loading…
Reference in New Issue
Block a user