diff --git a/Stundensheet.xlsx b/Stundensheet.xlsx index 12b944a1..28bf9e50 100644 Binary files a/Stundensheet.xlsx and b/Stundensheet.xlsx differ diff --git a/nsw/HIS-NORD/Transmitter-Tool/client.log b/nsw/HIS-NORD/Transmitter-Tool/client.log index 23568ae1..87eb42ec 100644 --- a/nsw/HIS-NORD/Transmitter-Tool/client.log +++ b/nsw/HIS-NORD/Transmitter-Tool/client.log @@ -196,3 +196,18 @@ ----------------------------- 18.11.2015 07:43:31 20151118074325-ad8761c2-bfbe-4afc-a9f5-004ab739ebd2.xml(28,61 kB) - Transfer successful 18.11.2015 07:43:31 No more Answers + ----------------------------- +10.12.2015 20:18:57 Client started + ----------------------------- +10.12.2015 20:18:57 No files to send +10.12.2015 20:18:58 Getting Answers +10.12.2015 20:18:58 Filename: DEEME-2015-DYCIOJ_VISIT.xml +10.12.2015 20:18:58 Filesize: 133(133 B) +10.12.2015 20:18:58 PACKETSIZE: 500 +10.12.2015 20:18:58 Tiles: 1 +10.12.2015 20:18:58 Getting Answers +10.12.2015 20:18:59 Filename: DEEME-2015-IDUQJU_VISIT.xml +10.12.2015 20:18:59 Filesize: 100(100 B) +10.12.2015 20:18:59 PACKETSIZE: 500 +10.12.2015 20:18:59 Tiles: 1 +10.12.2015 20:18:59 No more Answers diff --git a/nsw/Source/SQL/Update_2.4_To_2.4.14.sql b/nsw/Source/SQL/Update_2.4_To_2.4.14.sql new file mode 100644 index 00000000..919faa5e --- /dev/null +++ b/nsw/Source/SQL/Update_2.4_To_2.4.14.sql @@ -0,0 +1,13 @@ +ALTER TABLE [dbo].[Error] + ADD [Created] DATETIME DEFAULT (getdate()) NULL, + [Deleted] INT DEFAULT 0 NULL; + + +GO + +ALTER TABLE [dbo].[Violation] + ADD [Created] DATETIME DEFAULT (getdate()) NULL, + [Deleted] INT DEFAULT 0 NULL; + + +GO \ No newline at end of file diff --git a/nsw/Source/SendNSWMessageService/NSWSendService.cs b/nsw/Source/SendNSWMessageService/NSWSendService.cs index 53217854..f79d5004 100644 --- a/nsw/Source/SendNSWMessageService/NSWSendService.cs +++ b/nsw/Source/SendNSWMessageService/NSWSendService.cs @@ -148,7 +148,7 @@ namespace SendNSWMessageService if ((message.MessageNotificationClass == Message.NotificationClass.VISIT) || (message.MessageNotificationClass == Message.NotificationClass.TRANSIT)) continue; - + /* // Wenn kein Gefahrgut gemeldet ist soll die Meldeklasse gar nicht gesendet werden if((message.MessageNotificationClass == Message.NotificationClass.HAZA) || (message.MessageNotificationClass == Message.NotificationClass.HAZD)) @@ -187,7 +187,7 @@ namespace SendNSWMessageService if ((DateTime.UtcNow - ata.ATAPortOfCall.Value).TotalDays > 7) continue; } } - + */ if ((message.InternalStatus != Message.BSMDStatus.CONFIRMED) && (message.InternalStatus != Message.BSMDStatus.SENT)) diff --git a/nsw/Source/bsmd.ExcelReadService/ExcelReader.cs b/nsw/Source/bsmd.ExcelReadService/ExcelReader.cs index b61dbeb1..2b35c831 100644 --- a/nsw/Source/bsmd.ExcelReadService/ExcelReader.cs +++ b/nsw/Source/bsmd.ExcelReadService/ExcelReader.cs @@ -48,6 +48,8 @@ namespace bsmd.ExcelReadService return cellValue; } + + public void Dispose() { if (this.dataReader != null) diff --git a/nsw/Source/bsmd.ReportGenerator/BSMDDocument.cs b/nsw/Source/bsmd.ReportGenerator/BSMDDocument.cs index 335bb032..9d2eb229 100644 --- a/nsw/Source/bsmd.ReportGenerator/BSMDDocument.cs +++ b/nsw/Source/bsmd.ReportGenerator/BSMDDocument.cs @@ -158,7 +158,11 @@ namespace bsmd.ReportGenerator paragraph = section.AddParagraph("Rendering date: "); paragraph.AddDateField(); - paragraph.Format.SpaceAfter = Unit.FromCentimeter(2); + + paragraph = section.AddParagraph("Note: Timezone for all values is assumed as UTC!"); + paragraph.Format.Font.Size = 12; + paragraph.Format.Font.Bold = true; + paragraph.Format.SpaceAfter = Unit.FromCentimeter(1.5); Table table = document.LastSection.AddTable(); table.Format.Font.Size = 14; diff --git a/nsw/Source/bsmd.dakosy.ResponseService/App.config b/nsw/Source/bsmd.dakosy.ResponseService/App.config index 5dd525f4..d294fa90 100644 --- a/nsw/Source/bsmd.dakosy.ResponseService/App.config +++ b/nsw/Source/bsmd.dakosy.ResponseService/App.config @@ -11,7 +11,7 @@ - Data Source=192.168.2.5\SQLEXPRESS;Initial Catalog=nsw;Integrated Security=False;User ID=dfuser;Password=dfpasswd;Connect Timeout=15;Encrypt=False;TrustServerCertificate=False + Data Source=(localdb)\Projects;Initial Catalog=nsw;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=FalseData Source=(localdb)\Projects;Initial Catalog=nsw;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False 300 diff --git a/nsw/Source/bsmd.dakosy.ResponseService/Properties/Settings.Designer.cs b/nsw/Source/bsmd.dakosy.ResponseService/Properties/Settings.Designer.cs index ba2e7d39..118c278a 100644 --- a/nsw/Source/bsmd.dakosy.ResponseService/Properties/Settings.Designer.cs +++ b/nsw/Source/bsmd.dakosy.ResponseService/Properties/Settings.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34209 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -25,9 +25,7 @@ namespace bsmd.dakosy.ResponseService.Properties { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("Data Source=192.168.2.5\\SQLEXPRESS;Initial Catalog=nsw;Integrated Security=False;" + - "User ID=dfuser;Password=dfpasswd;Connect Timeout=15;Encrypt=False;TrustServerCer" + - "tificate=False")] + [global::System.Configuration.DefaultSettingValueAttribute(@"Data Source=(localdb)\Projects;Initial Catalog=nsw;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=FalseData Source=(localdb)\Projects;Initial Catalog=nsw;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False")] public string ConnectionString { get { return ((string)(this["ConnectionString"])); diff --git a/nsw/Source/bsmd.dakosy.ResponseService/Properties/Settings.settings b/nsw/Source/bsmd.dakosy.ResponseService/Properties/Settings.settings index f5efa586..cb78e5e5 100644 --- a/nsw/Source/bsmd.dakosy.ResponseService/Properties/Settings.settings +++ b/nsw/Source/bsmd.dakosy.ResponseService/Properties/Settings.settings @@ -3,7 +3,7 @@ - Data Source=192.168.2.5\SQLEXPRESS;Initial Catalog=nsw;Integrated Security=False;User ID=dfuser;Password=dfpasswd;Connect Timeout=15;Encrypt=False;TrustServerCertificate=False + Data Source=(localdb)\Projects;Initial Catalog=nsw;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=FalseData Source=(localdb)\Projects;Initial Catalog=nsw;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False 300 diff --git a/nsw/Source/bsmd.dakosy/Properties/Settings.Designer.cs b/nsw/Source/bsmd.dakosy/Properties/Settings.Designer.cs index 14896334..e1db6ca5 100644 --- a/nsw/Source/bsmd.dakosy/Properties/Settings.Designer.cs +++ b/nsw/Source/bsmd.dakosy/Properties/Settings.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34209 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -85,7 +85,7 @@ namespace bsmd.dakosy.Properties { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("E:\\Tools\\WinScp\\WinSCP.exe")] + [global::System.Configuration.DefaultSettingValueAttribute("E:\\Tools\\WinScp\\WinSCP.com")] public string WINSCPFullPath { get { return ((string)(this["WINSCPFullPath"])); @@ -97,7 +97,7 @@ namespace bsmd.dakosy.Properties { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("out/prod")] + [global::System.Configuration.DefaultSettingValueAttribute("in/prod/ed02")] public string RemoteProdIncomingDir { get { return ((string)(this["RemoteProdIncomingDir"])); @@ -109,7 +109,7 @@ namespace bsmd.dakosy.Properties { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("out/test")] + [global::System.Configuration.DefaultSettingValueAttribute("in/test/ed02")] public string RemoteTestIncomingDir { get { return ((string)(this["RemoteTestIncomingDir"])); @@ -121,7 +121,7 @@ namespace bsmd.dakosy.Properties { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("in/prod/ed02")] + [global::System.Configuration.DefaultSettingValueAttribute("out/prod")] public string RemoteProdOutgoingDir { get { return ((string)(this["RemoteProdOutgoingDir"])); @@ -133,7 +133,7 @@ namespace bsmd.dakosy.Properties { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("in/test/ed02")] + [global::System.Configuration.DefaultSettingValueAttribute("out/test")] public string RemoteTestOutgoingDir { get { return ((string)(this["RemoteTestOutgoingDir"])); diff --git a/nsw/Source/bsmd.dakosy/Properties/Settings.settings b/nsw/Source/bsmd.dakosy/Properties/Settings.settings index ba75320f..b36bdf41 100644 --- a/nsw/Source/bsmd.dakosy/Properties/Settings.settings +++ b/nsw/Source/bsmd.dakosy/Properties/Settings.settings @@ -18,19 +18,19 @@ True - E:\Tools\WinScp\WinSCP.exe + E:\Tools\WinScp\WinSCP.com - out/prod - - - out/test - - in/prod/ed02 - + in/test/ed02 + + out/prod + + + out/test + \ No newline at end of file diff --git a/nsw/Source/bsmd.dakosy/Request.cs b/nsw/Source/bsmd.dakosy/Request.cs index 41aa42e1..b35ab67d 100644 --- a/nsw/Source/bsmd.dakosy/Request.cs +++ b/nsw/Source/bsmd.dakosy/Request.cs @@ -21,16 +21,20 @@ namespace bsmd.dakosy { private static ILog _log = LogManager.GetLogger(typeof(Request)); - public static bool Send(DatabaseEntity dbEntity) + public static bool Send(Message aMessage) { bool retval = true; try { + /* Message aMessage = null; if (dbEntity.GetType().IsAssignableFrom(typeof(Message))) aMessage = (Message)dbEntity; else aMessage = dbEntity.MessageHeader; + */ + + if (!XtraSendLogic.ShouldSendMessage(aMessage)) return false; // fill eDeclaration class eDeclarationMessage edm = new eDeclarationMessage(); @@ -700,11 +704,14 @@ namespace bsmd.dakosy vList.Visit[0].STAT.ISMCompany.IsmCompanyName = stat.ISMCompanyName; vList.Visit[0].STAT.ISMCompany.IsmCompanyId = stat.ISMCompanyId; vList.Visit[0].STAT.ISMCompany.IsmCompanyPostalCode = stat.ISMCompanyPostalCode; - int lastBlank = stat.ISMCompanyStreetAndNumber.LastIndexOf(' '); - if (lastBlank > 0) + if (stat.ISMCompanyStreetAndNumber != null) { - vList.Visit[0].STAT.ISMCompany.IsmCompanyStreetName = stat.ISMCompanyStreetAndNumber.Substring(0, lastBlank); - vList.Visit[0].STAT.ISMCompany.IsmCompanyStreetNumber = stat.ISMCompanyStreetAndNumber.Substring(lastBlank); + int lastBlank = stat.ISMCompanyStreetAndNumber.LastIndexOf(' '); + if (lastBlank > 0) + { + vList.Visit[0].STAT.ISMCompany.IsmCompanyStreetName = stat.ISMCompanyStreetAndNumber.Substring(0, lastBlank); + vList.Visit[0].STAT.ISMCompany.IsmCompanyStreetNumber = stat.ISMCompanyStreetAndNumber.Substring(lastBlank); + } } vList.Visit[0].STAT.ISMCompany.IsmCompanyCity = stat.ISMCompanyCity; vList.Visit[0].STAT.ISMCompany.IsmCompanyCountry = stat.ISMCompanyCountry; diff --git a/nsw/Source/bsmd.dakosy/app.config b/nsw/Source/bsmd.dakosy/app.config index 753d9e22..98b617e2 100644 --- a/nsw/Source/bsmd.dakosy/app.config +++ b/nsw/Source/bsmd.dakosy/app.config @@ -23,20 +23,20 @@ True - E:\Tools\WinScp\WinSCP.exe + E:\Tools\WinScp\WinSCP.com - out/prod - - - out/test - - in/prod/ed02 - + in/test/ed02 + + out/prod + + + out/test + \ No newline at end of file diff --git a/nsw/Source/bsmd.database/DBManager.cs b/nsw/Source/bsmd.database/DBManager.cs index 52cdd6e2..68bc409d 100644 --- a/nsw/Source/bsmd.database/DBManager.cs +++ b/nsw/Source/bsmd.database/DBManager.cs @@ -266,7 +266,7 @@ namespace bsmd.database public void DeleteMessageErrors(Message message) { SqlCommand cmd = new SqlCommand(); - cmd.CommandText = string.Format("DELETE FROM Error WHERE MessageHeaderId='{0}'", message.Id); + cmd.CommandText = string.Format("UPDATE Error SET Deleted = 1 WHERE MessageHeaderId='{0}'", message.Id); int queryResult = this.PerformNonQuery(cmd); this.LogNonQueryResult(cmd.CommandText, queryResult); } @@ -274,7 +274,7 @@ namespace bsmd.database public void DeleteMessageViolations(Message message) { SqlCommand cmd = new SqlCommand(); - cmd.CommandText = string.Format("DELETE FROM Violation WHERE MessageHeaderId='{0}'", message.Id); + cmd.CommandText = string.Format("UPDATE Violation SET Deleted = 1 WHERE MessageHeaderId='{0}'", message.Id); int queryResult = this.PerformNonQuery(cmd); this.LogNonQueryResult(cmd.CommandText, queryResult); } diff --git a/nsw/Source/bsmd.database/MessageError.cs b/nsw/Source/bsmd.database/MessageError.cs index 10611d76..7a068e13 100644 --- a/nsw/Source/bsmd.database/MessageError.cs +++ b/nsw/Source/bsmd.database/MessageError.cs @@ -30,6 +30,8 @@ namespace bsmd.database public Guid MessageHeaderId { get; set; } + public bool Deleted { get; set; } + #endregion #region IDatabaseEntity implementation @@ -41,6 +43,7 @@ namespace bsmd.database scmd.Parameters.AddWithValue("@MHID", this.MessageHeaderId); scmd.Parameters.AddWithValue("@VC", this.ErrorCode); scmd.Parameters.AddWithValue("@VT", this.ErrorText); + scmd.Parameters.AddWithValue("@DEL", this.Deleted ? 1 : 0); if (this.IsNew) { @@ -49,13 +52,13 @@ namespace bsmd.database else { scmd.Parameters.AddWithValue("@ID", this.Id); - scmd.CommandText = string.Format("UPDATE {0} SET MessageHeaderId = @MHID, ErrorCode = @VC, ErrorText = @VT WHERE Id = @ID", this.Tablename); + scmd.CommandText = string.Format("UPDATE {0} SET MessageHeaderId = @MHID, ErrorCode = @VC, ErrorText = @VT, Deleted = @DEL WHERE Id = @ID", this.Tablename); } } public override void PrepareLoadCommand(System.Data.IDbCommand cmd, Message.LoadFilter filter, params object[] criteria) { - string query = string.Format("SELECT Id, ErrorCode, ErrorText FROM {0} ", this.Tablename); + string query = string.Format("SELECT Id, ErrorCode, ErrorText, Deleted FROM {0} ", this.Tablename); switch (filter) { @@ -80,6 +83,7 @@ namespace bsmd.database me.id = reader.GetGuid(0); if (!reader.IsDBNull(1)) me.ErrorCode = reader.GetInt32(1); if (!reader.IsDBNull(2)) me.ErrorText = reader.GetString(2); + if (!reader.IsDBNull(3)) me.Deleted = (reader.GetInt32(3) != 0); result.Add(me); } reader.Close(); diff --git a/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs b/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs index deafbff3..c3704cf5 100644 --- a/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs +++ b/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs @@ -2,6 +2,6 @@ [assembly: AssemblyCompany("Informatikbüro Daniel Schick")] [assembly: AssemblyProduct("BSMD NSW interface")] -[assembly: AssemblyInformationalVersion("2.4.13")] +[assembly: AssemblyInformationalVersion("2.4.14")] [assembly: AssemblyCopyright("Copyright © 2014-2015 Informatikbüro Daniel Schick. All rights reserved.")] [assembly: AssemblyTrademark("")] \ No newline at end of file diff --git a/nsw/Source/bsmd.database/Properties/AssemblyProjectInfo.cs b/nsw/Source/bsmd.database/Properties/AssemblyProjectInfo.cs index 57267874..fe51d802 100644 --- a/nsw/Source/bsmd.database/Properties/AssemblyProjectInfo.cs +++ b/nsw/Source/bsmd.database/Properties/AssemblyProjectInfo.cs @@ -1,4 +1,4 @@ using System.Reflection; -[assembly: AssemblyVersion("2.4.13.*")] +[assembly: AssemblyVersion("2.4.14.*")] diff --git a/nsw/Source/bsmd.database/XtraSendLogic.cs b/nsw/Source/bsmd.database/XtraSendLogic.cs new file mode 100644 index 00000000..4e15dc70 --- /dev/null +++ b/nsw/Source/bsmd.database/XtraSendLogic.cs @@ -0,0 +1,89 @@ +// +// Class: XtraSendLogic +// Current CLR: 4.0.30319.42000 +// System: Microsoft Visual Studio 10.0 +// Author: dani +// Created: 11/30/2015 7:48:46 AM +// +// Copyright (c) 2015 Informatikbüro Daniel Schick. All rights reserved. + +using System; +using System.Collections.Generic; + + +namespace bsmd.database +{ + public class XtraSendLogic + { + /// + /// Diese Methode entscheidet, ob die Nachrichtenklasse versendet werden soll oder nicht + /// Darin sind einige spezielle Festlegungen implementiert, die aus der Integrationsphase + /// kommen + /// + /// true falls Nachricht versendet werden soll + public static bool ShouldSendMessage(Message message) + { + + // Wenn das ein Transit ist, werden nicht erforderliche Meldeklassen übersprungen + if (message.MessageCore.IsTransit) + { + if ((message.MessageNotificationClass == Message.NotificationClass.BKRD) || + (message.MessageNotificationClass == Message.NotificationClass.PRE72H) || + (message.MessageNotificationClass == Message.NotificationClass.TIEFD) || + (message.MessageNotificationClass == Message.NotificationClass.NAME) || + (message.MessageNotificationClass == Message.NotificationClass.INFO) || + (message.MessageNotificationClass == Message.NotificationClass.ATA) || + (message.MessageNotificationClass == Message.NotificationClass.ATD) || + (message.MessageNotificationClass == Message.NotificationClass.LADG) || + (message.MessageNotificationClass == Message.NotificationClass.SERV) || + (message.MessageNotificationClass == Message.NotificationClass.WAS) || + (message.MessageNotificationClass == Message.NotificationClass.TOWD)) + return false; + } + + // Wenn kein Gefahrgut gemeldet ist soll die Meldeklasse gar nicht gesendet werden + if ((message.MessageNotificationClass == Message.NotificationClass.HAZA) || + (message.MessageNotificationClass == Message.NotificationClass.HAZD)) + { + if (message.Elements.Count > 0) + { + HAZ haz = message.Elements[0] as HAZ; + if (haz != null) + { + if (haz.NoDPGOnBoardOnArrival ?? false) return false; + // Diese Einstellung wird im EU-NOAD Tool gemacht, muss bei anderen Quellen überarbeitet werden! + if (haz.TransmissionType != "EU-NOAD") return false; + // Schiffe nach Hamburg keine Gefahrgutmeldung, geht über GEGIS (26.11.2015) + if (message.MessageCore.PoC.Equals("DEHAM")) return false; + } + } + } + + // ATD wird nur gesendet, wenn weniger als 60 Minuten in der Zukunft + // und auch nicht älter als eine Woche + if (message.MessageNotificationClass == Message.NotificationClass.ATD) + { + if (message.Elements.Count > 0) + { + bsmd.database.ATD atd = message.Elements[0] as bsmd.database.ATD; + if (!atd.ATDPortOfCall.HasValue) return false; + if ((atd.ATDPortOfCall.Value - DateTime.UtcNow).TotalMinutes > 60) return false; + if ((DateTime.UtcNow - atd.ATDPortOfCall.Value).TotalDays > 7) return false; + } + } + + // ATA älter als eine Woche wird auch nicht versendet + if (message.MessageNotificationClass == Message.NotificationClass.ATA) + { + if (message.Elements.Count > 0) + { + bsmd.database.ATA ata = message.Elements[0] as bsmd.database.ATA; + if (!ata.ATAPortOfCall.HasValue) return false; + if ((DateTime.UtcNow - ata.ATAPortOfCall.Value).TotalDays > 7) return false; + } + } + + return true; + } + } +} diff --git a/nsw/Source/bsmd.database/bsmd.database.csproj b/nsw/Source/bsmd.database/bsmd.database.csproj index 00a53a1d..74bfa4fb 100644 --- a/nsw/Source/bsmd.database/bsmd.database.csproj +++ b/nsw/Source/bsmd.database/bsmd.database.csproj @@ -112,6 +112,7 @@ + diff --git a/nsw/Source/bsmd.dbh/Request.cs b/nsw/Source/bsmd.dbh/Request.cs index c93575f4..d4238877 100644 --- a/nsw/Source/bsmd.dbh/Request.cs +++ b/nsw/Source/bsmd.dbh/Request.cs @@ -41,6 +41,8 @@ namespace bsmd.dbh return false; } + if (!XtraSendLogic.ShouldSendMessage(message)) return false; + // map message to dbh NSWRequest object Dbh_Osis_Answ_Ws client = new Dbh_Osis_Answ_Ws(); diff --git a/nsw/Source/bsmd.herberg.FormService/Util.cs b/nsw/Source/bsmd.herberg.FormService/Util.cs index 344725e7..b57f658a 100644 --- a/nsw/Source/bsmd.herberg.FormService/Util.cs +++ b/nsw/Source/bsmd.herberg.FormService/Util.cs @@ -1006,7 +1006,9 @@ namespace bsmd.herberg.FormService { foreach (Waste existingWaste in was.Waste) { - if ((existingWaste.WasteType ?? 0) == (Enums.ParseWasteType(wDict["WasteType"]) ?? 0)) + if (wDict.ContainsKey("WasteType") && + ((existingWaste.WasteType ?? 0) == (Enums.ParseWasteType(wDict["WasteType"]) ?? 0)) + ) { waste = existingWaste; break; diff --git a/nsw/Source/bsmd.hisnord/Request.cs b/nsw/Source/bsmd.hisnord/Request.cs index 216c4a4f..01d97418 100644 --- a/nsw/Source/bsmd.hisnord/Request.cs +++ b/nsw/Source/bsmd.hisnord/Request.cs @@ -91,6 +91,8 @@ namespace bsmd.hisnord foreach (Message message in messages) { + if (!XtraSendLogic.ShouldSendMessage(message)) continue; + switch (message.MessageNotificationClass) { case Message.NotificationClass.VISIT: diff --git a/nsw/Source/misc/NSW_Software_Dokumentation.docx b/nsw/Source/misc/NSW_Software_Dokumentation.docx new file mode 100644 index 00000000..8862924a Binary files /dev/null and b/nsw/Source/misc/NSW_Software_Dokumentation.docx differ