для отчёта правильно сделал(сначала жестко тупанул), пофиксил car, добавил cars.cshtml
This commit is contained in:
parent
0d07c9ab7a
commit
7d2932bf17
@ -15,11 +15,10 @@ namespace CarCenterContracts.ViewModels
|
||||
public int? OrderId { get; set; }
|
||||
[DisplayName("ФИО покупателя")]
|
||||
public string BuyerFCS { get; set; }
|
||||
public int? FeatureId { get; set; }
|
||||
[DisplayName("Цена особенности")]
|
||||
public double FeaturePrice { get; set; }
|
||||
public int StorekeeperId { get; set; }
|
||||
[DisplayName("Имя работника")]
|
||||
[DisplayName("Имя кладовщика")]
|
||||
public string StorekeeperName { get; set; } = string.Empty;
|
||||
[DisplayName("Марка")]
|
||||
public CarBrand CarBrand { get; set; }
|
||||
|
@ -1,4 +1,5 @@
|
||||
using CarCenterDataModels.Enums;
|
||||
using CarCenterDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@ -13,6 +14,6 @@ namespace CarCenterContracts.ViewModels
|
||||
{
|
||||
public int? Id;
|
||||
public int? Summ; // сумма по всем предпродажным у авто
|
||||
public List<PresaleViewModel>? Presales; // список предпродажных у авто
|
||||
public Dictionary<int, IPresaleModel> PresaleCars; // список предпродажных у авто
|
||||
}
|
||||
}
|
||||
|
@ -114,8 +114,7 @@ namespace CarCenterDatabaseImplement.Models
|
||||
{
|
||||
Id = Id,
|
||||
StorekeeperId = StorekeeperId,
|
||||
StorekeeperName = Storekeeper?.Name ?? string.Empty,
|
||||
FeatureId = FeatureId,
|
||||
StorekeeperName = Storekeeper?.Name ?? string.Empty,// не понял че было
|
||||
FeaturePrice = Feature?.Price ?? 0,
|
||||
OrderId = OrderId,
|
||||
BuyerFCS = Order?.BuyerFCS ?? string.Empty,
|
||||
|
@ -1,5 +1,102 @@
|
||||
@*
|
||||
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
|
||||
*@
|
||||
@using CarCenterContracts.ViewModels
|
||||
@model List<CarViewModel>
|
||||
@{
|
||||
ViewData["Title"] = "Cars";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h1 class="display-4">Машины</h1>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
@{
|
||||
if (Model == null)
|
||||
{
|
||||
<h2 class="display-4">Надо войти в аккаунт.</h2>
|
||||
return;
|
||||
}
|
||||
<p>
|
||||
<a class="text-decoration-none me-3 text-black h5" asp-action="Create">Создать машину</a>
|
||||
<a class="text-decoration-none me-3 text-black h5" asp-action="Update">Изменить машину</a>
|
||||
<a class="text-decoration-none text-black h5" asp-action="Delete">Удалить машину</a>
|
||||
</p>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Номер заказа
|
||||
</th>
|
||||
<th>
|
||||
Покупатель
|
||||
</th>
|
||||
<th>
|
||||
Цена особенности
|
||||
</th>
|
||||
<th>
|
||||
Имя кладовщика
|
||||
</th>
|
||||
<th>
|
||||
Марка
|
||||
</th>
|
||||
<th>
|
||||
Модель
|
||||
</th>
|
||||
<th>
|
||||
Класс
|
||||
</th>
|
||||
<th>
|
||||
Год выпуска
|
||||
</th>
|
||||
<th>
|
||||
Вин-номер
|
||||
</th>
|
||||
<th>
|
||||
Цена
|
||||
</th>
|
||||
<th>
|
||||
Комплектации
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var car in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => car.OrderId)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => car.BuyerFCS)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => car.FeaturePrice)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => car.StorekeeperName)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => car.CarBrand)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => car.Model)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => car.CarClass)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => car.Year)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => car.VINnumber)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => car.Price)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => car.CarBundlings)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user