эххх
This commit is contained in:
parent
7b725a5d74
commit
c4a17d6300
@ -38,7 +38,7 @@ namespace SushiBarBusinessLogic.OfficePackage
|
||||
{
|
||||
Text = $"Итого: {info.Orders.Sum(x => x.Sum)}\t",
|
||||
Style = "Normal",
|
||||
ParagraphAlignment = PdfParagraphAlignmentType.Rigth
|
||||
ParagraphAlignment = PdfParagraphAlignmentType.Right
|
||||
});
|
||||
SavePdf(info);
|
||||
}
|
||||
|
@ -4,6 +4,6 @@
|
||||
{
|
||||
Center,
|
||||
Left,
|
||||
Rigth
|
||||
Right
|
||||
}
|
||||
}
|
@ -16,7 +16,7 @@ namespace SushiBarBusinessLogic.OfficePackage.Implements
|
||||
{
|
||||
PdfParagraphAlignmentType.Center => ParagraphAlignment.Center,
|
||||
PdfParagraphAlignmentType.Left => ParagraphAlignment.Left,
|
||||
PdfParagraphAlignmentType.Rigth => ParagraphAlignment.Right,
|
||||
PdfParagraphAlignmentType.Right => ParagraphAlignment.Right,
|
||||
_ => ParagraphAlignment.Justify,
|
||||
};
|
||||
}
|
||||
@ -27,7 +27,7 @@ namespace SushiBarBusinessLogic.OfficePackage.Implements
|
||||
private static void DefineStyles(Document document)
|
||||
{
|
||||
var style = document.Styles["Normal"];
|
||||
style.Font.Name = "Times New Roman";
|
||||
style.Font.Name = "Arial";
|
||||
style.Font.Size = 14;
|
||||
style = document.Styles.AddStyle("NormalTitle", "Normal");
|
||||
style.Font.Bold = true;
|
||||
|
@ -18,8 +18,11 @@ namespace SushiBarDatabaseImplement.Implements
|
||||
public List<OrderViewModel> GetFilteredList(OrderSearchModel model)
|
||||
{
|
||||
using var context = new SushiBarDatabase();
|
||||
var result = context.Orders.Include(x => x.Sushi).Select(x => x.GetViewModel).ToList();
|
||||
return result;
|
||||
if (model.DateFrom.HasValue)
|
||||
{
|
||||
return context.Orders.Include(x => x.Sushi).Where(x => x.DateCreate >= model.DateFrom && x.DateCreate <= model.DateTo).Select(x => x.GetViewModel).ToList();
|
||||
}
|
||||
return context.Orders.Include(x => x.Sushi).Where(x => x.Id == model.Id).Select(x => x.GetViewModel).ToList();
|
||||
}
|
||||
|
||||
public OrderViewModel? GetElement(OrderSearchModel model)
|
||||
|
Loading…
Reference in New Issue
Block a user