Skip when HAZA HAZD BPOL are 'empty' based on the empty definition

This commit is contained in:
Daniel Schick 2025-08-04 14:39:35 +02:00
parent f833aab844
commit e620c2d0e5

View File

@ -2,13 +2,12 @@
// Description: Select classes for import via Excel or for sending them once completed
// Returns: Array of selected classes as property
using bsmd.database;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows;
using bsmd.database;
namespace ENI2.EditControls
{
/// <summary>
@ -93,6 +92,22 @@ namespace ENI2.EditControls
(aMessage.MessageNotificationClass == Message.NotificationClass.WAS_RCPT)
)) continue;
if(!IsImportMode)
{
// Speziallogik, was außerdem nicht zu Versand vorgeschlagen werden soll
if ((aMessage.MessageNotificationClass == Message.NotificationClass.HAZA) && !XtraSendLogic.ShouldSendMessage(aMessage)) continue;
if ((aMessage.MessageNotificationClass == Message.NotificationClass.HAZD) && !XtraSendLogic.ShouldSendMessage(aMessage)) continue;
if(aMessage.MessageNotificationClass == Message.NotificationClass.BPOL) {
if (aMessage.Elements.Count > 0)
{
if (aMessage.Elements[0] is BPOL bpol)
{
if (bpol.PortOfItineraries.Count == 0) continue;
}
}
}
}
SelectClass sc = new SelectClass();
sc.Name = Enum.GetName(typeof(Message.NotificationClass), aMessage.MessageNotificationClass);
sc.Class = aMessage.MessageNotificationClass;