Eliseev E.E. LabWork04_Hard #9

Closed
ElEgEv wants to merge 43 commits from LabWork04_Hard into LabWork03_Hard
11 changed files with 192 additions and 1 deletions
Showing only changes of commit 4aade8f845 - Show all commits

View File

@ -14,4 +14,9 @@
<ProjectReference Include="..\BlacksmithWorkshopContracts\BlacksmithWorkshopContracts.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="OfficePackage\HelperModels\" />
<Folder Include="OfficePackage\Implements\" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BlacksmithWorkshopBusinessLogic.OfficePackage.HelperEnums
{
public enum ExcelStyleInfoType
{
Title,
Text,
TextWithBorder
}
}

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BlacksmithWorkshopBusinessLogic.OfficePackage.HelperEnums
{
public enum PdfParagraphAlignmentType
{
Center,
Left,
Rigth
}
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BlacksmithWorkshopBusinessLogic.OfficePackage.HelperEnums
{
public enum WordJustificationType
{
Center,
Both
}
}

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BlacksmithWorkshopContracts.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,43 @@
using BlacksmithWorkshopContracts.BindingModels;
using BlacksmithWorkshopContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BlacksmithWorkshopContracts.BusinessLogicsContracts
{
public interface IReportLogic
{
//Получение списка добавок с указанием, в каких мороженых используются
List<ReportManufactureWorkPieceViewModel> GetIceCreamAdditive();
//Получение списка мороженых с указанием, в каких магазинах в наличии
List<ReportShopManufacturesViewModel> GetShopIceCreams();
//Получение списка заказов за определенный период
List<ReportOrdersViewModel> GetOrders(ReportBindingModel model);
//Получение списка заказов за весь период
List<ReportGroupedOrdersViewModel> GetGroupedOrders();
//Сохранение добавок в файл-Word
void SaveIceCreamsToWordFile(ReportBindingModel model);
//Сохранение магазинов в виде таблицы в файл-Word
void SaveShopsToWordFile(ReportBindingModel model);
//Сохранение добавок с указаеним мороженых в файл-Excel
void SaveIceCreamAdditiveToExcelFile(ReportBindingModel model);
//Сохранение магазинов с указанием мороженых в файл-Excel
void SaveShopIceCreamsToExcelFile(ReportBindingModel model);
//Сохранение заказов в файл-Pdf
void SaveOrdersToPdfFile(ReportBindingModel model);
//Сохранение заказов за весь период в файл-Pdf
void SaveGroupedOrdersToPdfFile(ReportBindingModel model);
}
}

View File

@ -11,6 +11,10 @@ namespace BlacksmithWorkshopContracts.SearchModels
{
//для поиска по идентификатору
public int? Id { get; set; }
}
public DateTime? DateFrom { get; set; }
public DateTime? DateTo { get; set; }
}
}

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BlacksmithWorkshopContracts.ViewModels
{
public class ReportGroupedOrdersViewModel
{
public DateTime DateCreate { get; set; }
public int Count { get; set; }
public double Sum { get; set; }
}
}

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BlacksmithWorkshopContracts.ViewModels
{
public class ReportManufactureWorkPieceViewModel
{
public string ManufactureName { get; set; } = string.Empty;
public int TotalCount { get; set; }
public List<(string WorkPiece, int Count)> WorkPieces { get; set; } = new();
}
}

View File

@ -0,0 +1,22 @@
using BlacksmithWorkshopDataModels.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BlacksmithWorkshopContracts.ViewModels
{
public class ReportOrdersViewModel
{
public int Id { get; set; }
public DateTime DateCreate { get; set; }
public string ManufactureName { get; set; } = string.Empty;
public double Sum { get; set; }
public string OrderStatus { get; set; }
}
}

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BlacksmithWorkshopContracts.ViewModels
{
public class ReportShopManufacturesViewModel
{
public string ShopName { get; set; } = string.Empty;
public int TotalCount { get; set; }
public List<(string Manufacture, int Count)> Manufactures { get; set; } = new();
}
}