попытки все исправить силы на исходе
This commit is contained in:
parent
f45e4cfaee
commit
7cb45bfe43
@ -16,8 +16,7 @@ namespace SushiBarBusinessLogic.OfficePackage
|
||||
CreateParagraph(new PdfParagraph
|
||||
{
|
||||
Text = info.Title,
|
||||
Style =
|
||||
"NormalTitle",
|
||||
Style = "NormalTitle",
|
||||
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
||||
});
|
||||
CreateParagraph(new PdfParagraph
|
||||
@ -36,10 +35,7 @@ namespace SushiBarBusinessLogic.OfficePackage
|
||||
{
|
||||
CreateRow(new PdfRowParameters
|
||||
{
|
||||
Texts = new List<string> { order.Id.ToString(),
|
||||
order.DateCreate.ToShortDateString(),
|
||||
order.SushiName,
|
||||
order.Sum.ToString() },
|
||||
Texts = new List<string> { order.Id.ToString(), order.DateCreate.ToShortDateString(), order.SushiName, order.Sum.ToString() },
|
||||
Style = "Normal",
|
||||
ParagraphAlignment = PdfParagraphAlignmentType.Left
|
||||
});
|
||||
|
@ -6,7 +6,7 @@ namespace SushiBarBusinessLogic.OfficePackage.HelperModels
|
||||
{
|
||||
public string FileName { get; set; } = string.Empty;
|
||||
public string Title { get; set; } = string.Empty;
|
||||
public List<ReportSushisComponentViewModel> SushiComponents
|
||||
public List<ReportSushiComponentViewModel> SushiComponents
|
||||
{
|
||||
get;
|
||||
set;
|
||||
|
@ -11,7 +11,8 @@ namespace SushiBarBusinessLogic.OfficePackage.Implements
|
||||
private Document? _document;
|
||||
private Section? _section;
|
||||
private Table? _table;
|
||||
private static ParagraphAlignment GetParagraphAlignment(PdfParagraphAlignmentType type)
|
||||
private static ParagraphAlignment
|
||||
GetParagraphAlignment(PdfParagraphAlignmentType type)
|
||||
{
|
||||
return type switch
|
||||
{
|
||||
@ -85,6 +86,7 @@ namespace SushiBarBusinessLogic.OfficePackage.Implements
|
||||
row.Cells[i].VerticalAlignment = VerticalAlignment.Center;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void SavePdf(PdfInfo info)
|
||||
{
|
||||
if (_document != null)
|
||||
|
@ -23,6 +23,7 @@ namespace SushiBarBusinessLogic
|
||||
_sushiStorage = sushiStorage;
|
||||
_componentStorage = componentStorage;
|
||||
_orderStorage = orderStorage;
|
||||
|
||||
_saveToExcel = saveToExcel;
|
||||
_saveToWord = saveToWord;
|
||||
_saveToPdf = saveToPdf;
|
||||
@ -31,14 +32,14 @@ namespace SushiBarBusinessLogic
|
||||
/// Получение списка компонент с указанием, в каких изделиях используются
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<ReportSushisComponentViewModel> GetSushiComponent()
|
||||
public List<ReportSushiComponentViewModel> GetSushiComponent()
|
||||
{
|
||||
var components = _componentStorage.GetFullList();
|
||||
var sushis = _sushiStorage.GetFullList();
|
||||
var list = new List<ReportSushisComponentViewModel>();
|
||||
var list = new List<ReportSushiComponentViewModel>();
|
||||
foreach (var component in components)
|
||||
{
|
||||
var record = new ReportSushisComponentViewModel
|
||||
var record = new ReportSushiComponentViewModel
|
||||
{
|
||||
ComponentName = component.ComponentName,
|
||||
Sushis = new List<Tuple<string, int>>(),
|
||||
|
@ -9,7 +9,7 @@ namespace SushiBarContracts.BusinessLogicsContracts
|
||||
/// Получение списка компонент с указанием, в каких изделиях используются
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
List<ReportSushisComponentViewModel> GetSushiComponent();
|
||||
List<ReportSushiComponentViewModel> GetSushiComponent();
|
||||
/// <summary>
|
||||
/// Получение списка заказов за определенный период
|
||||
/// </summary>
|
||||
|
@ -1,6 +1,6 @@
|
||||
namespace SushiBarContracts.ViewModels
|
||||
{
|
||||
public class ReportSushisComponentViewModel
|
||||
public class ReportSushiComponentViewModel
|
||||
{
|
||||
public string ComponentName { get; set; } = string.Empty;
|
||||
public int TotalCount { get; set; }
|
||||
|
Loading…
Reference in New Issue
Block a user