diff --git a/ENI2/App.config b/ENI2/App.config index 19aba5a3..45b58b7c 100644 --- a/ENI2/App.config +++ b/ENI2/App.config @@ -12,7 +12,7 @@ - + @@ -36,7 +36,7 @@ - + diff --git a/ENI2/DetailRootControl.xaml.cs b/ENI2/DetailRootControl.xaml.cs index db5af5e2..4f559589 100644 --- a/ENI2/DetailRootControl.xaml.cs +++ b/ENI2/DetailRootControl.xaml.cs @@ -750,7 +750,7 @@ namespace ENI2 vViolations.AddRange(violations); } - #region 12.11.18 / 6.3.21 / 23.5.22: globale Plausi-Prüfungen + #region 12.11.18 / 6.3.21 / 23.5.22 / 26.10.24: globale Plausi-Prüfungen Message crewaMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.CREWA); Message crewdMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.CREWD); @@ -764,6 +764,8 @@ namespace ENI2 Message was_rcptMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.WAS_RCPT); Message wasMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.WAS); Message servMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.SERV); + Message statMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.STAT); + Message pre72hMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.PRE72H); #region CREW / PAS Count Plausibility @@ -1117,6 +1119,20 @@ namespace ENI2 #endregion + #region Tanker validation STAT/PRE72H + + if ((statMessage.Elements[0] is STAT stat) && (pre72hMessage.Elements[0] is PRE72H pre72h)) + { + if((pre72h.Tanker ?? false) != (stat.IsTanker ?? false)) + { + MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.LIST_EMPTY, "Tanker: Please check PRE72H / STAT", null, "PRE72H / STAT", null, "STAT"); + mv.MessageGroupName = Properties.Resources.textPortNotification; + vViolations.Add(mv); + } + } + + #endregion + #endregion foreach (MessageError me in vErrors) diff --git a/ENI2/DetailViewControls/WasteDetailControl.xaml.cs b/ENI2/DetailViewControls/WasteDetailControl.xaml.cs index 08bb0c24..871b5212 100644 --- a/ENI2/DetailViewControls/WasteDetailControl.xaml.cs +++ b/ENI2/DetailViewControls/WasteDetailControl.xaml.cs @@ -14,6 +14,7 @@ using System.IO; using System; using Microsoft.Win32; using System.Diagnostics; +using System.Threading.Tasks; namespace ENI2.DetailViewControls { @@ -178,7 +179,7 @@ namespace ENI2.DetailViewControls #region init WSDP provider - InitTemplates(); + await InitTemplates(); this.comboBox_WSDPTemplate.ItemsSource = _wsdpTemplates; @@ -188,7 +189,7 @@ namespace ENI2.DetailViewControls #region Waste receipt grid event handler - private void DataGridWasteReceipt_CreateRequested() + private async void DataGridWasteReceipt_CreateRequested() { EditWasteReceiptDialog epd = new EditWasteReceiptDialog(); epd.WAS_RCPT = new WAS_RCPT(); @@ -219,7 +220,8 @@ namespace ENI2.DetailViewControls this.dataGridWasteReceived.ItemsSource = null; dataGridWasteReceipt_SelectionChanged(this, null); } - InitTemplates(); // templates might have changed in the dialog + + await InitTemplates(); // templates might have changed in the dialog } private void DataGridWasteReceipt_DeleteRequested(DatabaseEntity obj) @@ -238,7 +240,7 @@ namespace ENI2.DetailViewControls } } - private void DataGridWasteReceipt_EditRequested(DatabaseEntity obj) + private async void DataGridWasteReceipt_EditRequested(DatabaseEntity obj) { EditWasteReceiptDialog epd = new EditWasteReceiptDialog(); epd.WAS_RCPT = obj as WAS_RCPT; @@ -265,7 +267,7 @@ namespace ENI2.DetailViewControls this.dataGridWasteReceipt.Items.Refresh(); this.SublistElementChanged(Message.NotificationClass.WAS_RCPT); dataGridWasteReceipt_SelectionChanged(this, null); - InitTemplates(); // templates might have changed in the dialog + await InitTemplates(); // templates might have changed in the dialog } private void DataGridWasteReceipt_AddingNewItem(object sender, AddingNewItemEventArgs e) @@ -595,10 +597,11 @@ namespace ENI2.DetailViewControls #endregion + #region Waste disposal Service Provider templates event handler - private async void InitTemplates() + private async Task InitTemplates() { _wsdpTemplates = await DBManagerAsync.GetWastDisposalServiceProviderTemplatesAsync(); _wsdpTemplates.Sort(); diff --git a/ENI2/ENI2.csproj b/ENI2/ENI2.csproj index 714c715e..44086faf 100644 --- a/ENI2/ENI2.csproj +++ b/ENI2/ENI2.csproj @@ -30,14 +30,14 @@ true http://192.168.2.24/eni2.publish/ http://www.textbausteine.net/ - ENI 2 + ENI Informatikbüro Daniel Schick NSW 5.4.0.0 true publish.html - 6 - 7.2.4.6 + 3 + 7.2.5.3 false true true diff --git a/ENI2/EditControls/EditWasteDialog.xaml b/ENI2/EditControls/EditWasteDialog.xaml index 33f929b9..11f36572 100644 --- a/ENI2/EditControls/EditWasteDialog.xaml +++ b/ENI2/EditControls/EditWasteDialog.xaml @@ -38,11 +38,11 @@