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