static TransportDestinationCode() { ResourceManager resourceManager; string data; // Obtain code list from resource. resourceManager = new ResourceManager(typeof(TransportDestinationCode)); data = resourceManager.GetString("Data"); Codes = new List <TransportDestinationCode>(); // Add a default first choice. Codes.Add(new TransportDestinationCode { Id = -1, Name = "" }); var lines = data.Split(new string [] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); foreach (var line in lines) { // Split the chunks at the tab. Skip any line not containing two chuncks. var chuncks = line.Split('\t'); if (chuncks.Count() != 2) { continue; } TransportDestinationCode code; code = new TransportDestinationCode { Id = int.Parse(chuncks[0]), Name = chuncks[1] }; Codes.Add(code); } }
public TransportPerformanceRecord() { MapField(2, 12, "Identificatie detailrecord").Numeric().Getter(x => Id.ToString()); MapField(14, 9, "Burgerservicenummer").Numeric().Getter(x => BurgerServiceNumber.ToString()); MapField(23, 4, "UZOVI-nummer").Numeric().Getter(x => UzoviId.ToString()); MapField(57, 1, "Doorsturen toegestaan").Numeric().Getter(x => { if (AllowForwarding) { return("1"); } else { return("0"); } }); MapField(58, 1, "Indicatie ongeval").Alphanumeric().Getter(x => { if (!DueToAccident.HasValue) { return("O"); } else if (DueToAccident.Value) { return("J"); } else { return("N"); } }); MapField(59, 4, "Code bestemming vervoer").Numeric().Getter(x => TransportDestinationCode.ToString()); MapField(63, 3, "Aanduiding prestatiecodelijst").Numeric().Getter(x => PerformanceCodeList.ToString()); MapField(66, 6, "Prestatiecode").Numeric().Getter(x => PerformanceCode.ToString()); MapField(100, 8, "Zorgverlenerscode vervoerder").Numeric().Getter(x => CareProviderAgbId.ToString()); MapField(108, 8, "Datum prestatie").Numeric().Getter(x => PerformanceDate.ToString("yyyyMMdd")); MapField(116, 4, "Vertrektijd vervoer").Numeric(); MapField(144, 5, "Huisnummer herkomst").Numeric(); MapField(220, 5, "Huisnummer bestemming").Numeric(); MapField(272, 1, "Eenheid rit/prestatie").Numeric().Getter(x => MeasureUnit.ToString("D")); MapField(273, 4, "Aantal (rit)eenheden").Numeric().Getter(x => UnitCount.ToString()); MapField(277, 8, "Tarief prestatie (incl. BTW)").Numeric().Getter(x => Math.Round(UnitPrice * 100).ToString()); MapField(285, 8, "Bedrag toeslag").Numeric(); MapField(293, 8, "Berekend bedrag (incl. BTW)").Numeric().Getter(x => Math.Round(TotalAmount * 100).ToString()); MapField(301, 1, "Indicatie debet/credit").Alphanumeric().Getter(x => { if (TotalAmount >= 0) { return("D"); } else { return("C"); } }); MapField(302, 4, "BTW percentage declaratiebedrag").Numeric(); MapField(306, 8, "Declaratiebedrag (incl. BTW)").Numeric().Getter(x => Math.Round(InvoicedAmount * 100).ToString()); MapField(314, 1, "Indicatie debet/credit").Alphanumeric().Getter(x => { if (InvoicedAmount >= 0) { return("D"); } else { return("C"); } }); // Set default values. AllowForwarding = true; MeasureUnit = TransportMeasureUnit.Kilometer; }