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

61 lines
1.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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();
}
}
}