Добавлен статус заказа в отчете (форма и pdf)
This commit is contained in:
parent
206b8fbcbe
commit
3bba334dbb
@ -24,10 +24,10 @@ namespace FurnitureAssemblyBusinessLogic.OfficePackage
|
|||||||
Text = $"с { info.DateFrom.ToShortDateString() } по { info.DateTo.ToShortDateString() }", Style = "Normal",
|
Text = $"с { info.DateFrom.ToShortDateString() } по { info.DateTo.ToShortDateString() }", Style = "Normal",
|
||||||
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
||||||
});
|
});
|
||||||
CreateTable(new List<string> { "2cm", "3cm", "6cm", "3cm" });
|
CreateTable(new List<string> { "2cm", "3cm", "6cm", "3cm", "3cm" });
|
||||||
CreateRow(new PdfRowParameters
|
CreateRow(new PdfRowParameters
|
||||||
{
|
{
|
||||||
Texts = new List<string> { "Номер", "Дата заказа", "Изделие", "Сумма" },
|
Texts = new List<string> { "Номер", "Дата заказа", "Изделие", "Статус", "Сумма" },
|
||||||
Style = "NormalTitle",
|
Style = "NormalTitle",
|
||||||
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
||||||
});
|
});
|
||||||
@ -35,7 +35,7 @@ namespace FurnitureAssemblyBusinessLogic.OfficePackage
|
|||||||
{
|
{
|
||||||
CreateRow(new PdfRowParameters
|
CreateRow(new PdfRowParameters
|
||||||
{
|
{
|
||||||
Texts = new List<string> { order.Id.ToString(), order.DateCreate.ToShortDateString(), order.FurnitureName, order.Sum.ToString() },
|
Texts = new List<string> { order.Id.ToString(), order.DateCreate.ToShortDateString(), order.FurnitureName, order.OrderStatus, order.Sum.ToString() },
|
||||||
Style = "Normal",
|
Style = "Normal",
|
||||||
ParagraphAlignment = PdfParagraphAlignmentType.Left
|
ParagraphAlignment = PdfParagraphAlignmentType.Left
|
||||||
});
|
});
|
||||||
|
@ -21,10 +21,8 @@ namespace FurnitureAssemblyBusinessLogic
|
|||||||
private readonly AbstractSaveToExcel _saveToExcel;
|
private readonly AbstractSaveToExcel _saveToExcel;
|
||||||
private readonly AbstractSaveToWord _saveToWord;
|
private readonly AbstractSaveToWord _saveToWord;
|
||||||
private readonly AbstractSaveToPdf _saveToPdf;
|
private readonly AbstractSaveToPdf _saveToPdf;
|
||||||
public ReportLogic(IFurnitureStorage productStorage, IComponentStorage
|
public ReportLogic(IFurnitureStorage productStorage, IComponentStorage componentStorage, IOrderStorage orderStorage,
|
||||||
componentStorage, IOrderStorage orderStorage,
|
AbstractSaveToExcel saveToExcel, AbstractSaveToWord saveToWord, AbstractSaveToPdf saveToPdf)
|
||||||
AbstractSaveToExcel saveToExcel, AbstractSaveToWord saveToWord,
|
|
||||||
AbstractSaveToPdf saveToPdf)
|
|
||||||
{
|
{
|
||||||
_productStorage = productStorage;
|
_productStorage = productStorage;
|
||||||
_componentStorage = componentStorage;
|
_componentStorage = componentStorage;
|
||||||
@ -71,8 +69,7 @@ namespace FurnitureAssemblyBusinessLogic
|
|||||||
{
|
{
|
||||||
return _orderStorage.GetFilteredList(new OrderSearchModel
|
return _orderStorage.GetFilteredList(new OrderSearchModel
|
||||||
{
|
{
|
||||||
DateFrom
|
DateFrom = model.DateFrom,
|
||||||
= model.DateFrom,
|
|
||||||
DateTo = model.DateTo
|
DateTo = model.DateTo
|
||||||
})
|
})
|
||||||
.Select(x => new ReportOrdersViewModel
|
.Select(x => new ReportOrdersViewModel
|
||||||
@ -80,7 +77,8 @@ namespace FurnitureAssemblyBusinessLogic
|
|||||||
Id = x.Id,
|
Id = x.Id,
|
||||||
DateCreate = x.DateCreate,
|
DateCreate = x.DateCreate,
|
||||||
FurnitureName = x.FurnitureName,
|
FurnitureName = x.FurnitureName,
|
||||||
Sum = x.Sum
|
Sum = x.Sum,
|
||||||
|
OrderStatus = x.Status.ToString()
|
||||||
})
|
})
|
||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
namespace FurnitureAssemblyContracts.ViewModels
|
using FurnitureAssemblyDataModels.Enums;
|
||||||
|
|
||||||
|
namespace FurnitureAssemblyContracts.ViewModels
|
||||||
{
|
{
|
||||||
public class ReportOrdersViewModel
|
public class ReportOrdersViewModel
|
||||||
{
|
{
|
||||||
@ -6,6 +8,6 @@
|
|||||||
public DateTime DateCreate { get; set; }
|
public DateTime DateCreate { get; set; }
|
||||||
public string FurnitureName { get; set; } = string.Empty;
|
public string FurnitureName { get; set; } = string.Empty;
|
||||||
public double Sum { get; set; }
|
public double Sum { get; set; }
|
||||||
|
public string OrderStatus { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user