PIbd-31_PotapovNS_COP_20/InternetShop/InternetShopContracts/DataViewModels/OrderViewModel.cs

31 lines
991 B
C#
Raw Normal View History

2024-11-19 22:23:42 +04:00
using InternetShopDataModels.Models;
using System.ComponentModel;
namespace InternetShopContracts.DataViewModels
{
public class OrderViewModel : IOrderModel
{
[DisplayName("ФИО заказчика")]
2024-11-19 22:23:42 +04:00
public string CustomerFIO { get; set; } = string.Empty;
[DisplayName("Email заказчика")]
2024-11-19 22:23:42 +04:00
public string CustomerEmail { get; set; } = string.Empty;
[DisplayName("Изображение")]
2024-11-19 22:23:42 +04:00
public string ImagePath { get; set; } = string.Empty;
[DisplayName("Товары")]
2024-11-19 22:23:42 +04:00
public List<string> ProductNames { get; set; } = new List<string>();
[DisplayName("ID")]
2024-11-19 22:23:42 +04:00
public int Id { get; set; }
public string ProductsString
{
get
{
return string.Join(", ", ProductNames);
}
set
{
ProductNames = value.Split(',').Select(x => x.ToString().Trim()).ToList();
}
}
2024-11-19 22:23:42 +04:00
}
}