contracts layer
This commit is contained in:
parent
49e5b6634d
commit
b3db89edd4
@ -0,0 +1,9 @@
|
|||||||
|
namespace PizzeriaContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class ReportBindingModel
|
||||||
|
{
|
||||||
|
public string FileName { get; set; } = string.Empty;
|
||||||
|
public DateTime? DateFrom { get; set; }
|
||||||
|
public DateTime? DateTo { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
using PizzeriaContracts.BindingModels;
|
||||||
|
using PizzeriaContracts.ViewModels;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
namespace PizzeriaContracts.BusinessLogicsContracts
|
||||||
|
{
|
||||||
|
public interface IReportLogic
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Получение списка компонент с указанием, в каких изделиях используются
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
List<ReportPizzaComponentViewModel> GetPizzaComponent();
|
||||||
|
/// <summary>
|
||||||
|
/// Получение списка заказов за определенный период
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="model"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
List<ReportOrdersViewModel> GetOrders(ReportBindingModel model);
|
||||||
|
/// <summary>
|
||||||
|
/// Сохранение компонент в файл-Word
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="model"></param>
|
||||||
|
void SaveComponentsToWordFile(ReportBindingModel model);
|
||||||
|
/// <summary>
|
||||||
|
/// Сохранение компонент с указаеним продуктов в файл-Excel
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="model"></param>
|
||||||
|
void SavePizzaComponentToExcelFile(ReportBindingModel model);
|
||||||
|
/// <summary>
|
||||||
|
/// Сохранение заказов в файл-Pdf
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="model"></param>
|
||||||
|
void SaveOrdersToPdfFile(ReportBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
@ -9,5 +9,7 @@ namespace PizzeriaContracts.SearchModels
|
|||||||
public class OrderSearchModel
|
public class OrderSearchModel
|
||||||
{
|
{
|
||||||
public int? Id { get; set; }
|
public int? Id { get; set; }
|
||||||
|
public DateTime? DateFrom { get; set; }
|
||||||
|
public DateTime? DateTo { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,10 @@
|
|||||||
|
namespace PizzeriaContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class ReportOrdersViewModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public DateTime DateCreate { get; set; }
|
||||||
|
public string PizzaName { get; set; } = string.Empty;
|
||||||
|
public double Sum { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
namespace PizzeriaContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class ReportPizzaComponentViewModel
|
||||||
|
{
|
||||||
|
public string ComponentName { get; set; } = string.Empty;
|
||||||
|
public int TotalCount { get; set; }
|
||||||
|
public List<Tuple<string, int>> Pizzas { get; set; } = new();
|
||||||
|
}
|
||||||
|
}
|
12
Pizzeria/PizzeriaContracts/ViewModels/WordInfo.cs
Normal file
12
Pizzeria/PizzeriaContracts/ViewModels/WordInfo.cs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace PizzeriaContracts.ViewModels
|
||||||
|
{
|
||||||
|
internal class WordInfo
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user