diff --git a/SushiBar/SushiBarBusinessLogic/AbstractSaveToPdf.cs b/SushiBar/SushiBarBusinessLogic/AbstractSaveToPdf.cs index 129065d..b205e48 100644 --- a/SushiBar/SushiBarBusinessLogic/AbstractSaveToPdf.cs +++ b/SushiBar/SushiBarBusinessLogic/AbstractSaveToPdf.cs @@ -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); } diff --git a/SushiBar/SushiBarBusinessLogic/PdfParagraphAlignmentType.cs b/SushiBar/SushiBarBusinessLogic/PdfParagraphAlignmentType.cs index 9a0a40c..2b7c934 100644 --- a/SushiBar/SushiBarBusinessLogic/PdfParagraphAlignmentType.cs +++ b/SushiBar/SushiBarBusinessLogic/PdfParagraphAlignmentType.cs @@ -4,6 +4,6 @@ { Center, Left, - Rigth + Right } } \ No newline at end of file diff --git a/SushiBar/SushiBarBusinessLogic/SaveToPdf.cs b/SushiBar/SushiBarBusinessLogic/SaveToPdf.cs index 2db420e..0061fd5 100644 --- a/SushiBar/SushiBarBusinessLogic/SaveToPdf.cs +++ b/SushiBar/SushiBarBusinessLogic/SaveToPdf.cs @@ -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; diff --git a/SushiBar/SushiBarDatabaseImplement/OrderStorage.cs b/SushiBar/SushiBarDatabaseImplement/OrderStorage.cs index eeee325..1a9feac 100644 --- a/SushiBar/SushiBarDatabaseImplement/OrderStorage.cs +++ b/SushiBar/SushiBarDatabaseImplement/OrderStorage.cs @@ -18,8 +18,11 @@ namespace SushiBarDatabaseImplement.Implements public List 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)