From 9702c9e62448305ab5aa9eb5a2ed8a5b858a96fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=BB=D1=8C=D1=8F=20=D0=A4=D0=B5=D0=B4=D0=BE=D1=82?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Sat, 27 Jul 2024 14:00:54 +0400 Subject: [PATCH] =?UTF-8?q?=C2=AF\=5F(=E3=83=84)=5F/=C2=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusinessLogic/ReportClientLogic.cs | 4 ++-- .../OfficePackage/AbstractSaveToExcelClient.cs | 2 +- .../Implements/OrderStorage.cs | 2 -- .../ElectronicsShopDataBaseImplement/Models/Order.cs | 3 --- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/ElectronicsShop/ElectronicsShopBusinessLogic/BusinessLogic/ReportClientLogic.cs b/ElectronicsShop/ElectronicsShopBusinessLogic/BusinessLogic/ReportClientLogic.cs index f46fc83..0e75c5e 100644 --- a/ElectronicsShop/ElectronicsShopBusinessLogic/BusinessLogic/ReportClientLogic.cs +++ b/ElectronicsShop/ElectronicsShopBusinessLogic/BusinessLogic/ReportClientLogic.cs @@ -114,7 +114,7 @@ namespace ElectronicsShopBusinessLogic.BusinessLogic { var document = _saveToExcel.CreateReport(new ExcelInfoClient { - Title = "Список оплат", + Title = "Список оплат и товаров", PaymeantProducts = GetPaymeantProducts(_clientID) }); return document; @@ -123,7 +123,7 @@ namespace ElectronicsShopBusinessLogic.BusinessLogic public byte[]? SavePaymeantToWordFile(int _clientID) { var document = _saveToWord.CreateDoc(new WordInfoClient { - Title = "Список оплат и товаров", + Title = "Список оплат", ListPaymeant = _paymeantstorage.GetFillteredList(new PaymeantSearchModel { ClientID = _clientID }), }); return document; diff --git a/ElectronicsShop/ElectronicsShopBusinessLogic/OfficePackage/AbstractSaveToExcelClient.cs b/ElectronicsShop/ElectronicsShopBusinessLogic/OfficePackage/AbstractSaveToExcelClient.cs index ab3338c..313a736 100644 --- a/ElectronicsShop/ElectronicsShopBusinessLogic/OfficePackage/AbstractSaveToExcelClient.cs +++ b/ElectronicsShop/ElectronicsShopBusinessLogic/OfficePackage/AbstractSaveToExcelClient.cs @@ -97,4 +97,4 @@ namespace ElectronicsShopBusinessLogic.OfficePackage // Сохранение файла protected abstract byte[]? SaveExcel(ExcelInfoClient info); } -} +} \ No newline at end of file diff --git a/ElectronicsShop/ElectronicsShopDataBaseImplement/Implements/OrderStorage.cs b/ElectronicsShop/ElectronicsShopDataBaseImplement/Implements/OrderStorage.cs index 46a4b68..b88368b 100644 --- a/ElectronicsShop/ElectronicsShopDataBaseImplement/Implements/OrderStorage.cs +++ b/ElectronicsShop/ElectronicsShopDataBaseImplement/Implements/OrderStorage.cs @@ -70,7 +70,6 @@ namespace ElectronicsShopDataBaseImplement.Implements using var context = new Database(); if (model.ClientID.HasValue) { return context.Orders - .Include(x => x.Payments) .Include(x => x.Products) .ThenInclude(x => x._product) .OrderBy(x => x.ID) @@ -79,7 +78,6 @@ namespace ElectronicsShopDataBaseImplement.Implements if (model.ID.HasValue) { return context.Orders - .Include(x => x.Payments) .Include(x => x.Products) .ThenInclude(x => x._product) .FirstOrDefault(x => (model.ID.HasValue && x.ID == model.ID))?.GetViewModel; diff --git a/ElectronicsShop/ElectronicsShopDataBaseImplement/Models/Order.cs b/ElectronicsShop/ElectronicsShopDataBaseImplement/Models/Order.cs index 776ef93..a23a32d 100644 --- a/ElectronicsShop/ElectronicsShopDataBaseImplement/Models/Order.cs +++ b/ElectronicsShop/ElectronicsShopDataBaseImplement/Models/Order.cs @@ -46,9 +46,6 @@ namespace ElectronicsShopDataBaseImplement.Models [ForeignKey("OrderID")] public virtual List Products { get; set; } = new(); - [ForeignKey("PaymentID")] - public virtual List Payments { get; set; } = new(); - public static Order? Create(Database context ,OrderBindingModel? model) { if (model == null)