2024-05-03 10:59:33 +04:00
|
|
|
|
using CarShowroomContracts.AbstractModels;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
2024-05-05 22:02:53 +04:00
|
|
|
|
namespace CarShowroomDataModels.Views
|
2024-05-03 10:59:33 +04:00
|
|
|
|
{
|
|
|
|
|
public class CarView : ICar
|
|
|
|
|
{
|
|
|
|
|
[DisplayName("Номер машины")]
|
|
|
|
|
public int Id { get; set; }
|
|
|
|
|
[DisplayName("Цвет")]
|
|
|
|
|
public string Color { get; set; }
|
|
|
|
|
[DisplayName("Дата производства")]
|
2024-05-05 19:18:53 +04:00
|
|
|
|
public DateTime ReleaseDate { get; set; }
|
2024-05-03 10:59:33 +04:00
|
|
|
|
public int ModelId { get; set; }
|
|
|
|
|
[DisplayName("Модель")]
|
|
|
|
|
public string ModelName { get; set; } = string.Empty;
|
2024-05-03 11:10:36 +04:00
|
|
|
|
[DisplayName("Цена")]
|
|
|
|
|
public int ModelPrice { get; set; }
|
2024-05-03 10:59:33 +04:00
|
|
|
|
[DisplayName("Марка")]
|
|
|
|
|
public string MakeName { get; set; } = string.Empty;
|
|
|
|
|
public CarView(ICar model)
|
|
|
|
|
{
|
|
|
|
|
Id = model.Id;
|
|
|
|
|
Color = model.Color;
|
2024-05-05 19:18:53 +04:00
|
|
|
|
ReleaseDate = model.ReleaseDate;
|
2024-05-03 10:59:33 +04:00
|
|
|
|
ModelId = model.ModelId;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|