48 lines
1.5 KiB
C#
48 lines
1.5 KiB
C#
using DocumentFormat.OpenXml.Office2016.Drawing.ChartDrawing;
|
|
using Unity;
|
|
|
|
namespace Publication.Entites;
|
|
|
|
public class PrintingHouses
|
|
{
|
|
public int Id { get; set; }
|
|
public string Title { get; set; }
|
|
public string Phone { get; set; }
|
|
public string Address { get; set; }
|
|
|
|
public int MaterialsId { get; set; }
|
|
|
|
public DateTime Date { get; set; }
|
|
|
|
public IEnumerable<PrintingHouseOrders> printingHouseOrder { get; set; } = [];
|
|
|
|
public static PrintingHouses CreateEntity(int id, string title, string phone, string address,int materialsId, IEnumerable<PrintingHouseOrders> printingHouseOrders)
|
|
{
|
|
|
|
return new PrintingHouses
|
|
{
|
|
Id = id,
|
|
Title = title,
|
|
Phone = phone,
|
|
Address = address,
|
|
MaterialsId=materialsId,
|
|
Date = DateTime.Now,
|
|
printingHouseOrder = printingHouseOrders
|
|
};
|
|
}
|
|
|
|
public static PrintingHouses CreateEntity(TempPrintingHouseOrders tempPrintingHouseOrders, IEnumerable<PrintingHouseOrders> _printingHouseOrders)
|
|
{
|
|
return new PrintingHouses
|
|
{
|
|
Id = tempPrintingHouseOrders.Id,
|
|
Title = tempPrintingHouseOrders.Title,
|
|
Phone = tempPrintingHouseOrders.Phone,
|
|
Address = tempPrintingHouseOrders.Address,
|
|
MaterialsId = tempPrintingHouseOrders.MaterialsId,
|
|
Date = tempPrintingHouseOrders.Date,
|
|
printingHouseOrder = _printingHouseOrders
|
|
};
|
|
}
|
|
}
|