From 7d2932bf17d4bd16261839bd5ea5670fa7f398fa 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: Tue, 30 Apr 2024 17:03:07 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20=D0=BE=D1=82=D1=87=D1=91?= =?UTF-8?q?=D1=82=D0=B0=20=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=D1=8C=D0=BD?= =?UTF-8?q?=D0=BE=20=D1=81=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB(=D1=81=D0=BD?= =?UTF-8?q?=D0=B0=D1=87=D0=B0=D0=BB=D0=B0=20=D0=B6=D0=B5=D1=81=D1=82=D0=BA?= =?UTF-8?q?=D0=BE=20=D1=82=D1=83=D0=BF=D0=B0=D0=BD=D1=83=D0=BB),=20=D0=BF?= =?UTF-8?q?=D0=BE=D1=84=D0=B8=D0=BA=D1=81=D0=B8=D0=BB=20car,=20=D0=B4?= =?UTF-8?q?=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20cars.cshtml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewModels/CarViewModel.cs | 3 +- .../ViewModels/StorekeeperReportViewModel.cs | 3 +- .../CarCenterDatabaseImplement/Models/Car.cs | 3 +- .../Views/Home/Cars.cshtml | 103 +++++++++++++++++- 4 files changed, 104 insertions(+), 8 deletions(-) diff --git a/CarCenter/CarCenterContracts/ViewModels/CarViewModel.cs b/CarCenter/CarCenterContracts/ViewModels/CarViewModel.cs index b407cf1..0fffbc0 100644 --- a/CarCenter/CarCenterContracts/ViewModels/CarViewModel.cs +++ b/CarCenter/CarCenterContracts/ViewModels/CarViewModel.cs @@ -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; } diff --git a/CarCenter/CarCenterContracts/ViewModels/StorekeeperReportViewModel.cs b/CarCenter/CarCenterContracts/ViewModels/StorekeeperReportViewModel.cs index f3f4991..d26437d 100644 --- a/CarCenter/CarCenterContracts/ViewModels/StorekeeperReportViewModel.cs +++ b/CarCenter/CarCenterContracts/ViewModels/StorekeeperReportViewModel.cs @@ -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? Presales; // список предпродажных у авто + public Dictionary PresaleCars; // список предпродажных у авто } } diff --git a/CarCenter/CarCenterDatabaseImplement/Models/Car.cs b/CarCenter/CarCenterDatabaseImplement/Models/Car.cs index 4714c0c..5598b54 100644 --- a/CarCenter/CarCenterDatabaseImplement/Models/Car.cs +++ b/CarCenter/CarCenterDatabaseImplement/Models/Car.cs @@ -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, diff --git a/CarCenter/CarCenterStorekeeperApp/Views/Home/Cars.cshtml b/CarCenter/CarCenterStorekeeperApp/Views/Home/Cars.cshtml index e1dd794..534b4ac 100644 --- a/CarCenter/CarCenterStorekeeperApp/Views/Home/Cars.cshtml +++ b/CarCenter/CarCenterStorekeeperApp/Views/Home/Cars.cshtml @@ -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 @{ + ViewData["Title"] = "Cars"; } +
+

Машины

+
+
+ @{ + if (Model == null) + { +

Надо войти в аккаунт.

+ return; + } +

+ Создать машину + Изменить машину + Удалить машину +

+ + + + + + + + + + + + + + + + + + + @foreach (var car in Model) + { + + + + + + + + + + + + + + } + +
+ Номер заказа + + Покупатель + + Цена особенности + + Имя кладовщика + + Марка + + Модель + + Класс + + Год выпуска + + Вин-номер + + Цена + + Комплектации +
+ @Html.DisplayFor(modelItem => car.OrderId) + + @Html.DisplayFor(modelItem => car.BuyerFCS) + + @Html.DisplayFor(modelItem => car.FeaturePrice) + + @Html.DisplayFor(modelItem => car.StorekeeperName) + + @Html.DisplayFor(modelItem => car.CarBrand) + + @Html.DisplayFor(modelItem => car.Model) + + @Html.DisplayFor(modelItem => car.CarClass) + + @Html.DisplayFor(modelItem => car.Year) + + @Html.DisplayFor(modelItem => car.VINnumber) + + @Html.DisplayFor(modelItem => car.Price) + + @Html.DisplayFor(modelItem => car.CarBundlings) +
+ } +