Классы и интерфейс для отчета

This commit is contained in:
pgirl1 2023-02-27 09:36:43 +04:00 committed by prodigygirl
parent 680a4d0877
commit 64e59de7e9
4 changed files with 65 additions and 0 deletions

View File

@ -0,0 +1,9 @@
namespace FurnitureAssemblyContracts.BindingModels
{
public class ReportBindingModel
{
public string FileName { get; set; } = string.Empty;
public DateTime? DateFrom { get; set; }
public DateTime? DateTo { get; set; }
}
}

View File

@ -0,0 +1,35 @@
using FurnitureAssemblyContracts.BindingModels;
using FurnitureAssemblyContracts.ViewModels;
namespace FurnitureAssemblyContracts.BusinessLogicsContarcts
{
public interface IReportLogic
{
/// <summary>
/// Получение списка компонент с указанием, в каких изделиях используются
/// </summary>
/// <returns></returns>
List<ReportFurnitureComponentViewModel> GetProductComponent();
/// <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 SaveProductComponentToExcelFile(ReportBindingModel model);
/// <summary>
/// Сохранение заказов в файл-Pdf
/// </summary>
/// <param name="model"></param>
void SaveOrdersToPdfFile(ReportBindingModel model);
}
}

View File

@ -0,0 +1,10 @@
namespace FurnitureAssemblyContracts.ViewModels
{
public class ReportFurnitureComponentViewModel
{
public string ComponentName { get; set; } = string.Empty;
public int TotalCount { get; set; }
public List<Tuple<string, int>> Furnitures { get; set; } = new();
}
}

View File

@ -0,0 +1,11 @@
namespace FurnitureAssemblyContracts.ViewModels
{
public class ReportOrdersViewModel
{
public int Id { get; set; }
public DateTime DateCreate { get; set; }
public string FurnitureName { get; set; } = string.Empty;
public double Sum { get; set; }
}
}