From 28ff3d68d173c521c8edec809ac923af11cd8932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=BA=20=D0=98=D0=B3=D0=BE=D1=80=D1=8C?= Date: Sat, 1 Apr 2023 21:36:28 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20View-=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Models/IWorkInRequestModel.cs | 2 +- .../ViewModels/CustomerViewModel.cs | 18 ++++++++++++++++++ .../ViewModels/ItemForRepairViewModel.cs | 14 ++++++++++++++ .../ViewModels/ItemViewModel.cs | 17 +++++++++++++++++ .../ViewModels/RepairRequestViewModel.cs | 14 ++++++++++++++ .../ViewModels/VehicleViewModel.cs | 17 +++++++++++++++++ .../ViewModels/WorkInRequestViewModel.cs | 16 ++++++++++++++++ .../ViewModels/WorkPaymentViewModel.cs | 15 +++++++++++++++ .../ViewModels/WorkViewModel.cs | 17 +++++++++++++++++ .../ViewModels/WorkerViewModel.cs | 18 ++++++++++++++++++ CarService/CarServiceView/CustomerViewModel.cs | 12 ++++++++++++ 11 files changed, 159 insertions(+), 1 deletion(-) create mode 100644 CarService/CarServiceContracts/ViewModels/CustomerViewModel.cs create mode 100644 CarService/CarServiceContracts/ViewModels/ItemForRepairViewModel.cs create mode 100644 CarService/CarServiceContracts/ViewModels/ItemViewModel.cs create mode 100644 CarService/CarServiceContracts/ViewModels/RepairRequestViewModel.cs create mode 100644 CarService/CarServiceContracts/ViewModels/VehicleViewModel.cs create mode 100644 CarService/CarServiceContracts/ViewModels/WorkInRequestViewModel.cs create mode 100644 CarService/CarServiceContracts/ViewModels/WorkPaymentViewModel.cs create mode 100644 CarService/CarServiceContracts/ViewModels/WorkViewModel.cs create mode 100644 CarService/CarServiceContracts/ViewModels/WorkerViewModel.cs create mode 100644 CarService/CarServiceView/CustomerViewModel.cs diff --git a/CarService/CarServiceContracts/Models/IWorkInRequestModel.cs b/CarService/CarServiceContracts/Models/IWorkInRequestModel.cs index 226c67a..e377697 100644 --- a/CarService/CarServiceContracts/Models/IWorkInRequestModel.cs +++ b/CarService/CarServiceContracts/Models/IWorkInRequestModel.cs @@ -12,7 +12,7 @@ namespace CarServiceContracts.Models /// int Count { get; } /// - /// Стоимость работы + /// Стоимость /// decimal Cost { get; } /// diff --git a/CarService/CarServiceContracts/ViewModels/CustomerViewModel.cs b/CarService/CarServiceContracts/ViewModels/CustomerViewModel.cs new file mode 100644 index 0000000..59d300a --- /dev/null +++ b/CarService/CarServiceContracts/ViewModels/CustomerViewModel.cs @@ -0,0 +1,18 @@ +using CarServiceContracts.Models; +using System.ComponentModel; + +namespace CarServiceContracts.ViewModels +{ + public class CustomerViewModel : ICustomerModel + { + public int Id { get; set; } + [DisplayName("Логин")] + public string Login { get; set; } = string.Empty; + [DisplayName("Пароль")] + public string Password { get; set; } = string.Empty; + [DisplayName("Имя")] + public string Name { get; set; } = string.Empty; + [DisplayName("Фамилия")] + public string Surname { get; set; } = string.Empty; + } +} diff --git a/CarService/CarServiceContracts/ViewModels/ItemForRepairViewModel.cs b/CarService/CarServiceContracts/ViewModels/ItemForRepairViewModel.cs new file mode 100644 index 0000000..3cb4931 --- /dev/null +++ b/CarService/CarServiceContracts/ViewModels/ItemForRepairViewModel.cs @@ -0,0 +1,14 @@ +using CarServiceContracts.Models; +using System.ComponentModel; + +namespace CarServiceContracts.ViewModels +{ + public class ItemForRepairViewModel : IItemForRepairModel + { + public int Id { get; set; } + [DisplayName("Количество")] + public int Count { get; set; } + public int ItemId { get; set; } + public int RepairRequestId { get; set; } + } +} diff --git a/CarService/CarServiceContracts/ViewModels/ItemViewModel.cs b/CarService/CarServiceContracts/ViewModels/ItemViewModel.cs new file mode 100644 index 0000000..7c93229 --- /dev/null +++ b/CarService/CarServiceContracts/ViewModels/ItemViewModel.cs @@ -0,0 +1,17 @@ +using CarServiceContracts.Models; +using System.ComponentModel; + +namespace CarServiceContracts.ViewModels +{ + public class ItemViewModel : IItemModel + { + public int Id { get; set; } + [DisplayName("Наименование")] + public string Name { get; set; } = string.Empty; + [DisplayName("Цена")] + public decimal Price { get; set; } + [DisplayName("Количество")] + public int Count { get; set; } + public int WorkerId { get; set; } + } +} diff --git a/CarService/CarServiceContracts/ViewModels/RepairRequestViewModel.cs b/CarService/CarServiceContracts/ViewModels/RepairRequestViewModel.cs new file mode 100644 index 0000000..ec69250 --- /dev/null +++ b/CarService/CarServiceContracts/ViewModels/RepairRequestViewModel.cs @@ -0,0 +1,14 @@ +using CarServiceContracts.Models; +using System.ComponentModel; + +namespace CarServiceContracts.ViewModels +{ + public class RepairRequestViewModel : IRepairRequestModel + { + [DisplayName("Номер заявки")] + public int Id { get; set; } + [DisplayName("Дата создания")] + public DateTime DateCreated { get; set; } = DateTime.Now; + public int VehicleId { get; set; } + } +} diff --git a/CarService/CarServiceContracts/ViewModels/VehicleViewModel.cs b/CarService/CarServiceContracts/ViewModels/VehicleViewModel.cs new file mode 100644 index 0000000..dd6da33 --- /dev/null +++ b/CarService/CarServiceContracts/ViewModels/VehicleViewModel.cs @@ -0,0 +1,17 @@ +using CarServiceContracts.Models; +using System.ComponentModel; + +namespace CarServiceContracts.ViewModels +{ + public class VehicleViewModel : IVehicleModel + { + public int Id { get; set; } + [DisplayName("Наименование")] + public string Name { get; set; } = string.Empty; + [DisplayName("Гос. номер")] + public string? Plate { get; set; } + [DisplayName("ВИН номер")] + public string? VIN { get; set; } + public int CustomerId { get; set; } + } +} diff --git a/CarService/CarServiceContracts/ViewModels/WorkInRequestViewModel.cs b/CarService/CarServiceContracts/ViewModels/WorkInRequestViewModel.cs new file mode 100644 index 0000000..a341113 --- /dev/null +++ b/CarService/CarServiceContracts/ViewModels/WorkInRequestViewModel.cs @@ -0,0 +1,16 @@ +using CarServiceContracts.Models; +using System.ComponentModel; + +namespace CarServiceContracts.ViewModels +{ + public class WorkInRequestViewModel : IWorkInRequestModel + { + public int Id { get; set; } + [DisplayName("Количество работ")] + public int Count { get; set; } + [DisplayName("Стоимость")] + public decimal Cost { get; set; } + public int RepairRequestId { get; set; } + public int WorkId { get; set; } + } +} diff --git a/CarService/CarServiceContracts/ViewModels/WorkPaymentViewModel.cs b/CarService/CarServiceContracts/ViewModels/WorkPaymentViewModel.cs new file mode 100644 index 0000000..6f91ec1 --- /dev/null +++ b/CarService/CarServiceContracts/ViewModels/WorkPaymentViewModel.cs @@ -0,0 +1,15 @@ +using CarServiceContracts.Models; +using System.ComponentModel; + +namespace CarServiceContracts.ViewModels +{ + public class WorkPaymentViewModel : IWorkPaymentModel + { + public int Id { get; set; } + [DisplayName("Дата оплаты")] + public DateTime DatePayment { get; set; } + [DisplayName("Сумма")] + public decimal Sum { get; set; } + public int WorkInRequestId { get; set; } + } +} diff --git a/CarService/CarServiceContracts/ViewModels/WorkViewModel.cs b/CarService/CarServiceContracts/ViewModels/WorkViewModel.cs new file mode 100644 index 0000000..ad81912 --- /dev/null +++ b/CarService/CarServiceContracts/ViewModels/WorkViewModel.cs @@ -0,0 +1,17 @@ +using CarServiceContracts.Models; +using System.ComponentModel; + +namespace CarServiceContracts.ViewModels +{ + public class WorkViewModel : IWorkModel + { + public int Id { get; set; } + [DisplayName("Наименование")] + public string Name { get; set; } = string.Empty; + [DisplayName("Стоимость работы")] + public decimal Price { get; set; } + [DisplayName("Длительность")] + public decimal Duration { get; set; } + public int WorkerId { get; set; } + } +} diff --git a/CarService/CarServiceContracts/ViewModels/WorkerViewModel.cs b/CarService/CarServiceContracts/ViewModels/WorkerViewModel.cs new file mode 100644 index 0000000..6fdd459 --- /dev/null +++ b/CarService/CarServiceContracts/ViewModels/WorkerViewModel.cs @@ -0,0 +1,18 @@ +using CarServiceContracts.Models; +using System.ComponentModel; + +namespace CarServiceContracts.ViewModels +{ + public class WorkerViewModel : IWorkerModel + { + public int Id { get; set; } + [DisplayName("Логин")] + public string Login { get; set; } = string.Empty; + [DisplayName("Пароль")] + public string Password { get; set; } = string.Empty; + [DisplayName("Имя")] + public string Name { get; set; } = string.Empty; + [DisplayName("Фамилия")] + public string Surname { get; set; } = string.Empty; + } +} diff --git a/CarService/CarServiceView/CustomerViewModel.cs b/CarService/CarServiceView/CustomerViewModel.cs new file mode 100644 index 0000000..71fb2a6 --- /dev/null +++ b/CarService/CarServiceView/CustomerViewModel.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CarServiceView +{ + internal class CustomerViewModel + { + } +}