Do not show ATA message as changed when changing CORE values on Overview page

This commit is contained in:
Daniel Schick 2024-08-12 12:16:25 +02:00
parent c4cd477002
commit c11e571473
3 changed files with 25 additions and 8 deletions

View File

@ -89,7 +89,7 @@ namespace ENI2
/// <summary>
/// Eine in der Detailansicht enthaltene Meldeklasse hat sich geändert
/// </summary>
public event Action<Message.NotificationClass> NotificationClassChanged;
public event Action<Message.NotificationClass?> NotificationClassChanged;
/// <summary>
/// Eine Maske soll neu erzeugt werden weil sich dort "indirekt" etwas geändert hat durch eine Änderung in einer anderen Maske.
@ -258,11 +258,16 @@ namespace ENI2
{
_typeMessageDict[notificationClass].IsDirty = true;
// signal this notification class changed..
this.OnNotificationClassChanged(notificationClass);
}
}
}
}
protected void OnNotificationClassChanged(Message.NotificationClass? notificationClass)
{
this.NotificationClassChanged?.Invoke(notificationClass);
}
}
}
}
#region "BHV Spezial" Datetime Parsing..

View File

@ -551,7 +551,7 @@ namespace ENI2
this.DetailControl_RequestReload(this.Core.Id.Value);
}
private void DetailControl_NotificationClassChanged(Message.NotificationClass notificationClass)
private void DetailControl_NotificationClassChanged(Message.NotificationClass? notificationClass)
{
// in der Übersicht die Meldeklasse als geändert markieren..?
this.buttonSaveAll.Visibility = Visibility.Visible;

View File

@ -19,6 +19,8 @@ using System.Collections.Generic;
using System.Windows.Media;
using Microsoft.Win32;
using System.Diagnostics;
using System.ComponentModel;
using static bsmd.database.Message;
namespace ENI2.DetailViewControls
{
@ -46,11 +48,11 @@ namespace ENI2.DetailViewControls
{
// die Controls nach Änderungen monitoren
// diese Einträge gehen auf core
this.RegisterTextboxChange(this.textBoxTicketNo, Message.NotificationClass.ATA);
this.RegisterTextboxChange(this.textBoxDisplayId, Message.NotificationClass.ATA);
this.RegisterTextboxChange(this.textBoxIMO, Message.NotificationClass.ATA);
this.RegisterTextboxChange(this.textBoxENI, Message.NotificationClass.ATA);
this.RegisterLocodeChange(this.locodePoC, Message.NotificationClass.ATA);
this.textBoxTicketNo.TextChanged += CoreTextBox_TextChanged;
this.textBoxDisplayId.TextChanged += CoreTextBox_TextChanged;
this.textBoxIMO.TextChanged += CoreTextBox_TextChanged;
this.textBoxENI.TextChanged += CoreTextBox_TextChanged;
this.locodePoC.PropertyChanged += CoreLocode_LocodeChanged;
this.RegisterDateTimePickerChange(this.dateTimePickerATA, Message.NotificationClass.ATA);
this.RegisterDateTimePickerChange(this.dateTimePickerATD, Message.NotificationClass.ATD);
@ -58,6 +60,16 @@ namespace ENI2.DetailViewControls
this.RegisterDateTimePickerChange(this.dateTimePickerETD, Message.NotificationClass.NOA_NOD);
}
private void CoreLocode_LocodeChanged(object sender, PropertyChangedEventArgs e)
{
this.OnNotificationClassChanged(null);
}
private void CoreTextBox_TextChanged(object sender, TextChangedEventArgs e)
{
this.OnNotificationClassChanged(null);
}
#region Initialize
public override void Initialize()