Создание View-моделей
This commit is contained in:
parent
d4e22c9915
commit
28ff3d68d1
@ -12,7 +12,7 @@ namespace CarServiceContracts.Models
|
||||
/// </summary>
|
||||
int Count { get; }
|
||||
/// <summary>
|
||||
/// Стоимость работы
|
||||
/// Стоимость
|
||||
/// </summary>
|
||||
decimal Cost { get; }
|
||||
/// <summary>
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
@ -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; }
|
||||
}
|
||||
}
|
17
CarService/CarServiceContracts/ViewModels/ItemViewModel.cs
Normal file
17
CarService/CarServiceContracts/ViewModels/ItemViewModel.cs
Normal file
@ -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; }
|
||||
}
|
||||
}
|
@ -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; }
|
||||
}
|
||||
}
|
@ -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; }
|
||||
}
|
||||
}
|
@ -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; }
|
||||
}
|
||||
}
|
@ -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; }
|
||||
}
|
||||
}
|
17
CarService/CarServiceContracts/ViewModels/WorkViewModel.cs
Normal file
17
CarService/CarServiceContracts/ViewModels/WorkViewModel.cs
Normal file
@ -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; }
|
||||
}
|
||||
}
|
18
CarService/CarServiceContracts/ViewModels/WorkerViewModel.cs
Normal file
18
CarService/CarServiceContracts/ViewModels/WorkerViewModel.cs
Normal file
@ -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;
|
||||
}
|
||||
}
|
12
CarService/CarServiceView/CustomerViewModel.cs
Normal file
12
CarService/CarServiceView/CustomerViewModel.cs
Normal file
@ -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
|
||||
{
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user