Fixes for things not understood.. ^^
This commit is contained in:
parent
e620c2d0e5
commit
9ad543e705
@ -838,8 +838,21 @@ namespace ENI2.DetailViewControls
|
||||
|
||||
foreach (Message message in this.Messages)
|
||||
{
|
||||
// Evaluate a number of criteria for messages that should not be preselected for sending
|
||||
if (((message.ViolationCount ?? 0) > 0) || ((message.ErrorCount ?? 0) > 0)) continue; // these need more work
|
||||
if (Message.IsListClass(message.MessageNotificationClass) && (message.Elements.Count == 0)) continue; // avoid suspend on empty list classes
|
||||
if ((message.MessageNotificationClass == Message.NotificationClass.HAZA) && !XtraSendLogic.ShouldSendMessage(message)) continue;
|
||||
if ((message.MessageNotificationClass == Message.NotificationClass.HAZD) && !XtraSendLogic.ShouldSendMessage(message)) continue;
|
||||
if (message.MessageNotificationClass == Message.NotificationClass.BPOL)
|
||||
{
|
||||
if (message.Elements.Count > 0)
|
||||
{
|
||||
if (message.Elements[0] is BPOL bpol)
|
||||
{
|
||||
if (bpol.PortOfItineraries.Count == 0) continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
readyToSendMessages.Add(message.MessageNotificationClass);
|
||||
}
|
||||
|
||||
|
||||
@ -92,22 +92,6 @@ 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;
|
||||
|
||||
@ -1281,17 +1281,18 @@ namespace ENI2.Excel
|
||||
if (waste.WasteType == 3000) waste.WasteType = 401;
|
||||
|
||||
waste.WasteDisposalAmount_MTQ = reader.ReadNumber(wasteAmount);
|
||||
if (!waste.WasteDisposalAmount_MTQ.HasValue && reader.ReadText(wasteAmount).IsNullOrEmpty()) waste.WasteDisposalAmount_MTQ = 0;
|
||||
waste.WasteCapacity_MTQ = reader.ReadNumber(wasteCapacity);
|
||||
if (!waste.WasteCapacity_MTQ.HasValue && reader.ReadText(wasteCapacity).IsNullOrEmpty()) waste.WasteCapacity_MTQ = 0;
|
||||
waste.WasteAmountRetained_MTQ = reader.ReadNumber(wasteRetained);
|
||||
if (!waste.WasteAmountRetained_MTQ.HasValue && reader.ReadText(wasteRetained).IsNullOrEmpty()) waste.WasteAmountRetained_MTQ = 0;
|
||||
|
||||
waste.WasteDisposalPort = reader.ReadSSNLocode(wastePort); // aka RemainingWasteDisposalPort
|
||||
|
||||
if ((waste.WasteDisposalPort != null) && (waste.WasteDisposalPort == string.Empty))
|
||||
{
|
||||
waste.WasteDisposalPort = "ZZUKN";
|
||||
}
|
||||
if ((waste.WasteDisposalPort == null) && reader.ReadText(wastePort).IsNullOrEmpty()) waste.WasteDisposalPort = "ZZUKN";
|
||||
|
||||
waste.WasteAmountGeneratedTillNextPort_MTQ = reader.ReadNumber(amountGen);
|
||||
if (!waste.WasteAmountGeneratedTillNextPort_MTQ.HasValue && reader.ReadText(amountGen).IsNullOrEmpty()) waste.WasteAmountGeneratedTillNextPort_MTQ = 0;
|
||||
|
||||
if (!waste.WasteType.HasValue || (waste.WasteType > 999))
|
||||
{
|
||||
@ -1299,7 +1300,7 @@ namespace ENI2.Excel
|
||||
}
|
||||
}
|
||||
|
||||
was.AddMissingWaste();
|
||||
was.AddMissingWaste(false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
5
ENI2/Properties/Resources.Designer.cs
generated
5
ENI2/Properties/Resources.Designer.cs
generated
@ -2175,7 +2175,10 @@ namespace ENI2.Properties {
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The existing value for the waste disposal service provider will be overwritten.
|
||||
///Current entry:{0} New entry:{1}
|
||||
///
|
||||
///Current entry: {0}
|
||||
///New entry: {1}
|
||||
///
|
||||
///Proceed?.
|
||||
/// </summary>
|
||||
public static string textConfirmWSDPOverwrite {
|
||||
|
||||
@ -2259,7 +2259,10 @@
|
||||
</data>
|
||||
<data name="textConfirmWSDPOverwrite" xml:space="preserve">
|
||||
<value>The existing value for the waste disposal service provider will be overwritten.
|
||||
Current entry:{0} New entry:{1}
|
||||
|
||||
Current entry: {0}
|
||||
New entry: {1}
|
||||
|
||||
Proceed?</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -502,7 +502,7 @@ namespace bsmd.database
|
||||
/// Convenience Methode, die fehlende Waste Einträge ergänzt. Verbesserte Version, aus ENI-2 herüberkopiert, damit es auch im
|
||||
/// Excel_Reader nutzbar wird
|
||||
/// </summary>
|
||||
public void AddMissingWaste()
|
||||
public void AddMissingWaste(bool fixExisting = true)
|
||||
{
|
||||
|
||||
foreach (string wasteCodeString in WAS.WasteCodes)
|
||||
@ -537,6 +537,8 @@ namespace bsmd.database
|
||||
this.Waste.Add(newWaste);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (fixExisting)
|
||||
{
|
||||
if (!foundWaste.WasteAmountGeneratedTillNextPort_MTQ.HasValue) foundWaste.WasteAmountGeneratedTillNextPort_MTQ = 0;
|
||||
if (!foundWaste.WasteAmountRetained_MTQ.HasValue) foundWaste.WasteAmountRetained_MTQ = 0;
|
||||
@ -547,6 +549,7 @@ namespace bsmd.database
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user