diff --git a/FoodOrders/FoodOrders/FormMain.cs b/FoodOrders/FoodOrders/FormMain.cs index 4be8b38..3b9cc74 100644 --- a/FoodOrders/FoodOrders/FormMain.cs +++ b/FoodOrders/FoodOrders/FormMain.cs @@ -152,7 +152,7 @@ namespace FoodOrdersView using var dialog = new SaveFileDialog { Filter = "docx|*.docx" }; if (dialog.ShowDialog() == DialogResult.OK) { - _reportLogic.SaveComponentsToWordFile(new ReportBindingModel { FileName = dialog.FileName }); + _logicR.SaveComponentsToWordFile(new ReportBindingModel { FileName = dialog.FileName }); MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information); } } diff --git a/FoodOrders/FoodOrdersBusinessLogic/BusinessLogics/ReportLogic.cs b/FoodOrders/FoodOrdersBusinessLogic/BusinessLogics/ReportLogic.cs index 3a07572..8417e2c 100644 --- a/FoodOrders/FoodOrdersBusinessLogic/BusinessLogics/ReportLogic.cs +++ b/FoodOrders/FoodOrdersBusinessLogic/BusinessLogics/ReportLogic.cs @@ -1,5 +1,8 @@ using FoodOrdersBusinessLogic.OfficePackage; using FoodOrdersBusinessLogic.OfficePackage.HelperModels; +using FoodOrdersBusinessLogic.OfficePackage.HelperModels.Excel; +using FoodOrdersBusinessLogic.OfficePackage.HelperModels.Pdf; +using FoodOrdersBusinessLogic.OfficePackage.HelperModels.Word; using FoodOrdersContracts.BindingModels; using FoodOrdersContracts.BusinessLogicsContracts; using FoodOrdersContracts.SearchModels; diff --git a/FoodOrders/FoodOrdersBusinessLogic/OfficePackage/AbstractSaveToWord.cs b/FoodOrders/FoodOrdersBusinessLogic/OfficePackage/AbstractSaveToWord.cs index 50d1c05..ff00204 100644 --- a/FoodOrders/FoodOrdersBusinessLogic/OfficePackage/AbstractSaveToWord.cs +++ b/FoodOrders/FoodOrdersBusinessLogic/OfficePackage/AbstractSaveToWord.cs @@ -23,7 +23,7 @@ namespace FoodOrdersBusinessLogic.OfficePackage { CreateParagraph(new WordParagraph { - Texts = new List<(string, WordTextProperties)> { (dish.DishName, new WordTextProperties { Size = "24" }) }, + Texts = new List<(string, WordTextProperties)> { (dish.DishName + " ", new WordTextProperties { Bold = true, Size = "24" }), (dish.Price.ToString(), new WordTextProperties { Size = "24" }) }, TextProperties = new WordTextProperties { Size = "24", diff --git a/FoodOrders/FoodOrdersFileImplement/Implements/OrderStorage.cs b/FoodOrders/FoodOrdersFileImplement/Implements/OrderStorage.cs index 2b2d218..edb9b87 100644 --- a/FoodOrders/FoodOrdersFileImplement/Implements/OrderStorage.cs +++ b/FoodOrders/FoodOrdersFileImplement/Implements/OrderStorage.cs @@ -23,7 +23,8 @@ namespace FoodOrdersFileImplement.Implements { if (!model.Id.HasValue && model.DateFrom.HasValue && model.DateTo.HasValue) { - return _source.Orders.Where(x => x.DateCreate >= model.DateFrom && x.DateCreate <= model.DateTo) + return _source.Orders + .Where(x => x.DateCreate >= model.DateFrom && x.DateCreate <= model.DateTo) .Select(x => GetViewModel(x)) .ToList(); } diff --git a/FoodOrders/FoodOrdersListImplement/Implements/OrderStorage.cs b/FoodOrders/FoodOrdersListImplement/Implements/OrderStorage.cs index 4566b8b..736be23 100644 --- a/FoodOrders/FoodOrdersListImplement/Implements/OrderStorage.cs +++ b/FoodOrders/FoodOrdersListImplement/Implements/OrderStorage.cs @@ -32,9 +32,14 @@ namespace FoodOrdersListImplement.Implements var result = new List(); if (!model.Id.HasValue && model.DateFrom.HasValue && model.DateTo.HasValue) { - return _source.Orders.Where(x => x.DateCreate >= model.DateFrom && x.DateCreate <= model.DateTo) - .Select(x => GetViewModel(x)) - .ToList(); + foreach (var order in _source.Orders) + { + if (order.DateCreate >= model.DateFrom && order.DateCreate <= model.DateTo) + { + result.Add(GetViewModel(order)); + } + } + return result; } foreach (var order in _source.Orders) {