diff --git a/Stundensheet.xlsx b/Stundensheet.xlsx index 731f69a3..ea1210b8 100644 Binary files a/Stundensheet.xlsx and b/Stundensheet.xlsx differ diff --git a/nsw/Source/SendNSWMessageService/NSWSendService.cs b/nsw/Source/SendNSWMessageService/NSWSendService.cs index 96e19762..ee98edf3 100644 --- a/nsw/Source/SendNSWMessageService/NSWSendService.cs +++ b/nsw/Source/SendNSWMessageService/NSWSendService.cs @@ -87,7 +87,7 @@ namespace SendNSWMessageService if (core.InitialHIS == Message.NSWProvider.DUDR) { - // Rostocker: wir senden alle Nachrichten auf einmal + // HIS-NORD: alles auf einmal sendSucceeded = bsmd.hisnord.Request.Send(messages); if (!sendSucceeded) core.BSMDStatusInternal = MessageCore.BSMDStatus.FAILURE; @@ -133,9 +133,13 @@ namespace SendNSWMessageService foreach (Message message in messages) { + // Eine Nachricht mit dem Status "Suspended / Zurückgestellt" wird so lange nicht + // versendet, bis im ENI der Status wieder explizit zurückgesetzt wird (16.4.16) + if (message.InternalStatus == Message.BSMDStatus.SUSPENDED) continue; + // Wenn das ein Transit ist, werden nicht erforderliche Meldeklassen übersprungen if (core.IsTransit) - { + { if ((message.MessageNotificationClass == Message.NotificationClass.BKRD) || (message.MessageNotificationClass == Message.NotificationClass.PRE72H) || (message.MessageNotificationClass == Message.NotificationClass.TIEFD) || @@ -153,47 +157,7 @@ namespace SendNSWMessageService // Visit/Transit Meldeklassen werden nicht erneut übertragen 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)) - { - if (message.Elements.Count > 0) - { - HAZ haz = message.Elements[0] as HAZ; - if (haz != null) - { - if (haz.NoDPGOnBoardOnArrival ?? false) continue; - if (haz.TransmissionType != "EU-NOAD") continue; - } - } - } - - // 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) continue; - if ((atd.ATDPortOfCall.Value - DateTime.UtcNow).TotalMinutes > 60) continue; - if ((DateTime.UtcNow - atd.ATDPortOfCall.Value).TotalDays > 7) continue; - } - } - - // 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) continue; - if ((DateTime.UtcNow - ata.ATAPortOfCall.Value).TotalDays > 7) continue; - } - } - */ + continue; if ((message.InternalStatus != Message.BSMDStatus.CONFIRMED) && (message.InternalStatus != Message.BSMDStatus.SENT)) @@ -224,20 +188,20 @@ namespace SendNSWMessageService // switch über passendes HIS / Schnittstelle switch (message.HIS) - { - // TODO: Das muss wieder entfernt werden wenn 3.0 funktional geht + { case Message.NSWProvider.DBH: case Message.NSWProvider.DBH_TEST: sendSucceeded = bsmd.dbh.Request.SendMessage(message, (message.HIS == Message.NSWProvider.DBH_TEST)); if (!sendSucceeded) message.InternalStatus = Message.BSMDStatus.SEND_FAILED; break; - /* + case Message.NSWProvider.DAKOSY: - sendSucceeded = bsmd.dakosy.Request.Send(message); + case Message.NSWProvider.DAKOSY_TEST: + sendSucceeded = bsmd.dakosy.Request.Send(message, true); if (!sendSucceeded) message.InternalStatus = Message.BSMDStatus.SEND_FAILED; - break; - */ + break; + default: _log.WarnFormat("Initial HIS not specified for message {0}", message.Id); break; diff --git a/nsw/Source/bsmd.ExcelReadService/App.config b/nsw/Source/bsmd.ExcelReadService/App.config index 0e3620b0..695aa4fa 100644 --- a/nsw/Source/bsmd.ExcelReadService/App.config +++ b/nsw/Source/bsmd.ExcelReadService/App.config @@ -31,6 +31,9 @@ Reference Excel Sheet + + True + \ No newline at end of file diff --git a/nsw/Source/bsmd.ExcelReadService/ExcelReadService.cs b/nsw/Source/bsmd.ExcelReadService/ExcelReadService.cs index d2b9f12a..7eb65f00 100644 --- a/nsw/Source/bsmd.ExcelReadService/ExcelReadService.cs +++ b/nsw/Source/bsmd.ExcelReadService/ExcelReadService.cs @@ -66,64 +66,77 @@ namespace bsmd.ExcelReadService try { string messageId = ""; - string attachmentLocalPath = ""; + string attachmentLocalPath = null; string mailSender = ""; using (BSMDPopClient bsmdPopClient = new BSMDPopClient()) { - // if (!bsmdPopClient.IsConnected) - //{ - // _log.Error("cannot connect to pop3 server, aborting!"); - // this.Stop(); - //} - - // --- BEGIN ------------ TEST - - ExcelReader er = new ExcelReader(@"E:\work\bsmd\nsw\Source\bsmd.ExcelReadService\2016_01_08_BMSD - EUNoAD Tool Rev 3.0_mit Testdaten.xls"); - string amsg; - MessageCore aCore; - bool aReadResult = Util.ProcessSheet(er, out amsg, out aCore); - er.Dispose(); - - // --- END --------------- TEST - - // check and download next e-Mail, saving attachment - while (bsmdPopClient.ReceiveSingleMail(out attachmentLocalPath, out messageId, out mailSender)) + if (!bsmdPopClient.IsConnected) + { + _log.Error("cannot connect to pop3 server!"); + } + else { - bool readResult; - string readMessage = ""; - MessageCore messageCore = null; - // try to read/import attachment - using(ExcelReader reader = new ExcelReader(attachmentLocalPath)) + // --- BEGIN ------------ TEST + + /* + ExcelReader er = new ExcelReader(@"E:\work\bsmd\nsw\Source\bsmd.ExcelReadService\2016_01_08_BMSD - EUNoAD Tool Rev 3.0_mit Testdaten.xls"); + string amsg; + MessageCore aCore; + bool aReadResult = Util.ProcessSheet(er, out amsg, out aCore); + er.Dispose(); + */ + + // --- END --------------- TEST + + // check and download next e-Mail, saving attachment + while (bsmdPopClient.ReceiveSingleMail(out attachmentLocalPath, out messageId, out mailSender)) { - readResult = Util.ProcessSheet(reader, out readMessage, out messageCore); - if(!readResult) - _log.Error("Excel sheet could not be interpreted"); + + bool readResult; + string readMessage = ""; + MessageCore messageCore = null; + + if (attachmentLocalPath == null) + { + _log.WarnFormat("incoming E-Mail did not contain an Excel attachment!"); + } + else + { + + // try to read/import attachment + using (ExcelReader reader = new ExcelReader(attachmentLocalPath)) + { + readResult = Util.ProcessSheet(reader, out readMessage, out messageCore); + if (!readResult) + _log.Error("Excel sheet could not be interpreted"); + } + + // TODO: Quittung / set messagecore to createreport and let reportGenerator create a reply? + + // create a reply sheet (template + scanned highlighted content for verification + + string confirmationExcelFilePath = Util.CreateConfirmationSheet(messageCore); + List sendItems = new List(); + sendItems.Add(confirmationExcelFilePath); + // send reply sheet back to sender + BSMDMail.SendNSWReportWithAttachments(Properties.Settings.Default.SendEMailSubject, sendItems); + + // remove e-Mail + _log.InfoFormat("deleting mail with messageId {0}", messageId); + _log.InfoFormat("mail delete {0}", bsmdPopClient.DeleteMessageByMessageId(messageId) ? "successful" : "failed"); + + // remove attachment + _log.InfoFormat("removing local file {0}", attachmentLocalPath); + + if(!Properties.Settings.Default.TestMode) + File.Delete(attachmentLocalPath); + } + + attachmentLocalPath = null; } - - // TODO: Quittung / set messagecore to createreport and let reportGenerator create a reply? - - // create a reply sheet (template + scanned highlighted content for verification - - string confirmationExcelFilePath = Util.CreateConfirmationSheet(messageCore); - List sendItems = new List(); - sendItems.Add(confirmationExcelFilePath); - // send reply sheet back to sender - BSMDMail.SendNSWReportWithAttachments(Properties.Settings.Default.SendEMailSubject, sendItems); - - // remove e-Mail - _log.InfoFormat("deleting mail with messageId {0}", messageId); - _log.InfoFormat("mail delete {0}", bsmdPopClient.DeleteMessageByMessageId(messageId) ? "successful" : "failed"); - - // remove attachment - _log.InfoFormat("removing local file {0}", attachmentLocalPath); - // File.Delete(attachmentLocalPath); - - - - } } @@ -135,9 +148,8 @@ namespace bsmd.ExcelReadService } } else - { - this.EventLog.WriteEntry("ReportService stopped: DB connection failed", EventLogEntryType.Error); - this.Stop(); + { + _log.Error("DB Connection failure"); } lock (this._timerlock) diff --git a/nsw/Source/bsmd.ExcelReadService/Properties/Settings.Designer.cs b/nsw/Source/bsmd.ExcelReadService/Properties/Settings.Designer.cs index 1186b7da..21c75b48 100644 --- a/nsw/Source/bsmd.ExcelReadService/Properties/Settings.Designer.cs +++ b/nsw/Source/bsmd.ExcelReadService/Properties/Settings.Designer.cs @@ -85,5 +85,14 @@ namespace bsmd.ExcelReadService.Properties { return ((string)(this["SendEMailSubject"])); } } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("True")] + public bool TestMode { + get { + return ((bool)(this["TestMode"])); + } + } } } diff --git a/nsw/Source/bsmd.ExcelReadService/Properties/Settings.settings b/nsw/Source/bsmd.ExcelReadService/Properties/Settings.settings index da840a0c..b387ba0c 100644 --- a/nsw/Source/bsmd.ExcelReadService/Properties/Settings.settings +++ b/nsw/Source/bsmd.ExcelReadService/Properties/Settings.settings @@ -23,5 +23,8 @@ Reference Excel Sheet + + True + \ No newline at end of file diff --git a/nsw/Source/bsmd.dakosy/Request.cs b/nsw/Source/bsmd.dakosy/Request.cs index 2a8641d5..a32edcac 100644 --- a/nsw/Source/bsmd.dakosy/Request.cs +++ b/nsw/Source/bsmd.dakosy/Request.cs @@ -23,7 +23,7 @@ namespace bsmd.dakosy #region send single message - public static bool Send(Message aMessage) + public static bool Send(Message aMessage, bool useTestSystem) { bool retval = true; try @@ -776,11 +776,10 @@ namespace bsmd.dakosy // call sftp client to send sftp.Put(fileName, - Properties.Settings.Default.TestMode ? - Properties.Settings.Default.RemoteTestIncomingDir : Properties.Settings.Default.RemoteProdIncomingDir); + useTestSystem ? Properties.Settings.Default.RemoteTestIncomingDir : Properties.Settings.Default.RemoteProdIncomingDir); // remove sent file if not test mode - if (!Properties.Settings.Default.TestMode) + if (!useTestSystem) File.Delete(fileName); } catch(Exception ex) diff --git a/nsw/Source/bsmd.database/Message.cs b/nsw/Source/bsmd.database/Message.cs index 86f8704b..62a1f873 100644 --- a/nsw/Source/bsmd.database/Message.cs +++ b/nsw/Source/bsmd.database/Message.cs @@ -142,7 +142,8 @@ namespace bsmd.database SEND_FAILED, CONFIRMED, VIOLATION, - ERROR, + ERROR, + SUSPENDED = 8 } /// @@ -154,7 +155,9 @@ namespace bsmd.database DBH, DAKOSY, DUDR, - DBH_TEST + DBH_TEST, + DAKOSY_TEST, + DUDR_TEST } #endregion diff --git a/nsw/Source/bsmd.database/MessageError.cs b/nsw/Source/bsmd.database/MessageError.cs index 7a068e13..f8d76274 100644 --- a/nsw/Source/bsmd.database/MessageError.cs +++ b/nsw/Source/bsmd.database/MessageError.cs @@ -42,8 +42,8 @@ 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); + scmd.Parameters.AddWithValue("@VT", this.ErrorText ?? ""); + scmd.Parameters.AddWithValue("@DEL", this.Deleted ? 1 : 0); if (this.IsNew) { diff --git a/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs b/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs index 55bf2779..26fa7ac4 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("3.0.9")] +[assembly: AssemblyInformationalVersion("3.0.12")] [assembly: AssemblyCopyright("Copyright © 2014-2016 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 efed2f11..237a801a 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("3.0.9.*")] +[assembly: AssemblyVersion("3.0.12.*")] diff --git a/nsw/Source/bsmd.database/XtraSendLogic.cs b/nsw/Source/bsmd.database/XtraSendLogic.cs index 4e15dc70..34cbe5ad 100644 --- a/nsw/Source/bsmd.database/XtraSendLogic.cs +++ b/nsw/Source/bsmd.database/XtraSendLogic.cs @@ -23,6 +23,10 @@ namespace bsmd.database /// true falls Nachricht versendet werden soll public static bool ShouldSendMessage(Message message) { + // zurückgestellte Nachrichten werden ignoriert. Das kann ggf. ein Problem werden, wenn die + // Nachricht bei HIS-Nord ein wesentlicher Bestandteil ist. -> muss beobachtet werden + + if (message.InternalStatus == Message.BSMDStatus.SUSPENDED) return false; // Wenn das ein Transit ist, werden nicht erforderliche Meldeklassen übersprungen if (message.MessageCore.IsTransit) diff --git a/nsw/Source/bsmd.hisnord/Request.cs b/nsw/Source/bsmd.hisnord/Request.cs index 8ad3bac3..e5e42415 100644 --- a/nsw/Source/bsmd.hisnord/Request.cs +++ b/nsw/Source/bsmd.hisnord/Request.cs @@ -391,7 +391,19 @@ namespace bsmd.hisnord // abweichende Einträge hier eine Überschreibung verursachen if (!imdgPosition.StowagePosition.IsNullOrEmpty()) - _nsw.conveyance.GeneralCargo[0].LocationOnBoard = imdgPosition.StowagePosition; + _nsw.conveyance.GeneralCargo[0].Item = imdgPosition.StowagePosition; + else + { + if(!imdgPosition.Bay.IsNullOrEmpty() || !imdgPosition.Row.IsNullOrEmpty() || !imdgPosition.Tier.IsNullOrEmpty()) + { + stowagepositionbayrowtier spbr = new stowagepositionbayrowtier(); + spbr.Bay = imdgPosition.Bay; + spbr.Row = imdgPosition.Row; + spbr.Tier = imdgPosition.Tier; + _nsw.conveyance.GeneralCargo[0].Item = spbr; + } + } + if (!imdgPosition.PortOfLoading.IsNullOrEmpty()) _nsw.conveyance.GeneralCargo[0].PortOfLoadingLocode = imdgPosition.PortOfLoading; if (!imdgPosition.PortOfDischarge.IsNullOrEmpty()) @@ -431,9 +443,10 @@ namespace bsmd.hisnord if (ibcPosition.SpecRef15_19.HasValue) pi.SpecRef15_19 = ibcPosition.SpecRef15_19.Value ? yorntype.Y : yorntype.N; pi.Remarks = ibcPosition.Remarks; - + if (!ibcPosition.StowagePosition.IsNullOrEmpty()) - _nsw.conveyance.GeneralCargo[0].LocationOnBoard = ibcPosition.StowagePosition; + _nsw.conveyance.GeneralCargo[0].Item = ibcPosition.StowagePosition; + if (!ibcPosition.PortOfLoading.IsNullOrEmpty()) _nsw.conveyance.GeneralCargo[0].PortOfLoadingLocode = ibcPosition.PortOfLoading; if (!ibcPosition.PortOfDischarge.IsNullOrEmpty()) @@ -468,7 +481,8 @@ namespace bsmd.hisnord pi.Remarks = igcPosition.Remarks; if (!igcPosition.StowagePosition.IsNullOrEmpty()) - _nsw.conveyance.GeneralCargo[0].LocationOnBoard = igcPosition.StowagePosition; + _nsw.conveyance.GeneralCargo[0].Item = igcPosition.StowagePosition; + if (!igcPosition.PortOfLoading.IsNullOrEmpty()) _nsw.conveyance.GeneralCargo[0].PortOfLoadingLocode = igcPosition.PortOfLoading; if (!igcPosition.PortOfDischarge.IsNullOrEmpty()) @@ -502,9 +516,10 @@ namespace bsmd.hisnord if (imsbcPosition.Quantity_KGM.HasValue) pi.NetMassKGM = (float)imsbcPosition.Quantity_KGM.Value; pi.Remarks = imsbcPosition.Remarks; - + if (!imsbcPosition.StowagePosition.IsNullOrEmpty()) - _nsw.conveyance.GeneralCargo[0].LocationOnBoard = imsbcPosition.StowagePosition; + _nsw.conveyance.GeneralCargo[0].Item = imsbcPosition.StowagePosition; + if (!imsbcPosition.PortOfLoading.IsNullOrEmpty()) _nsw.conveyance.GeneralCargo[0].PortOfLoadingLocode = imsbcPosition.PortOfLoading; if (!imsbcPosition.PortOfDischarge.IsNullOrEmpty()) @@ -540,7 +555,8 @@ namespace bsmd.hisnord pi.Remarks = marpolPosition.Remarks; if (!marpolPosition.StowagePosition.IsNullOrEmpty()) - _nsw.conveyance.GeneralCargo[0].LocationOnBoard = marpolPosition.StowagePosition; + _nsw.conveyance.GeneralCargo[0].Item = marpolPosition.StowagePosition; + if (!marpolPosition.PortOfLoading.IsNullOrEmpty()) _nsw.conveyance.GeneralCargo[0].PortOfLoadingLocode = marpolPosition.PortOfLoading; if (!marpolPosition.PortOfDischarge.IsNullOrEmpty()) @@ -625,13 +641,18 @@ namespace bsmd.hisnord if (mdh.AwareOfFurtherInfections.HasValue) _mdh.AwareOfConditionsForFurtherInfections = mdh.AwareOfFurtherInfections.Value ? yorntype.Y : yorntype.N; - if (mdh.InfectedAreaDate.HasValue && !mdh.InfectedAreaPort.IsNullOrEmpty()) + if (mdh.InfectedAreas.Count > 0) { - _mdh.InfectedArea = new infectedarea(); - if (mdh.InfectedAreaDate.HasValue) - _mdh.InfectedArea.InfectedAreaDate = mdh.InfectedAreaDate.Value; - _mdh.InfectedArea.InfectedAreaPort = mdh.InfectedAreaPort; + _mdh.InfectedAreas = new infectedarea[mdh.InfectedAreas.Count]; + for (int i = 0; i < mdh.InfectedAreas.Count; i++) + { + _mdh.InfectedAreas[i] = new infectedarea(); + if (mdh.InfectedAreas[i].InfectedAreaDate.HasValue) + _mdh.InfectedAreas[i].InfectedAreaDate = mdh.InfectedAreas[i].InfectedAreaDate.Value; + _mdh.InfectedAreas[i].InfectedAreaPort = mdh.InfectedAreas[i].InfectedAreaPort; + } } + if (mdh.InfectedAreaVisited.HasValue) _mdh.InfectedAreaVisited = mdh.InfectedAreaVisited.Value ? yorntype.Y : yorntype.N; if (mdh.MedicalConsulted.HasValue) @@ -670,13 +691,18 @@ namespace bsmd.hisnord _mdh.SanitaryControlReinspectionRequired = mdh.SanitaryControlReinspectionRequired.Value ? yorntype.Y : yorntype.N; if (mdh.SanitaryMeasuresApplied.HasValue) _mdh.SanitaryMeasuresApplied = mdh.SanitaryMeasuresApplied.Value ? yorntype.Y : yorntype.N; - if (mdh.SanitaryMeasuresDate.HasValue && !mdh.SanitaryMeasuresLocation.IsNullOrEmpty() && !mdh.SanitaryMeasuresType.IsNullOrEmpty()) + + if (mdh.SanitaryMeasuresDetails.Count > 0) { - _mdh.SanitaryMeasuresDetails = new sanitarydetails(); - if (mdh.SanitaryMeasuresDate.HasValue) - _mdh.SanitaryMeasuresDetails.SanitaryMeasuresDate = mdh.SanitaryMeasuresDate.Value; - _mdh.SanitaryMeasuresDetails.SanitaryMeasuresLocation = mdh.SanitaryMeasuresLocation; - _mdh.SanitaryMeasuresDetails.SanitaryMeasuresType = mdh.SanitaryMeasuresType; + _mdh.SanitaryMeasuresDetails = new sanitarydetail[mdh.SanitaryMeasuresDetails.Count]; + for (int i = 0; i < mdh.SanitaryMeasuresDetails.Count; i++) + { + _mdh.SanitaryMeasuresDetails[i] = new sanitarydetail(); + if (mdh.SanitaryMeasuresDetails[i].SanitaryMeasuresDate.HasValue) + _mdh.SanitaryMeasuresDetails[i].SanitaryMeasuresDate = mdh.SanitaryMeasuresDetails[i].SanitaryMeasuresDate.Value; + _mdh.SanitaryMeasuresDetails[i].SanitaryMeasuresLocation = mdh.SanitaryMeasuresDetails[i].SanitaryMeasuresLocation; + _mdh.SanitaryMeasuresDetails[i].SanitaryMeasuresType = mdh.SanitaryMeasuresDetails[i].SanitaryMeasuresType; + } } if (mdh.SickAnimalOrPetOnBoard.HasValue) _mdh.SickAnimalOrPetOnBoard = mdh.SickAnimalOrPetOnBoard.Value ? yorntype.Y : yorntype.N; @@ -684,9 +710,14 @@ namespace bsmd.hisnord _mdh.SickPersonOnBoard = mdh.SickPersonsOnBoard.Value ? yorntype.Y : yorntype.N; _mdh.StowawaysDetected = (mdh.StowawaysDetected ?? false) ? yorntype.Y : yorntype.N; - if(_mdh.StowawaysDetected == yorntype.Y) - _mdh.StowawayJoiningLocation = mdh.StowawaysJoiningLocation; - + if ((_mdh.StowawaysDetected == yorntype.Y) && (mdh.StowawaysJoiningLocations.Count > 0)) + { + _mdh.StowawayJoiningLocations = new string[mdh.StowawaysJoiningLocations.Count]; + for (int i = 0; i < mdh.StowawaysJoiningLocations.Count; i++) + { + _mdh.StowawayJoiningLocations[i] = mdh.StowawaysJoiningLocations[i].StowawayJoiningLocation; + } + } if (mdh.SuspisionInfectiousNature.HasValue) _mdh.SuspisionInfectiousNature = mdh.SuspisionInfectiousNature.Value ? yorntype.Y : yorntype.N; diff --git a/nsw/Source/bsmd.hisnord/readme.txt b/nsw/Source/bsmd.hisnord/readme.txt index 3d7533a5..e16f036b 100644 --- a/nsw/Source/bsmd.hisnord/readme.txt +++ b/nsw/Source/bsmd.hisnord/readme.txt @@ -1,4 +1,9 @@ -Spezialitäten bei HIS Nord (Stand 25.7.15) +Spezialitäten bei HIS Nord (Stand 17.4.16) + +Generell: Die Datenvorlage (XSD) wird per xsd.exe /classes aus den einzelnen Quelldateien generiert. Wir bekommen XSD 1.1 geliefert +(Java-Implementierung auf der Gegenseite), wofür es unter .NET keine Unterstützung gibt. Ich habe mich so beholfen, alle "ASSERT"s aus +dem XSD einfach zu löschen, damit funktioniert dann die Konvertierung. Allerdings verlieren wir dann die Validierung bei der Erzeugung. +-> Assert Prüfungen müssen in der zukünftigen Benutzerschnittstelle implementiert werden - "transmitter" wird verwendet um die erzeugten Daten an D&D zu schicken - eine Rückmeldung erfolgt direkt über das Transmitter-Tool (Verstoß gegen XSD) oder über Email an den Meldenden, das passiert