added WAS_RCPT
This commit is contained in:
parent
3cec894142
commit
c11027790e
@ -1583,6 +1583,46 @@ namespace bsmd.dbh
|
|||||||
break;
|
break;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region WAS_RCPT
|
||||||
|
|
||||||
|
case Message.NotificationClass.WAS_RCPT:
|
||||||
|
{
|
||||||
|
RootWAS_RCPT rootWAS_RCPT = new RootWAS_RCPT();
|
||||||
|
rootWAS_RCPT.WasteDeliveryReceipt = new RootWAS_RCPTWasteDeliveryReceipt[message.Elements.Count];
|
||||||
|
|
||||||
|
for(int i = 0; i < message.Elements.Count; i++) {
|
||||||
|
|
||||||
|
WAS_RCPT was_rcpt = message.Elements[i] as WAS_RCPT;
|
||||||
|
RootWAS_RCPTWasteDeliveryReceipt rwr = new RootWAS_RCPTWasteDeliveryReceipt();
|
||||||
|
rwr.IdentificationNumber = was_rcpt.IdentificationNumber;
|
||||||
|
rwr.PortReceptionFacilityName = was_rcpt.PortReceptionFacilityName;
|
||||||
|
rwr.PortReceptionFacilityProviderName = was_rcpt.PortReceptionFacilityProviderName;
|
||||||
|
rwr.TreatmentFacilityProvider = new string[was_rcpt.TreatmentFacilityProvider.Count];
|
||||||
|
for (int j = 0; j < was_rcpt.TreatmentFacilityProvider.Count; j++)
|
||||||
|
{
|
||||||
|
rwr.TreatmentFacilityProvider[j] = was_rcpt.TreatmentFacilityProvider[j].TreatmentFacilityProviderName;
|
||||||
|
}
|
||||||
|
if(was_rcpt.WasteDeliveryDateFrom.HasValue)
|
||||||
|
rwr.WasteDeliveryDateFrom = was_rcpt.WasteDeliveryDateFrom.Value;
|
||||||
|
if(was_rcpt.WasteDeliveryDateTo.HasValue)
|
||||||
|
rwr.WasteDeliveryDateTo = was_rcpt.WasteDeliveryDateTo.Value;
|
||||||
|
rwr.WasteReceived = new RootWAS_RCPTWasteDeliveryReceiptWasteReceived[was_rcpt.WasteReceived.Count];
|
||||||
|
for (int j = 0; j < was_rcpt.WasteReceived.Count; j++)
|
||||||
|
{
|
||||||
|
rwr.WasteReceived[j] = new RootWAS_RCPTWasteDeliveryReceiptWasteReceived();
|
||||||
|
rwr.WasteReceived[j].AmountWasteReceived_MTQ = decimal.Round((decimal)was_rcpt.WasteReceived[j].AmountWasteReceived_MTQ.Value, 3);
|
||||||
|
rwr.WasteReceived[j].WasteType = new RootWAS_RCPTWasteDeliveryReceiptWasteReceivedWasteType();
|
||||||
|
rwr.WasteReceived[j].WasteType.WasteCode = was_rcpt.WasteReceived[j].WasteCode;
|
||||||
|
rwr.WasteReceived[j].WasteType.WasteDescription = was_rcpt.WasteReceived[j].WasteDescription;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
root.Items = new object[1];
|
||||||
|
root.Items[0] = rootWAS_RCPT;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
default:
|
default:
|
||||||
_log.WarnFormat("Message type {0} not (yet) supported for dbh", message.MessageNotificationClassDisplay);
|
_log.WarnFormat("Message type {0} not (yet) supported for dbh", message.MessageNotificationClassDisplay);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user