laatzen/LaaProductionWeb/LaaProductionWeb.Services/Models/BatchPrintModel.cs
2023-05-17 14:57:05 +02:00

33 lines
864 B
C#

namespace LaaProductionWeb.Services.Models
{
using System.Collections.Generic;
using System.Linq;
public class BatchPrintModel
{
private readonly PalletsBatchModel batchModel;
public BatchPrintModel(PalletsBatchModel batchModel)
=> this.batchModel = batchModel;
public string ClientName
=> this.batchModel.Customer;
public int OrderNr
=> this.batchModel.OrderNr;
public int PalletNr
=> this.batchModel
.Positions
?.FirstOrDefault()
?.Items
?.FirstOrDefault()
?.PalletNr ?? 0;
public int ProductionOrderNr
=> this.batchModel.ProductionOrderNr;
public IEnumerable<PalletPosition> Positions
=> this.batchModel.Positions;
}
}