diff --git a/ENI2/DetailBaseControl.cs b/ENI2/DetailBaseControl.cs
index 88b5c7dc..c3641a15 100644
--- a/ENI2/DetailBaseControl.cs
+++ b/ENI2/DetailBaseControl.cs
@@ -70,7 +70,7 @@ namespace ENI2
///
/// Damit kann ein Listenelement eine Validierung der gesamten Anmeldung auslösen (inkl. Highlighting) (auf Knopfdruck)
///
- public event Action RequestValidate;
+ public event Action RequestValidate;
///
/// Alle Meldeklassen die auf "zu versenden" stehen werden validiert und falls die Validierung scheitert auf "SUSPEND" gestellt
@@ -160,9 +160,9 @@ namespace ENI2
this.RequestReload?.Invoke(coreId);
}
- protected virtual void OnRequestValidate()
+ protected virtual void OnRequestValidate(bool showDialog)
{
- this.RequestValidate?.Invoke();
+ this.RequestValidate?.Invoke(showDialog);
}
protected virtual void OnRequestSendValidation()
diff --git a/ENI2/DetailRootControl.xaml b/ENI2/DetailRootControl.xaml
index d5e5dffe..8de72598 100644
--- a/ENI2/DetailRootControl.xaml
+++ b/ENI2/DetailRootControl.xaml
@@ -15,7 +15,7 @@
-
+
diff --git a/ENI2/DetailRootControl.xaml.cs b/ENI2/DetailRootControl.xaml.cs
index 93c28cde..a108449e 100644
--- a/ENI2/DetailRootControl.xaml.cs
+++ b/ENI2/DetailRootControl.xaml.cs
@@ -189,6 +189,7 @@ namespace ENI2
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.text11DangerousCargoDeparture, MessageGroupControlType = typeof(DangerousCargoControl), ImagePath = "Resources/sign_warning_radiation.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.text12ATAATD, MessageGroupControlType = typeof(ATAControl), ImagePath = "Resources/clock.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.text13WasteReceipts, MessageGroupControlType = typeof(WasteReceiptsControl), ImagePath = "Resources/garbage.png" });
+ this.leftColumnDefinition.Width = new GridLength(260);
}
this.listBoxMessages.ItemsSource = this._listBoxList;
@@ -657,7 +658,7 @@ namespace ENI2
private void ShortCutValidate(object sender, ExecutedRoutedEventArgs e)
{
- this.DetailControl_RequestValidate();
+ this.DetailControl_RequestValidate(true);
}
private void DetailControl_RequestReload(Guid id)
@@ -770,9 +771,9 @@ namespace ENI2
}
}
- private void DetailControl_RequestValidate()
+ private void DetailControl_RequestValidate(bool showDialog)
{
- this.Validate(true, out _, out _);
+ this.Validate(showDialog, out _, out _);
}
private void Validate(bool showMessages, out List vViolations, out List vErrors)
@@ -793,6 +794,15 @@ namespace ENI2
List violations = new List();
ruleEngine.ValidateMessage(aMessage, out errors, out violations);
+ if (errors.Count > 0)
+ aMessage.ErrorCount = errors.Count;
+ else
+ aMessage.ErrorCount = null;
+ if (violations.Count > 0)
+ aMessage.ViolationCount = violations.Count;
+ else
+ aMessage.ViolationCount = null;
+
string messageGroup = this.MessageGroupForMessage(aMessage);
if (messageGroup != null)
@@ -1266,7 +1276,7 @@ namespace ENI2
this._violationListDialog.BringUp();
}
_violationListDialog.Violations = vViolations;
- }
+ }
if((vErrors.Count == 0) && (vViolations.Count == 0))
{
@@ -1278,7 +1288,7 @@ namespace ENI2
private void _errorListDialog_RefreshClicked()
{
- DetailControl_RequestValidate();
+ DetailControl_RequestValidate(true);
}
private void _errorListDialog_ErrorSelected(DatabaseEntity obj)
diff --git a/ENI2/DetailViewControls/OverViewDetailControl.xaml b/ENI2/DetailViewControls/OverViewDetailControl.xaml
index 931a9414..450dea5f 100644
--- a/ENI2/DetailViewControls/OverViewDetailControl.xaml
+++ b/ENI2/DetailViewControls/OverViewDetailControl.xaml
@@ -11,7 +11,7 @@
xmlns:data="clr-namespace:bsmd.database;assembly=bsmd.database"
xmlns:local="clr-namespace:ENI2.DetailViewControls"
mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="800">
+ d:DesignHeight="768" d:DesignWidth="1024">
+
+
@@ -175,9 +266,8 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -222,29 +381,29 @@
+
+
+
+
+
+
+
+
+
+
+ -->
+
+
+
+
+
+
+
+
+
+
+ -->
@@ -257,6 +416,7 @@
+
@@ -269,41 +429,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
diff --git a/ENI2/DetailViewControls/OverViewDetailControl.xaml.cs b/ENI2/DetailViewControls/OverViewDetailControl.xaml.cs
index e1d4ca77..11506cc7 100644
--- a/ENI2/DetailViewControls/OverViewDetailControl.xaml.cs
+++ b/ENI2/DetailViewControls/OverViewDetailControl.xaml.cs
@@ -30,6 +30,9 @@ namespace ENI2.DetailViewControls
///
public partial class OverViewDetailControl : DetailBaseControl
{
+
+ #region Fields
+
private Message _message = null;
private Message _ataMessage;
private Message _atdMessage;
@@ -39,12 +42,20 @@ namespace ENI2.DetailViewControls
private readonly object _collectionLock = new object();
// private MessageSendStatusDialog mssd = null;
+ #endregion
+
+ #region Construction
+
public OverViewDetailControl()
{
InitializeComponent();
this.Loaded += OverViewDetailControl_Loaded;
}
+ #endregion
+
+ #region Initialize
+
private void OverViewDetailControl_Loaded(object sender, RoutedEventArgs e)
{
// die Controls nach Änderungen monitoren
@@ -53,7 +64,7 @@ namespace ENI2.DetailViewControls
this.textBoxDisplayId.TextChanged += CoreTextBox_TextChanged;
this.textBoxIMO.TextChanged += CoreTextBox_TextChanged;
this.textBoxENI.TextChanged += CoreTextBox_TextChanged;
- this.locodePoC.PropertyChanged += CoreLocode_LocodeChanged;
+ this.locodePoC.PropertyChanged += CoreLocode_LocodeChanged;
this.RegisterDateTimePickerChange(this.dateTimePickerATA, Message.NotificationClass.ATA);
this.RegisterDateTimePickerChange(this.dateTimePickerATD, Message.NotificationClass.ATD);
@@ -61,18 +72,6 @@ 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()
{
bool iAmAdmin = DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].IsAdmin;
@@ -317,7 +316,9 @@ namespace ENI2.DetailViewControls
BindingOperations.EnableCollectionSynchronization(this.Messages, _collectionLock);
this.dataGridMessages.ItemsSource = this.Messages;
-
+
+ this.OnRequestValidate(false);
+
base.Initialize(); // wenn Meldeklassen erst bei der Init. erzeugt werden, fehlen die Handler, die hier erneut festgelegt werden
this._initialized = true;
}
@@ -623,6 +624,16 @@ namespace ENI2.DetailViewControls
#region event handler
+ private void CoreLocode_LocodeChanged(object sender, PropertyChangedEventArgs e)
+ {
+ this.OnNotificationClassChanged(null);
+ }
+
+ private void CoreTextBox_TextChanged(object sender, TextChangedEventArgs e)
+ {
+ this.OnNotificationClassChanged(null);
+ }
+
private void _checkStatusTimer_Elapsed(object sender, ElapsedEventArgs e)
{
bool? statusFlag = DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).GetMessageCoreQueryStatusFlag(this.Core.Id.Value);
@@ -731,7 +742,7 @@ namespace ENI2.DetailViewControls
private void buttonValidate_Click(object sender, RoutedEventArgs e)
{
- this.OnRequestValidate();
+ this.OnRequestValidate(true);
}
///
@@ -761,7 +772,7 @@ namespace ENI2.DetailViewControls
this.OnRequestReload(this.Core.Id.Value);
// validate all selected import classes (Finger with "selection")
- this.OnRequestValidate();
+ this.OnRequestValidate(true);
}
else
@@ -815,7 +826,12 @@ namespace ENI2.DetailViewControls
}
}
- #endregion
-
+ private void buttonSendAll_Click(object sender, RoutedEventArgs e)
+ {
+ // TBD
+ }
+
+ #endregion
+
}
}
diff --git a/ENI2/Properties/Resources.Designer.cs b/ENI2/Properties/Resources.Designer.cs
index 72b7ddcf..24ce9ab7 100644
--- a/ENI2/Properties/Resources.Designer.cs
+++ b/ENI2/Properties/Resources.Designer.cs
@@ -2947,6 +2947,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to ENI-Status.
+ ///
+ public static string textENIStatus {
+ get {
+ return ResourceManager.GetString("textENIStatus", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to entries.
///
@@ -4324,6 +4333,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to NSW-Status.
+ ///
+ public static string textNSWStatus {
+ get {
+ return ResourceManager.GetString("textNSWStatus", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Number of deaths.
///
@@ -5305,6 +5323,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Send all.
+ ///
+ public static string textSendAll {
+ get {
+ return ResourceManager.GetString("textSendAll", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Send date.
///
diff --git a/ENI2/Properties/Resources.resx b/ENI2/Properties/Resources.resx
index c641b5da..4aef90f8 100644
--- a/ENI2/Properties/Resources.resx
+++ b/ENI2/Properties/Resources.resx
@@ -2248,4 +2248,13 @@
Waste disposal service provider
+
+ Send all
+
+
+ ENI-Status
+
+
+ NSW-Status
+
\ No newline at end of file
diff --git a/bsmd.database/Message.cs b/bsmd.database/Message.cs
index e2d0a638..8a3be9b7 100644
--- a/bsmd.database/Message.cs
+++ b/bsmd.database/Message.cs
@@ -406,6 +406,16 @@ namespace bsmd.database
///
public int? FileSequenceNumber { get; set; }
+ ///
+ /// Number of violations during last validation
+ ///
+ public int? ViolationCount { get; set; }
+
+ ///
+ /// Number of errors during last validation
+ ///
+ public int? ErrorCount { get; set; }
+
#endregion
#region IDatabaseEntity implementation