машины работают 1000%

This commit is contained in:
Леонид Малафеев 2024-05-29 18:02:37 +04:00 committed by Marselchi
parent 0c3b970cbd
commit 0cad377205
6 changed files with 9 additions and 8 deletions

View File

@ -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;

View File

@ -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);

View File

@ -10,6 +10,7 @@ namespace CarCenterContracts.ViewModels
public class ReportCarViewModel
{
public int CarId { get; set; }
public int VINnumber { get; set; }
public List<string> Presales { get; set; } = new();
}
}

View File

@ -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
});
}

View File

@ -12,7 +12,7 @@
<thead>
<tr>
<th>Select</th>
<th>Выберите автомобиль с номером:</th>
<th>Выберите автомобиль с VIN-номером:</th>
</tr>
</thead>
<tbody>
@ -22,7 +22,7 @@
<td>
<input type="checkbox" name="selectedItems" value="@Model[i].Id" />
</td>
<td>@Model[i].Id</td>
<td>@Model[i].VINnumber</td>
</tr>
}
</tbody>

View File

@ -20,7 +20,7 @@
@foreach (var detail in Model)
{
<tr>
<td>@detail.CarId</td>
<td>@detail.VINnumber</td>
<td>
<ul>
@foreach (var workshop in detail.Presales)