From a57fbbebef01e9fedbf6b311c3598b3001e8f162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=9C=D0=B0=D0=BB?= =?UTF-8?q?=D0=B0=D1=84=D0=B5=D0=B5=D0=B2?= Date: Wed, 29 May 2024 18:02:37 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BC=D0=B0=D1=88=D0=B8=D0=BD=D1=8B=20=D1=80?= =?UTF-8?q?=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=D1=8E=D1=82=201000%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OfficePackage/AbstractSaveToExcelStorekeeper.cs | 2 +- .../OfficePackage/AbstractSaveToWordStorekeeper.cs | 2 +- .../CarCenterContracts/ViewModels/ReportCarViewModel.cs | 1 + CarCenter/CarCenterStorekeeperApp/StorekeeperData.cs | 6 +++--- .../Views/Home/CarPresaleChoose.cshtml | 4 ++-- .../Views/Home/CarPresaleReport.cshtml | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CarCenter/CarCenterBusinessLogic/OfficePackage/AbstractSaveToExcelStorekeeper.cs b/CarCenter/CarCenterBusinessLogic/OfficePackage/AbstractSaveToExcelStorekeeper.cs index 5ad1155..e360094 100644 --- a/CarCenter/CarCenterBusinessLogic/OfficePackage/AbstractSaveToExcelStorekeeper.cs +++ b/CarCenter/CarCenterBusinessLogic/OfficePackage/AbstractSaveToExcelStorekeeper.cs @@ -55,7 +55,7 @@ namespace CarCenterBusinessLogic.OfficePackage { ColumnName = "A", RowIndex = rowIndex, - Text = pc.CarId.ToString(), + Text = pc.VINnumber.ToString(), StyleInfo = ExcelStyleInfoType.Text }); int place = 2; diff --git a/CarCenter/CarCenterBusinessLogic/OfficePackage/AbstractSaveToWordStorekeeper.cs b/CarCenter/CarCenterBusinessLogic/OfficePackage/AbstractSaveToWordStorekeeper.cs index 2447c06..0ba9556 100644 --- a/CarCenter/CarCenterBusinessLogic/OfficePackage/AbstractSaveToWordStorekeeper.cs +++ b/CarCenter/CarCenterBusinessLogic/OfficePackage/AbstractSaveToWordStorekeeper.cs @@ -27,7 +27,7 @@ namespace CarCenterBusinessLogic.OfficePackage }); foreach (var report in info.carPresalesReport) { - CreateNumberedParagraph(1, 0, report.CarId.ToString()); + CreateNumberedParagraph(1, 0, report.VINnumber.ToString()); foreach (var workshop in report.Presales) { CreateNumberedParagraph(1, 1, workshop); diff --git a/CarCenter/CarCenterContracts/ViewModels/ReportCarViewModel.cs b/CarCenter/CarCenterContracts/ViewModels/ReportCarViewModel.cs index a7f4e8e..3be0891 100644 --- a/CarCenter/CarCenterContracts/ViewModels/ReportCarViewModel.cs +++ b/CarCenter/CarCenterContracts/ViewModels/ReportCarViewModel.cs @@ -10,6 +10,7 @@ namespace CarCenterContracts.ViewModels public class ReportCarViewModel { public int CarId { get; set; } + public int VINnumber { get; set; } public List Presales { get; set; } = new(); } } diff --git a/CarCenter/CarCenterStorekeeperApp/StorekeeperData.cs b/CarCenter/CarCenterStorekeeperApp/StorekeeperData.cs index e955867..7cb5313 100644 --- a/CarCenter/CarCenterStorekeeperApp/StorekeeperData.cs +++ b/CarCenter/CarCenterStorekeeperApp/StorekeeperData.cs @@ -156,8 +156,8 @@ namespace StorekeeperApp foreach (int i in bundlings) { ReportCarViewModel report = new(); - var bundling = _bundlingLogic.ReadElement(new() { Id = i }); - report.CarId = bundling!.Id; + var bundling = _carLogic.ReadElement(new() { Id = i }); + report.VINnumber = (int)bundling!.VINnumber; var presales = _presaleLogic.ReadList(new() { CarId = i }); if (presales != null) report.Presales = presales.Select(w => w.Id.ToString()).ToList(); @@ -190,7 +190,7 @@ namespace StorekeeperApp _word.CreateDoc(new() { memoryStream = stream, - Title = "Отчет.Номер автомобиля: - предпродажные", + Title = "Отчет.VIN-Номер автомобиля: - предпродажные", carPresalesReport = reports }); } diff --git a/CarCenter/CarCenterStorekeeperApp/Views/Home/CarPresaleChoose.cshtml b/CarCenter/CarCenterStorekeeperApp/Views/Home/CarPresaleChoose.cshtml index eb7f8f5..86ef38d 100644 --- a/CarCenter/CarCenterStorekeeperApp/Views/Home/CarPresaleChoose.cshtml +++ b/CarCenter/CarCenterStorekeeperApp/Views/Home/CarPresaleChoose.cshtml @@ -12,7 +12,7 @@ Select - Выберите автомобиль с номером: + Выберите автомобиль с VIN-номером: @@ -22,7 +22,7 @@ - @Model[i].Id + @Model[i].VINnumber } diff --git a/CarCenter/CarCenterStorekeeperApp/Views/Home/CarPresaleReport.cshtml b/CarCenter/CarCenterStorekeeperApp/Views/Home/CarPresaleReport.cshtml index a0ac5c8..baf2c5d 100644 --- a/CarCenter/CarCenterStorekeeperApp/Views/Home/CarPresaleReport.cshtml +++ b/CarCenter/CarCenterStorekeeperApp/Views/Home/CarPresaleReport.cshtml @@ -20,7 +20,7 @@ @foreach (var detail in Model) { - @detail.CarId + @detail.VINnumber