Spezielle Abfrage für DEBRE / DEBRV wenn bestimmte Meldeklassen noch nicht versandt wurden

This commit is contained in:
Daniel Schick 2022-12-13 09:13:12 +01:00
parent 894aadc2d9
commit 217dbcfcde
4 changed files with 32 additions and 3 deletions

View File

@ -113,8 +113,14 @@ namespace ENI2
if(this.Core.PoC.Equals("DEBRV") || this.Core.PoC.Equals("DEBRE"))
{
foreach(Message aMessage in _messages)
{
if((aMessage.MessageNotificationClass == Message.NotificationClass.NOA_NOD) && (aMessage.InternalStatus != Message.BSMDStatus.CONFIRMED)) { messageText = "NOA_NOD"; return true; }
if ((aMessage.MessageNotificationClass == Message.NotificationClass.AGNT) && (aMessage.InternalStatus != Message.BSMDStatus.CONFIRMED)) { messageText = "AGNT"; return true; }
if ((aMessage.MessageNotificationClass == Message.NotificationClass.INFO) && (aMessage.InternalStatus != Message.BSMDStatus.CONFIRMED)) { messageText = "INFO"; return true; }
if ((aMessage.MessageNotificationClass == Message.NotificationClass.SEC) && (aMessage.InternalStatus != Message.BSMDStatus.CONFIRMED)) { messageText = "SEC"; return true; }
if ((aMessage.MessageNotificationClass == Message.NotificationClass.TIEFA) && (aMessage.InternalStatus != Message.BSMDStatus.CONFIRMED)) { messageText = "TIEFA"; return true; }
}
}
return false;

View File

@ -83,7 +83,7 @@ namespace ENI2
{
if (!openTabs.ContainsKey(aMessageCore.Id.Value))
{
ClosableTabItem searchResultItem = new ClosableTabItem();
ClosableTabItem searchResultItem = new ClosableTabItem();
// try to lock the item
Guid lockedUserId = Guid.Empty;
@ -207,6 +207,17 @@ namespace ENI2
e.Cancel = true;
}
// Dez.22: Special case for BRE/BRV: Warning if some messages are not "confirmed"
if(drc.Core.PoC.Equals("DEBRE")||drc.Core.PoC.Equals("DEBRV"))
{
if(drc.HasCriticalInfoMissing(out string missingClass))
{
if (MessageBox.Show(string.Format(Properties.Resources.textSpecialCaseBREBRV, missingClass), Properties.Resources.textConfirmation, MessageBoxButton.YesNo,
MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.No)
e.Cancel = true;
}
}
if (!e.Cancel)
{
if (lockedCores.ContainsKey(tabItem))

View File

@ -4551,6 +4551,15 @@ namespace ENI2.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to One or more important classes haven&apos;t been sent for DEBRE/DEBRV: {0} Close anyway?.
/// </summary>
public static string textSpecialCaseBREBRV {
get {
return ResourceManager.GetString("textSpecialCaseBREBRV", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Special requirements.
/// </summary>

View File

@ -1858,4 +1858,7 @@
<data name="textSearchNST" xml:space="preserve">
<value>Search NST2007 list</value>
</data>
<data name="textSpecialCaseBREBRV" xml:space="preserve">
<value>One or more important classes haven't been sent for DEBRE/DEBRV: {0} Close anyway?</value>
</data>
</root>