Dtos: Use collection initializer
This commit is contained in:
@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
||||
namespace Elwig.Models.Dtos {
|
||||
public class DeliveryConfirmationDeliveryData : DataTable<DeliveryConfirmationDeliveryRow> {
|
||||
|
||||
private static readonly (string, string, string?, int)[] FieldNames = new[] {
|
||||
private static readonly (string, string, string?, int)[] FieldNames = [
|
||||
("LsNr", "LsNr.", null, 26),
|
||||
("DPNr", "Pos.", null, 8),
|
||||
("Variety", "Sorte", null, 40),
|
||||
@ -17,7 +17,7 @@ namespace Elwig.Models.Dtos {
|
||||
("Gradation", "Gradation", "°Oe|°KMW", 32),
|
||||
("Buckets", "Flächenbindung", "|kg", 36),
|
||||
("Weight", "Gewicht", "kg", 16),
|
||||
};
|
||||
];
|
||||
|
||||
private readonly int MgNr;
|
||||
|
||||
|
@ -8,7 +8,7 @@ using System.Threading.Tasks;
|
||||
namespace Elwig.Models.Dtos {
|
||||
public class MemberDeliveryPerVariantData : DataTable<MemberDeliveryPerVariantRow> {
|
||||
|
||||
private static readonly (string, string, string?, int)[] FieldNames = new[] {
|
||||
private static readonly (string, string, string?, int)[] FieldNames = [
|
||||
("MgNr", "MgNr.", null, 12),
|
||||
("Name", "Name", null, 40),
|
||||
("GivenName", "Vorname", null, 40),
|
||||
@ -20,7 +20,7 @@ namespace Elwig.Models.Dtos {
|
||||
("Weights", "Geliefert", "kg", 22),
|
||||
("Areas", "Fläche", "m²", 22),
|
||||
("Yields", "Ertrag", "kg/ha", 22),
|
||||
};
|
||||
];
|
||||
|
||||
|
||||
public MemberDeliveryPerVariantData(IEnumerable<MemberDeliveryPerVariantRow> rows, int year) :
|
||||
|
@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
||||
namespace Elwig.Models.Dtos {
|
||||
public class OverUnderDeliveryData : DataTable<OverUnderDeliveryRow> {
|
||||
|
||||
private static readonly (string, string, string?, int)[] FieldNames = new[] {
|
||||
private static readonly (string, string, string?, int)[] FieldNames = [
|
||||
("MgNr", "MgNr.", null, 12),
|
||||
("Name", "Name", null, 40),
|
||||
("GivenName", "Vorname", null, 40),
|
||||
@ -19,7 +19,7 @@ namespace Elwig.Models.Dtos {
|
||||
("DeliveryRight", "Lieferrecht", "kg", 22),
|
||||
("Weight", "Geliefert", "kg", 22),
|
||||
("OverUnderDelivery", "Über-/Unterliefert", "kg|%", 34),
|
||||
};
|
||||
];
|
||||
|
||||
public OverUnderDeliveryData(IEnumerable<OverUnderDeliveryRow> rows, int year) :
|
||||
base($"Über-Unterlieferungen", $"Über- und Unterlieferungen laut gezeichneten Geschäftsanteilen {year}", rows, FieldNames) {
|
||||
|
Reference in New Issue
Block a user