39 lines
1017 B
C#
39 lines
1017 B
C#
using System.ComponentModel;
|
|
|
|
namespace GasStation.Entities;
|
|
|
|
public class Supply
|
|
{
|
|
public int Id { get; private set; }
|
|
|
|
[Browsable(false)]
|
|
public int SupplierID { get; private set; }
|
|
|
|
[Browsable(false)]
|
|
public int ProductID { get; private set; }
|
|
|
|
[DisplayName("Имя поставщика")]
|
|
public string SupplierName { get; private set; } = string.Empty;
|
|
|
|
[DisplayName("Название товара")]
|
|
public string ProductName { get; private set; } = string.Empty;
|
|
|
|
[DisplayName("Количество товара")]
|
|
public int Count { get; private set; }
|
|
|
|
[DisplayName("Дата поставки")]
|
|
public DateTime SupplyDate { get; private set; }
|
|
|
|
public static Supply CreateSupply(int id, int supplierID, int productID, int count)
|
|
{
|
|
return new Supply
|
|
{
|
|
Id = id,
|
|
SupplierID = supplierID,
|
|
ProductID = productID,
|
|
Count = count,
|
|
SupplyDate = DateTime.Now
|
|
};
|
|
}
|
|
}
|