29 lines
879 B
C#
29 lines
879 B
C#
using Data.Models;
|
|
using PluginsConventionLibrary.Plugins;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using View.ViewModels;
|
|
|
|
namespace PluginsConvention14.MyPlugin
|
|
{
|
|
public class MainPluginConventionElement : PluginsConventionElement
|
|
{
|
|
public string Name { get; set; }
|
|
public string ManufacturerName { get; set; }
|
|
public string DeliveryDate { get; set; }
|
|
public static List<ProductTableItem> ConvertProductsToTableItems(List<Product> products)
|
|
{
|
|
return products.Select(p => new ProductTableItem
|
|
{
|
|
Id = p.Id.ToString(),
|
|
Name = p.Name,
|
|
ManufacturerName = p.ManufacturerName,
|
|
DeliveryDate = p.DeliveryDate.ToShortDateString()
|
|
}).ToList();
|
|
}
|
|
}
|
|
}
|