laatzen/LaaProductionWeb/LaaProduction.Services/Models/BatchPrintModel.cs
2023-06-19 15:43:55 +02:00

33 lines
861 B
C#

namespace LaaProduction.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;
}
}