42 lines
1.4 KiB
C#
42 lines
1.4 KiB
C#
using CarShowroomContracts.AbstractModels;
|
|
using CarShowroomContracts.Dtos;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace CarShowroomDataModels.Dtos
|
|
{
|
|
internal class SaleView : ISale
|
|
{
|
|
[DisplayName("Номер продажи")]
|
|
public int Id { get; set; }
|
|
[DisplayName("Время")]
|
|
public DateTime SaleTime { get; set; }
|
|
[DisplayName("Сумма")]
|
|
public int Cost { get; set; }
|
|
public int ClientId { get; set; }
|
|
[DisplayName("Клиент")]
|
|
public string ClientName { get; set; } = string.Empty;
|
|
public int EmployeeId { get; set; }
|
|
[DisplayName("Сотрудник")]
|
|
public string EmployeeName { get; set; } = string.Empty;
|
|
public List<int> CarIds { get; set; } = new();
|
|
public List<CarView> Cars { get; set; } = new();
|
|
public List<int> ServiseIds { get; set; } = new();
|
|
public List<ServiceView> Servises { get; set; } = new();
|
|
public SaleView(ISale model)
|
|
{
|
|
Id = model.Id;
|
|
SaleTime = model.SaleTime;
|
|
Cost = model.Cost;
|
|
ClientId = model.ClientId;
|
|
EmployeeId = model.EmployeeId;
|
|
CarIds = model.CarIds;
|
|
ServiseIds = model.ServiseIds;
|
|
}
|
|
}
|
|
}
|