PIbd-22_Tsukanova_I.V._IceC.../IceCreamShop/IceCreamBusinessLogic/BusinessLogics/OrderLogic.cs

61 lines
1.6 KiB
C#
Raw Normal View History

2023-01-30 11:43:43 +04:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using IceCreamShopContracts.BindingModels;
using IceCreamShopContracts.BusinessLogicsContracts;
using IceCreamShopContracts.SearchModels;
using IceCreamShopContracts.StoragesContracts;
using IceCreamShopContracts.ViewModels;
using AbstractIceCreamShopDataModels.Enums;
namespace IceCreamBusinessLogic.BusinessLogics
{
internal class OrderLogic : IOrderLogic
{
private readonly IOrderStorage _orderStorage;
public OrderLogic(IOrderStorage orderStorage)
{
_orderStorage = orderStorage;
}
public bool CreateOrder(OrderBindingModel model)
{
_orderStorage.Insert(new OrderBindingModel
{
IceCreamId = model.IceCreamId,
Count = model.Count,
Sum = model.Sum,
Status = OrderStatus.Принят,
DateCreate = DateTime.Now,
DateImplement = model.DateImplement
});
}
public bool DeliveryOrder(OrderBindingModel model)
{
throw new NotImplementedException();
}
public bool FinishOrder(OrderBindingModel model)
{
throw new NotImplementedException();
}
public List<OrderViewModel>? ReadList(OrderSearchModel? model)
{
throw new NotImplementedException();
}
public bool TakeOrderInWork(OrderBindingModel model)
{
throw new NotImplementedException();
}
}
}