Merge branch 'release/eni_7.8'
This commit is contained in:
commit
2009dee9bf
@ -716,7 +716,7 @@ namespace ENI2
|
||||
// XXX : TODO wegmachen wenn CREWD/PASD kommt
|
||||
if ((aMessage.MessageNotificationClass == Message.NotificationClass.PASD) ||
|
||||
(aMessage.MessageNotificationClass == Message.NotificationClass.CREWD))
|
||||
continue;
|
||||
continue;
|
||||
|
||||
if (!aMessage.EvaluateForValidation(this.Core.IsTransit)) continue;
|
||||
|
||||
@ -892,6 +892,22 @@ namespace ENI2
|
||||
|
||||
#endregion
|
||||
|
||||
#region 4.1.23 no CREW effects warning for DE
|
||||
if (crewaMessage != null)
|
||||
{
|
||||
MessageViolation mv = crewaMessage.ViolationList.Find((x) => x.PropertyName.Equals("Effects") && (x.ViolationCode == (int)ValidationCode.TRUNCATE));
|
||||
if ((mv != null) && !Core.IsDK)
|
||||
crewaMessage.ViolationList.Remove(mv);
|
||||
}
|
||||
|
||||
if(crewdMessage != null)
|
||||
{
|
||||
MessageViolation mvd = crewdMessage.ViolationList.Find((x) => x.PropertyName.Equals("Effects") && (x.ViolationCode == (int)ValidationCode.TRUNCATE));
|
||||
if ((mvd != null) && !Core.IsDK)
|
||||
crewdMessage.ViolationList.Remove(mvd);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region WAS_RCPT double numbers
|
||||
|
||||
Dictionary<string, string> identDict = new Dictionary<string, string>();
|
||||
|
||||
@ -36,8 +36,8 @@
|
||||
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>publish.html</WebPage>
|
||||
<ApplicationRevision>8</ApplicationRevision>
|
||||
<ApplicationVersion>7.7.0.%2a</ApplicationVersion>
|
||||
<ApplicationRevision>6</ApplicationRevision>
|
||||
<ApplicationVersion>7.8.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
|
||||
@ -74,10 +74,11 @@ namespace ENI2.EditControls
|
||||
private void CopyDeclarationDialog_Loaded(object sender, System.Windows.RoutedEventArgs e)
|
||||
{
|
||||
this.OKClicked += VisitIdDialog_OKClicked;
|
||||
List<KeyValuePair<bsmd.database.Message.NSWProvider, string>> comboDataSource = new List<KeyValuePair<bsmd.database.Message.NSWProvider, string>>()
|
||||
List<KeyValuePair<Message.NSWProvider, string>> comboDataSource = new List<KeyValuePair<Message.NSWProvider, string>>()
|
||||
{
|
||||
new KeyValuePair<bsmd.database.Message.NSWProvider, string>( Message.NSWProvider.DBH, "DBH" ),
|
||||
new KeyValuePair<bsmd.database.Message.NSWProvider, string>( Message.NSWProvider.DUDR, "HIS-Nord" ),
|
||||
new KeyValuePair<Message.NSWProvider, string>( Message.NSWProvider.DBH, "DBH" ),
|
||||
new KeyValuePair<Message.NSWProvider, string>( Message.NSWProvider.DBH_MAERSK, "DBH / Maersk" ),
|
||||
new KeyValuePair<Message.NSWProvider, string>( Message.NSWProvider.DUDR, "HIS-Nord" ),
|
||||
};
|
||||
|
||||
this.comboBoxInitialHIS.ItemsSource = comboDataSource;
|
||||
|
||||
@ -31,7 +31,8 @@ namespace ENI2.EditControls
|
||||
List<KeyValuePair<Message.NSWProvider, string>> comboDataSource = new List<KeyValuePair<Message.NSWProvider, string>>()
|
||||
{
|
||||
new KeyValuePair<Message.NSWProvider, string>( Message.NSWProvider.DUDR, "HIS-Nord" ),
|
||||
new KeyValuePair<Message.NSWProvider, string>(Message.NSWProvider.DBH, "DBH")
|
||||
new KeyValuePair<Message.NSWProvider, string>(Message.NSWProvider.DBH, "DBH"),
|
||||
new KeyValuePair<Message.NSWProvider, string>(Message.NSWProvider.DBH_MAERSK, "DBH / Maersk")
|
||||
};
|
||||
|
||||
this.comboBoxInitialHIS.ItemsSource = comboDataSource;
|
||||
|
||||
@ -25,12 +25,13 @@ namespace ENI2.EditControls
|
||||
}
|
||||
|
||||
private void VisitIdDialog_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
{
|
||||
this.OKClicked += VisitIdDialog_OKClicked;
|
||||
List<KeyValuePair<bsmd.database.Message.NSWProvider, string>> comboDataSource = new List<KeyValuePair<bsmd.database.Message.NSWProvider, string>>()
|
||||
List<KeyValuePair<Message.NSWProvider, string>> comboDataSource = new List<KeyValuePair<Message.NSWProvider, string>>()
|
||||
{
|
||||
new KeyValuePair<bsmd.database.Message.NSWProvider, string>( Message.NSWProvider.DBH, "DBH" ),
|
||||
new KeyValuePair<bsmd.database.Message.NSWProvider, string>( Message.NSWProvider.DUDR, "HIS-Nord" ),
|
||||
new KeyValuePair<Message.NSWProvider, string>( Message.NSWProvider.DUDR, "HIS-Nord" ),
|
||||
new KeyValuePair<Message.NSWProvider, string>( Message.NSWProvider.DBH, "DBH" ),
|
||||
new KeyValuePair<Message.NSWProvider, string>(Message.NSWProvider.DBH_MAERSK, "DBH / Maersk")
|
||||
};
|
||||
|
||||
this.comboBoxInitialHIS.ItemsSource = comboDataSource;
|
||||
@ -117,8 +118,8 @@ namespace ENI2.EditControls
|
||||
|
||||
isComplete &= this.datePickerETA.SelectedDate.HasValue; // ETA
|
||||
|
||||
bool imo_OR_eni = ((doubleUpDownIMO.Value.HasValue) && (doubleUpDownIMO.Value >= 1000000) && (doubleUpDownIMO.Value <= 9999999)) ||
|
||||
((doubleUpDownENI.Value.HasValue) && (doubleUpDownENI.Value >= 100000) && (doubleUpDownENI.Value <= 99999999));
|
||||
bool imo_OR_eni = (doubleUpDownIMO.Value.HasValue && (doubleUpDownIMO.Value >= 1000000) && (doubleUpDownIMO.Value <= 9999999)) ||
|
||||
(doubleUpDownENI.Value.HasValue && (doubleUpDownENI.Value >= 100000) && (doubleUpDownENI.Value <= 99999999));
|
||||
|
||||
isComplete &= imo_OR_eni;
|
||||
|
||||
|
||||
@ -2061,7 +2061,6 @@ namespace ENI2.Excel
|
||||
private static bool ScanCREW(Message crewMessage, ExcelReader reader, bool isOldVersion)
|
||||
{
|
||||
crewMessage.DeleteElements();
|
||||
|
||||
string sheetTitle = "6. CREW - Arrival";
|
||||
// 6. CREW - Arrival
|
||||
// 5.9.22: Changed this area to work like reading from a Dakosy Sheet (by values in rows, not cell names)
|
||||
|
||||
@ -410,7 +410,7 @@ namespace ENI2
|
||||
|
||||
MessageCore newCore = new MessageCore();
|
||||
VisitIdDialog visitIdDialog = new VisitIdDialog();
|
||||
visitIdDialog.Core = newCore;
|
||||
visitIdDialog.Core = newCore;
|
||||
visitIdDialog.Closed += (senderDialog, closeArgs) =>
|
||||
{
|
||||
VisitIdDialog closedDialog = senderDialog as VisitIdDialog;
|
||||
@ -435,7 +435,7 @@ namespace ENI2
|
||||
bsmd.database.Util.CreateMessagesForCore(closedDialog.Core, null, userEntity);
|
||||
|
||||
// watchdog registrieren
|
||||
this._dbWatchDog.Register(closedDialog.Core);
|
||||
this._dbWatchDog.Register(closedDialog.Core);
|
||||
|
||||
// Wartedialog anzeigen
|
||||
ShowIdDialog showIdDialog = new ShowIdDialog(closedDialog.Core);
|
||||
@ -593,11 +593,8 @@ namespace ENI2
|
||||
}
|
||||
this.showIdDict.Remove(changedCore.Id.Value);
|
||||
// this._dbWatchDog.UnRegister(changedCore); // wird ggf später abgeräumt wenn der Tab geschlossen wird
|
||||
this.Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
UpdateWaitIdLabel();
|
||||
}));
|
||||
}
|
||||
this.Dispatcher.Invoke(new Action(() => UpdateWaitIdLabel()));
|
||||
}
|
||||
|
||||
if (this.openTabs.ContainsKey(changedCore.Id.Value))
|
||||
{
|
||||
|
||||
11
SQL/Update_7.6_To_7.7.sql
Normal file
11
SQL/Update_7.6_To_7.7.sql
Normal file
@ -0,0 +1,11 @@
|
||||
-- Die DBH will fortlaufende Nummern an den versendeten Dateien. Das können sie
|
||||
-- haben, aber wir legen eine Numerierung pro Meldeklasse an so dass kein Aufschluss
|
||||
-- über die Gesamtzahl der versendeten Nachrichten möglich ist
|
||||
|
||||
PRINT N'Altering Table [dbo].[MessageHeader]...';
|
||||
|
||||
GO
|
||||
ALTER TABLE [dbo].[MessageHeader]
|
||||
ADD [FileNumSequence] INT NULL;
|
||||
|
||||
GO
|
||||
@ -2,8 +2,8 @@
|
||||
<configuration>
|
||||
<configSections>
|
||||
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,Log4net"/>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="SendNSWMessageService.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="SendNSWMessageService.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<log4net>
|
||||
@ -26,14 +26,14 @@
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
|
||||
</startup>
|
||||
<userSettings>
|
||||
<applicationSettings>
|
||||
<SendNSWMessageService.Properties.Settings>
|
||||
<setting name="SleepSeconds" serializeAs="String">
|
||||
<value>0</value>
|
||||
</setting>
|
||||
<setting name="ConnectionString" serializeAs="String">
|
||||
<value>Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=E:\DATA\DB\NSW.MDF;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False</value>
|
||||
<value>Initial Catalog=nswtest;Data Source=192.168.2.24\SQLEXPRESS;Uid=dfuser;pwd=dfpasswd;Persist Security Info=False;Connection Reset=false</value>
|
||||
</setting>
|
||||
</SendNSWMessageService.Properties.Settings>
|
||||
</userSettings>
|
||||
</applicationSettings>
|
||||
</configuration>
|
||||
|
||||
@ -182,8 +182,9 @@ namespace SendNSWMessageService
|
||||
switch (message.HIS)
|
||||
{
|
||||
|
||||
case Message.NSWProvider.DBH:
|
||||
sendSucceeded = bsmd.dbh.Request.SendMessage(message);
|
||||
case Message.NSWProvider.DBH:
|
||||
case Message.NSWProvider.DBH_MAERSK:
|
||||
sendSucceeded = bsmd.dbh.MessageController.SendMessage(core, message);
|
||||
if (!sendSucceeded)
|
||||
message.InternalStatus = Message.BSMDStatus.SEND_FAILED;
|
||||
else
|
||||
@ -245,7 +246,8 @@ namespace SendNSWMessageService
|
||||
didSendSomething = true;
|
||||
break;
|
||||
case Message.NSWProvider.DBH:
|
||||
coreSendSucceeded = bsmd.dbh.Request.SendCancelCore(core);
|
||||
case Message.NSWProvider.DBH_MAERSK:
|
||||
coreSendSucceeded = bsmd.dbh.MessageController.SendCancelCore(core);
|
||||
break;
|
||||
default:
|
||||
_log.WarnFormat("Cancelling for HIS {0} is not supported", core.InitialHIS);
|
||||
@ -266,13 +268,14 @@ namespace SendNSWMessageService
|
||||
DBManager.Instance.Save(core);
|
||||
|
||||
}
|
||||
|
||||
bsmd.hisnord.transmitter.CallTransmitter();
|
||||
|
||||
// ob test oder nicht ist in stat. dict gespeichert
|
||||
bsmd.hisnord.Request.ReadResponseFiles();
|
||||
|
||||
bsmd.hisnord.Response.ReadAnswers();
|
||||
// external processing for HIS-Nord
|
||||
bsmd.hisnord.transmitter.CallTransmitter();
|
||||
bsmd.hisnord.Request.ReadResponseFiles();
|
||||
bsmd.hisnord.Response.ReadAnswers();
|
||||
|
||||
// external processing for dbh
|
||||
bsmd.dbh.MessageController.SendAndReceive();
|
||||
|
||||
List<MessageCore> coresMarkedForStatusQuery = DBManager.Instance.GetMessageCoresWithNSWStatusFlag();
|
||||
|
||||
|
||||
@ -23,30 +23,23 @@ namespace SendNSWMessageService.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("0")]
|
||||
public int SleepSeconds {
|
||||
get {
|
||||
return ((int)(this["SleepSeconds"]));
|
||||
}
|
||||
set {
|
||||
this["SleepSeconds"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=E:\\DATA\\DB\\NSW.MDF;Integrated " +
|
||||
"Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;Appl" +
|
||||
"icationIntent=ReadWrite;MultiSubnetFailover=False")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Initial Catalog=nswtest;Data Source=192.168.2.24\\SQLEXPRESS;Uid=dfuser;pwd=dfpass" +
|
||||
"wd;Persist Security Info=False;Connection Reset=false")]
|
||||
public string ConnectionString {
|
||||
get {
|
||||
return ((string)(this["ConnectionString"]));
|
||||
}
|
||||
set {
|
||||
this["ConnectionString"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,11 +2,11 @@
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="SendNSWMessageService.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="SleepSeconds" Type="System.Int32" Scope="User">
|
||||
<Setting Name="SleepSeconds" Type="System.Int32" Scope="Application">
|
||||
<Value Profile="(Default)">0</Value>
|
||||
</Setting>
|
||||
<Setting Name="ConnectionString" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=E:\DATA\DB\NSW.MDF;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False</Value>
|
||||
<Setting Name="ConnectionString" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">Initial Catalog=nswtest;Data Source=192.168.2.24\SQLEXPRESS;Uid=dfuser;pwd=dfpasswd;Persist Security Info=False;Connection Reset=false</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
78
bsmd.dakosy/Properties/Settings.Designer.cs
generated
78
bsmd.dakosy/Properties/Settings.Designer.cs
generated
@ -23,123 +23,75 @@ namespace bsmd.dakosy.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("dakosy")]
|
||||
public string SFTPSessionName {
|
||||
get {
|
||||
return ((string)(this["SFTPSessionName"]));
|
||||
}
|
||||
set {
|
||||
this["SFTPSessionName"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("c:\\temp\\sftp_log.xml")]
|
||||
public string SFTPLog {
|
||||
get {
|
||||
return ((string)(this["SFTPLog"]));
|
||||
}
|
||||
set {
|
||||
this["SFTPLog"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("e:\\temp\\dakosy\\out")]
|
||||
public string SFTPOutDir {
|
||||
get {
|
||||
return ((string)(this["SFTPOutDir"]));
|
||||
}
|
||||
set {
|
||||
this["SFTPOutDir"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("e:\\temp\\dakosy\\in")]
|
||||
public string SFTPInDir {
|
||||
get {
|
||||
return ((string)(this["SFTPInDir"]));
|
||||
}
|
||||
set {
|
||||
this["SFTPInDir"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool TestMode {
|
||||
get {
|
||||
return ((bool)(this["TestMode"]));
|
||||
}
|
||||
set {
|
||||
this["TestMode"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("E:\\Tools\\WinScp\\WinSCP.com")]
|
||||
public string WINSCPFullPath {
|
||||
get {
|
||||
return ((string)(this["WINSCPFullPath"]));
|
||||
}
|
||||
set {
|
||||
this["WINSCPFullPath"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("in/prod/ed02")]
|
||||
public string RemoteProdIncomingDir {
|
||||
public string RemoteIncomingDir {
|
||||
get {
|
||||
return ((string)(this["RemoteProdIncomingDir"]));
|
||||
}
|
||||
set {
|
||||
this["RemoteProdIncomingDir"] = value;
|
||||
return ((string)(this["RemoteIncomingDir"]));
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("in/test/ed02")]
|
||||
public string RemoteTestIncomingDir {
|
||||
get {
|
||||
return ((string)(this["RemoteTestIncomingDir"]));
|
||||
}
|
||||
set {
|
||||
this["RemoteTestIncomingDir"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("out/prod")]
|
||||
public string RemoteProdOutgoingDir {
|
||||
public string RemoteOutgoingDir {
|
||||
get {
|
||||
return ((string)(this["RemoteProdOutgoingDir"]));
|
||||
}
|
||||
set {
|
||||
this["RemoteProdOutgoingDir"] = value;
|
||||
return ((string)(this["RemoteOutgoingDir"]));
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("out/test")]
|
||||
public string RemoteTestOutgoingDir {
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool TestMode {
|
||||
get {
|
||||
return ((string)(this["RemoteTestOutgoingDir"]));
|
||||
}
|
||||
set {
|
||||
this["RemoteTestOutgoingDir"] = value;
|
||||
return ((bool)(this["TestMode"]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,35 +2,29 @@
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="bsmd.dakosy.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="SFTPSessionName" Type="System.String" Scope="User">
|
||||
<Setting Name="SFTPSessionName" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">dakosy</Value>
|
||||
</Setting>
|
||||
<Setting Name="SFTPLog" Type="System.String" Scope="User">
|
||||
<Setting Name="SFTPLog" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">c:\temp\sftp_log.xml</Value>
|
||||
</Setting>
|
||||
<Setting Name="SFTPOutDir" Type="System.String" Scope="User">
|
||||
<Setting Name="SFTPOutDir" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">e:\temp\dakosy\out</Value>
|
||||
</Setting>
|
||||
<Setting Name="SFTPInDir" Type="System.String" Scope="User">
|
||||
<Setting Name="SFTPInDir" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">e:\temp\dakosy\in</Value>
|
||||
</Setting>
|
||||
<Setting Name="TestMode" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="WINSCPFullPath" Type="System.String" Scope="User">
|
||||
<Setting Name="WINSCPFullPath" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">E:\Tools\WinScp\WinSCP.com</Value>
|
||||
</Setting>
|
||||
<Setting Name="RemoteProdIncomingDir" Type="System.String" Scope="User">
|
||||
<Setting Name="RemoteIncomingDir" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">in/prod/ed02</Value>
|
||||
</Setting>
|
||||
<Setting Name="RemoteTestIncomingDir" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">in/test/ed02</Value>
|
||||
</Setting>
|
||||
<Setting Name="RemoteProdOutgoingDir" Type="System.String" Scope="User">
|
||||
<Setting Name="RemoteOutgoingDir" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">out/prod</Value>
|
||||
</Setting>
|
||||
<Setting Name="RemoteTestOutgoingDir" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">out/test</Value>
|
||||
<Setting Name="TestMode" Type="System.Boolean" Scope="Application">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@ -155,8 +155,7 @@ namespace bsmd.dakosy
|
||||
}
|
||||
break;
|
||||
case Message.NotificationClass.NOA_NOD:
|
||||
bsmd.database.NOA_NOD noa_nod = aMessage.Elements[0] as bsmd.database.NOA_NOD;
|
||||
if (noa_nod == null) throw new ApplicationException("dbEntity is no NOA_NOD message!");
|
||||
if (!(aMessage.Elements[0] is bsmd.database.NOA_NOD noa_nod)) throw new ApplicationException("dbEntity is no NOA_NOD message!");
|
||||
vList.Visit[0].NOA_NOD = new NOA_NOD();
|
||||
//vList.Visit[0].NOA_NOD.CallPurpose
|
||||
vList.Visit[0].NOA_NOD.EtaToKielCanalSpecified = noa_nod.ETAToKielCanal.HasValue;
|
||||
@ -800,7 +799,7 @@ namespace bsmd.dakosy
|
||||
if (!serializationFailed)
|
||||
{
|
||||
// call sftp client to send
|
||||
sftp.Put(fileName, Properties.Settings.Default.RemoteProdIncomingDir);
|
||||
SFtp.Put(fileName, Properties.Settings.Default.RemoteIncomingDir);
|
||||
}
|
||||
|
||||
File.Delete(fileName);
|
||||
@ -865,12 +864,10 @@ namespace bsmd.dakosy
|
||||
}
|
||||
|
||||
// call sftp client to send
|
||||
sftp.Put(fileName,
|
||||
Properties.Settings.Default.TestMode ?
|
||||
Properties.Settings.Default.RemoteTestIncomingDir : Properties.Settings.Default.RemoteProdIncomingDir);
|
||||
SFtp.Put(fileName, Properties.Settings.Default.RemoteIncomingDir);
|
||||
|
||||
// remove sent file if not test mode
|
||||
if (!Properties.Settings.Default.TestMode)
|
||||
// if (!Properties.Settings.Default.TestMode)
|
||||
File.Delete(fileName);
|
||||
|
||||
}
|
||||
@ -979,7 +976,7 @@ namespace bsmd.dakosy
|
||||
|
||||
// all das nur weil die Blödmänner andere Enums angelegt haben!!!
|
||||
|
||||
static IdentityDocumentType CrewDocumentFromNSWEnumeration(byte nswValue)
|
||||
internal static IdentityDocumentType CrewDocumentFromNSWEnumeration(byte nswValue)
|
||||
{
|
||||
switch(nswValue)
|
||||
{
|
||||
@ -993,7 +990,7 @@ namespace bsmd.dakosy
|
||||
}
|
||||
}
|
||||
|
||||
static GeneralCargoType CargoTypeFromNSWEnumeration(byte nswValue)
|
||||
internal static GeneralCargoType CargoTypeFromNSWEnumeration(byte nswValue)
|
||||
{
|
||||
switch(nswValue)
|
||||
{
|
||||
@ -1008,7 +1005,7 @@ namespace bsmd.dakosy
|
||||
}
|
||||
}
|
||||
|
||||
static WasteDisposalDeliveryType WDDTypeFromNSWEnumeration(byte nswValue)
|
||||
internal static WasteDisposalDeliveryType WDDTypeFromNSWEnumeration(byte nswValue)
|
||||
{
|
||||
switch(nswValue)
|
||||
{
|
||||
@ -1020,13 +1017,13 @@ namespace bsmd.dakosy
|
||||
}
|
||||
}
|
||||
|
||||
static CargoHandlingType CHTFromNSWEnumeration(byte nswValue)
|
||||
internal static CargoHandlingType CHTFromNSWEnumeration(byte nswValue)
|
||||
{
|
||||
if (nswValue == 0) return CargoHandlingType.LOAD;
|
||||
return CargoHandlingType.DISCHARGE;
|
||||
}
|
||||
|
||||
static ShippingAreaType SATFromNSWEnumeration(byte nswValue)
|
||||
internal static ShippingAreaType SATFromNSWEnumeration(byte nswValue)
|
||||
{
|
||||
switch (nswValue)
|
||||
{
|
||||
@ -1038,6 +1035,5 @@ namespace bsmd.dakosy
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,20 +21,17 @@ using bsmd.database;
|
||||
|
||||
namespace bsmd.dakosy
|
||||
{
|
||||
public class Response
|
||||
public static class Response
|
||||
{
|
||||
private static ILog _log = LogManager.GetLogger(typeof(Request));
|
||||
private static readonly ILog _log = LogManager.GetLogger(typeof(Request));
|
||||
|
||||
public static void ReadAll()
|
||||
{
|
||||
// SFTP verbindung öffnen und alle Dateien herunterladen
|
||||
|
||||
string localDir = Properties.Settings.Default.SFTPInDir;
|
||||
string remoteDir = Properties.Settings.Default.RemoteOutgoingDir;
|
||||
|
||||
string remoteDir = Properties.Settings.Default.TestMode ?
|
||||
Properties.Settings.Default.RemoteTestOutgoingDir : Properties.Settings.Default.RemoteProdOutgoingDir;
|
||||
|
||||
sftp.GetAll(remoteDir);
|
||||
SFtp.TransmitAll(remoteDir, localDir, SFtp.Direction.INCOMING, Properties.Settings.Default.SFTPSessionName);
|
||||
|
||||
// lokale Dateien verarbeiten
|
||||
foreach (string inputFile in Directory.GetFiles(localDir))
|
||||
@ -48,7 +45,7 @@ namespace bsmd.dakosy
|
||||
File.Delete(inputFile); // alternativ: move to archive folder
|
||||
}
|
||||
// remote Dateien löschen
|
||||
sftp.RemoveProcessedFile(remoteDir, Path.GetFileName(inputFile));
|
||||
SFtp.RemoveProcessedFile(remoteDir, Path.GetFileName(inputFile), Properties.Settings.Default.SFTPSessionName);
|
||||
}
|
||||
}
|
||||
|
||||
@ -70,13 +67,11 @@ namespace bsmd.dakosy
|
||||
eDeclarationMessageInterchangeBodyEdiResponseList responseList = eDeclaration.InterchangeBody.Item as eDeclarationMessageInterchangeBodyEdiResponseList;
|
||||
foreach(EdiResponse ediResponse in responseList.EdiResponse)
|
||||
{
|
||||
|
||||
Guid localReferenceId, messageReferenceId;
|
||||
if (!Guid.TryParseExact(ediResponse.LocalReferenceNumber, "N", out localReferenceId))
|
||||
if (!Guid.TryParseExact(ediResponse.LocalReferenceNumber, "N", out Guid localReferenceId))
|
||||
{
|
||||
_log.ErrorFormat("unable to parse local reference number {0}", ediResponse.LocalReferenceNumber);
|
||||
}
|
||||
if (!Guid.TryParseExact(ediResponse.PreviousMessageNumber, "N", out messageReferenceId))
|
||||
if (!Guid.TryParseExact(ediResponse.PreviousMessageNumber, "N", out Guid messageReferenceId))
|
||||
{
|
||||
_log.ErrorFormat("unable to parse message reference id {0}", ediResponse.MessageHeader.MessageReferenceNumber);
|
||||
}
|
||||
@ -126,8 +121,8 @@ namespace bsmd.dakosy
|
||||
foreach (ResponseError responseError in ediResponse.Errors)
|
||||
{
|
||||
MessageError messageError = new MessageError();
|
||||
int errCode;
|
||||
if (Int32.TryParse(responseError.ErrorCode, out errCode))
|
||||
|
||||
if (Int32.TryParse(responseError.ErrorCode, out int errCode))
|
||||
messageError.ErrorCode = errCode;
|
||||
else
|
||||
_log.WarnFormat("cannot parse error code [{0}]", responseError.ErrorCode);
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="bsmd.dakosy.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="bsmd.dakosy.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<userSettings>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup><applicationSettings>
|
||||
<bsmd.dakosy.Properties.Settings>
|
||||
<setting name="SFTPSessionName" serializeAs="String">
|
||||
<value>dakosy</value>
|
||||
@ -19,24 +19,18 @@
|
||||
<setting name="SFTPInDir" serializeAs="String">
|
||||
<value>e:\temp\dakosy\in</value>
|
||||
</setting>
|
||||
<setting name="TestMode" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="WINSCPFullPath" serializeAs="String">
|
||||
<value>E:\Tools\WinScp\WinSCP.com</value>
|
||||
</setting>
|
||||
<setting name="RemoteProdIncomingDir" serializeAs="String">
|
||||
<setting name="RemoteIncomingDir" serializeAs="String">
|
||||
<value>in/prod/ed02</value>
|
||||
</setting>
|
||||
<setting name="RemoteTestIncomingDir" serializeAs="String">
|
||||
<value>in/test/ed02</value>
|
||||
</setting>
|
||||
<setting name="RemoteProdOutgoingDir" serializeAs="String">
|
||||
<setting name="RemoteOutgoingDir" serializeAs="String">
|
||||
<value>out/prod</value>
|
||||
</setting>
|
||||
<setting name="RemoteTestOutgoingDir" serializeAs="String">
|
||||
<value>out/test</value>
|
||||
<setting name="TestMode" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
</bsmd.dakosy.Properties.Settings>
|
||||
</userSettings>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
|
||||
</applicationSettings>
|
||||
</configuration>
|
||||
|
||||
@ -70,7 +70,7 @@
|
||||
</Compile>
|
||||
<Compile Include="Request.cs" />
|
||||
<Compile Include="Response.cs" />
|
||||
<Compile Include="sftp.cs" />
|
||||
<Compile Include="SFtp.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\bsmdKey.snk" />
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -7,12 +7,9 @@
|
||||
//
|
||||
// Copyright (c) 2015 Informatikbüro Daniel Schick. All rights reserved.
|
||||
|
||||
using System;
|
||||
using log4net;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
using System.Xml.XPath;
|
||||
using System.Collections.Generic;
|
||||
using bsmd.database;
|
||||
|
||||
namespace bsmd.dakosy
|
||||
{
|
||||
@ -20,8 +17,16 @@ namespace bsmd.dakosy
|
||||
/// Hilfsklasse zur Kommunikation via SFTP. Wir machen es uns hier leicht und verwenden das beliebte WINSCP im
|
||||
/// Process-Modus. (http://winscp.net/eng/docs/guide_dotnet)
|
||||
/// </summary>
|
||||
public static class sftp
|
||||
public static class SFtp
|
||||
{
|
||||
private static readonly ILog _log = LogManager.GetLogger(typeof(SFtp));
|
||||
|
||||
public enum Direction
|
||||
{
|
||||
INCOMING,
|
||||
OUTGOING
|
||||
}
|
||||
|
||||
public static void Put(string filename, string targetDir)
|
||||
{
|
||||
Process winscp = new Process();
|
||||
@ -47,8 +52,12 @@ namespace bsmd.dakosy
|
||||
winscp.StandardInput.WriteLine(string.Format("mv {0} {1}", filename, dotlessFilename));
|
||||
winscp.StandardInput.Close();
|
||||
|
||||
// Collect all output (not used in this example)
|
||||
// Collect all output
|
||||
string output = winscp.StandardOutput.ReadToEnd();
|
||||
_log.Debug(output);
|
||||
output = winscp.StandardError.ReadToEnd();
|
||||
if (!output.Trim().IsNullOrEmpty())
|
||||
_log.Warn(output);
|
||||
|
||||
// Wait until WinSCP finishes
|
||||
winscp.WaitForExit();
|
||||
@ -86,9 +95,9 @@ namespace bsmd.dakosy
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static void GetAll(string remoteDir)
|
||||
public static void TransmitAll(string remoteDir, string localDir, Direction direction, string sessionName)
|
||||
{
|
||||
Process winscp = new Process();
|
||||
winscp.StartInfo.FileName = Properties.Settings.Default.WINSCPFullPath;
|
||||
@ -96,28 +105,39 @@ namespace bsmd.dakosy
|
||||
winscp.StartInfo.UseShellExecute = false;
|
||||
winscp.StartInfo.RedirectStandardInput = true;
|
||||
winscp.StartInfo.RedirectStandardOutput = true;
|
||||
winscp.StartInfo.RedirectStandardError = true;
|
||||
winscp.StartInfo.CreateNoWindow = true;
|
||||
winscp.Start();
|
||||
|
||||
// Feed in the scripting commands
|
||||
winscp.StandardInput.WriteLine("option batch abort");
|
||||
winscp.StandardInput.WriteLine("option confirm off");
|
||||
winscp.StandardInput.WriteLine("open " + Properties.Settings.Default.SFTPSessionName);
|
||||
winscp.StandardInput.WriteLine("lcd " + Properties.Settings.Default.SFTPInDir);
|
||||
winscp.StandardInput.WriteLine("open " + sessionName);
|
||||
winscp.StandardInput.WriteLine("lcd " + localDir);
|
||||
// winscp.StandardInput.WriteLine("ls");
|
||||
if (remoteDir != null)
|
||||
winscp.StandardInput.WriteLine("cd " + remoteDir);
|
||||
winscp.StandardInput.WriteLine("get *.xml");
|
||||
if(direction == Direction.INCOMING)
|
||||
winscp.StandardInput.WriteLine("get *.xml");
|
||||
if(direction == Direction.OUTGOING)
|
||||
winscp.StandardInput.WriteLine("put *.xml");
|
||||
// move back up since winscp session remembers the last folder
|
||||
winscp.StandardInput.WriteLine("cd ..");
|
||||
winscp.StandardInput.WriteLine("cd ..");
|
||||
winscp.StandardInput.Close();
|
||||
|
||||
// Collect all output (not used in this example)
|
||||
// Collect all output
|
||||
string output = winscp.StandardOutput.ReadToEnd();
|
||||
_log.Debug(output);
|
||||
output = winscp.StandardError.ReadToEnd();
|
||||
if(!output.Trim().IsNullOrEmpty())
|
||||
_log.Warn(output);
|
||||
|
||||
// Wait until WinSCP finishes
|
||||
winscp.WaitForExit();
|
||||
}
|
||||
|
||||
public static void RemoveProcessedFile(string remoteDir, string filename)
|
||||
public static void RemoveProcessedFile(string remoteDir, string filename, string sessionName)
|
||||
{
|
||||
Process winscp = new Process();
|
||||
winscp.StartInfo.FileName = Properties.Settings.Default.WINSCPFullPath;
|
||||
@ -125,22 +145,33 @@ namespace bsmd.dakosy
|
||||
winscp.StartInfo.UseShellExecute = false;
|
||||
winscp.StartInfo.RedirectStandardInput = true;
|
||||
winscp.StartInfo.RedirectStandardOutput = true;
|
||||
winscp.StartInfo.RedirectStandardError = true;
|
||||
winscp.StartInfo.CreateNoWindow = true;
|
||||
winscp.Start();
|
||||
|
||||
// Feed in the scripting commands
|
||||
winscp.StandardInput.WriteLine("option batch abort");
|
||||
winscp.StandardInput.WriteLine("option confirm off");
|
||||
winscp.StandardInput.WriteLine("open " + Properties.Settings.Default.SFTPSessionName);
|
||||
winscp.StandardInput.WriteLine("open " + sessionName);
|
||||
|
||||
// winscp.StandardInput.WriteLine("ls");
|
||||
if (remoteDir != null)
|
||||
winscp.StandardInput.WriteLine("cd " + remoteDir);
|
||||
winscp.StandardInput.WriteLine("rm " + filename);
|
||||
if (remoteDir != null)
|
||||
{
|
||||
// move back up since winscp session remembers the last folder
|
||||
winscp.StandardInput.WriteLine("cd ..");
|
||||
winscp.StandardInput.WriteLine("cd ..");
|
||||
}
|
||||
winscp.StandardInput.Close();
|
||||
|
||||
// Collect all output (not used in this example)
|
||||
// Collect all output
|
||||
string output = winscp.StandardOutput.ReadToEnd();
|
||||
_log.Debug(output);
|
||||
output = winscp.StandardError.ReadToEnd();
|
||||
if (!output.Trim().IsNullOrEmpty())
|
||||
_log.Warn(output);
|
||||
|
||||
// Wait until WinSCP finishes
|
||||
winscp.WaitForExit();
|
||||
|
||||
@ -64,7 +64,7 @@ namespace bsmd.database
|
||||
{
|
||||
return _instance ?? (_instance = new DBManager());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static DBManager GetSingleCon(string dbConnectionString)
|
||||
{
|
||||
@ -454,6 +454,29 @@ namespace bsmd.database
|
||||
return messageList[0];
|
||||
}
|
||||
|
||||
public Message GetMessageByFileSeqNum(int fileSeqNum)
|
||||
{
|
||||
Message aMessage = new Message();
|
||||
SqlCommand cmd = new SqlCommand();
|
||||
const Message.LoadFilter filter = Message.LoadFilter.BY_FILE_SEQ_NUM;
|
||||
aMessage.PrepareLoadCommand(cmd, filter, fileSeqNum);
|
||||
|
||||
SqlDataReader reader = this.PerformCommand(cmd);
|
||||
List<DatabaseEntity> messages = aMessage.LoadList(reader);
|
||||
|
||||
List<Message> messageList = new List<Message>();
|
||||
foreach (Message message in messages)
|
||||
messageList.Add(message);
|
||||
|
||||
if (messageList.Count == 0) return null;
|
||||
|
||||
this.LoadMessageDependencies(messageList);
|
||||
if (messageList[0].MessageCoreId.HasValue)
|
||||
messageList[0].MessageCore = this.GetMessageCoreById(messageList[0].MessageCoreId.Value);
|
||||
|
||||
return messageList[0];
|
||||
}
|
||||
|
||||
public MessageCore GetMessageCoreById(Guid id)
|
||||
{
|
||||
MessageCore aCore = new MessageCore();
|
||||
@ -544,8 +567,6 @@ namespace bsmd.database
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public MessageCore GetMessageCoreByShipInfos(string imo, DateTime eta, string poc)
|
||||
{
|
||||
MessageCore aCore = new MessageCore();
|
||||
@ -741,6 +762,18 @@ namespace bsmd.database
|
||||
}
|
||||
}
|
||||
|
||||
public int? GetMessageFileMaxNum()
|
||||
{
|
||||
int? result = 0;
|
||||
using (SqlCommand cmd = new SqlCommand())
|
||||
{
|
||||
cmd.CommandText = "SELECT MAX(FileNumSequence) FROM MessageHeader";
|
||||
result = this.PerformReadIntQuery(cmd);
|
||||
if (result == null) result = 0;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region internal/private funcs
|
||||
@ -1587,7 +1620,11 @@ namespace bsmd.database
|
||||
{
|
||||
this.CheckConnection();
|
||||
cmd.Connection = this._con;
|
||||
result = (int?)cmd.ExecuteScalar();
|
||||
object r = cmd.ExecuteScalar();
|
||||
if (r == null) { result = null; }
|
||||
else if (r == DBNull.Value) { result = null; }
|
||||
else { result = (int)r; }
|
||||
|
||||
}
|
||||
catch (SqlException ex)
|
||||
{
|
||||
|
||||
@ -142,6 +142,14 @@ namespace bsmd.database
|
||||
return source.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'");
|
||||
}
|
||||
|
||||
public static DateTime ToUTCSerializableDateTime(this DateTime source)
|
||||
{
|
||||
return new DateTime(
|
||||
source.Ticks - (source.Ticks % TimeSpan.TicksPerSecond),
|
||||
DateTimeKind.Utc
|
||||
);
|
||||
}
|
||||
|
||||
public static List<string> RegexSplit(this string source)
|
||||
{
|
||||
List<string> result = new List<string>();
|
||||
|
||||
@ -380,7 +380,10 @@ namespace bsmd.database
|
||||
public void SaveElements()
|
||||
{
|
||||
foreach (IMDGPosition imdg in this.IMDGPositions)
|
||||
{
|
||||
DBManager.Instance.Save(imdg);
|
||||
((ISublistContainer)imdg).SaveElements();
|
||||
}
|
||||
foreach (IMSBCPosition imsbc in this.IMSBCPositions)
|
||||
DBManager.Instance.Save(imsbc);
|
||||
foreach (IBCPosition ibc in this.IBCPositions)
|
||||
@ -388,7 +391,7 @@ namespace bsmd.database
|
||||
foreach (IGCPosition igc in this.IGCPositions)
|
||||
DBManager.Instance.Save(igc);
|
||||
foreach (MARPOL_Annex_I_Position marpol in this.MARPOLPositions)
|
||||
DBManager.Instance.Save(marpol);
|
||||
DBManager.Instance.Save(marpol);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ namespace bsmd.database
|
||||
|
||||
[TypeConverter(typeof(MessageClassConverter<IMDGPosition>))]
|
||||
[JsonConverter(typeof(NoTypeConverterJsonConverter<IMDGPosition>))]
|
||||
public class IMDGPosition : DatabaseEntity, ISublistElement
|
||||
public class IMDGPosition : DatabaseEntity, ISublistElement, ISublistContainer
|
||||
{
|
||||
public IMDGPosition()
|
||||
{
|
||||
@ -229,7 +229,7 @@ namespace bsmd.database
|
||||
else
|
||||
{
|
||||
string[] risks = value.Split(',');
|
||||
List<SubsidiaryRisks> foundList = new List<database.SubsidiaryRisks>();
|
||||
List<SubsidiaryRisks> foundList = new List<SubsidiaryRisks>();
|
||||
|
||||
for (int i = 0; i < risks.Length; i++)
|
||||
{
|
||||
@ -441,6 +441,42 @@ namespace bsmd.database
|
||||
|
||||
#endregion
|
||||
|
||||
#region ISublistContainer implementation
|
||||
|
||||
public ISublistElement GetSublistElementWithIdentifier(string identifier)
|
||||
{
|
||||
foreach (ISublistElement sElem in this.SubsidiaryRiskList)
|
||||
if (sElem.Identifier.Equals(identifier))
|
||||
return sElem;
|
||||
return null;
|
||||
}
|
||||
|
||||
[Browsable(false)]
|
||||
[JsonIgnore]
|
||||
public int NumberOfExcelRows
|
||||
{
|
||||
get { return 1; }
|
||||
}
|
||||
|
||||
public void SaveElements()
|
||||
{
|
||||
foreach (SubsidiaryRisks sr in this.SubsidiaryRiskList)
|
||||
{
|
||||
DBManager.Instance.Save(sr);
|
||||
}
|
||||
}
|
||||
|
||||
public void DeleteElements()
|
||||
{
|
||||
foreach (SubsidiaryRisks sr in this.SubsidiaryRiskList)
|
||||
{
|
||||
DBManager.GetSingleCon(DBManager.Instance.ConnectionString).Delete(sr);
|
||||
}
|
||||
this.SubsidiaryRiskList.Clear();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Validation
|
||||
|
||||
public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
|
||||
@ -479,6 +515,30 @@ namespace bsmd.database
|
||||
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "IMOClass", null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
|
||||
}
|
||||
|
||||
if(!this.Bay.IsNullOrEmpty())
|
||||
{
|
||||
const string pattern = @"^[0-9]{3}$";
|
||||
Regex regex = new Regex(pattern);
|
||||
if (!regex.IsMatch(this.Bay))
|
||||
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Bay", null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
|
||||
}
|
||||
|
||||
if(!this.Row.IsNullOrEmpty())
|
||||
{
|
||||
const string pattern = @"^[0-9]{2}$";
|
||||
Regex regex = new Regex(pattern);
|
||||
if (!regex.IsMatch(this.Row))
|
||||
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Row", null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
|
||||
}
|
||||
|
||||
if(!this.Tier.IsNullOrEmpty())
|
||||
{
|
||||
const string pattern = @"^[0-9]{2}$";
|
||||
Regex regex = new Regex(pattern);
|
||||
if (!regex.IsMatch(this.Tier))
|
||||
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Tier", null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@ -142,7 +142,8 @@ namespace bsmd.database
|
||||
IMPORTHEADER_ID,
|
||||
BY_CORE_AND_CLASS,
|
||||
BY_AGE,
|
||||
WASRCPT_ID
|
||||
WASRCPT_ID,
|
||||
BY_FILE_SEQ_NUM
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -172,7 +173,7 @@ namespace bsmd.database
|
||||
public enum NSWProvider
|
||||
{
|
||||
[Description("Unspecified")]
|
||||
UNDEFINED,
|
||||
UNDEFINED,
|
||||
|
||||
DBH,
|
||||
|
||||
@ -181,6 +182,8 @@ namespace bsmd.database
|
||||
[Description("HIS-Nord")]
|
||||
DUDR,
|
||||
|
||||
[Description("dbh / Maersk")]
|
||||
DBH_MAERSK
|
||||
}
|
||||
|
||||
// Late to the party: generic flags Enum/Field
|
||||
@ -396,6 +399,12 @@ namespace bsmd.database
|
||||
/// </summary>
|
||||
public int Flags { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If message was sent via dbh, this is the consecutive number used in the file name,
|
||||
/// null if unused
|
||||
/// </summary>
|
||||
public int? FileSequenceNumber { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region IDatabaseEntity implementation
|
||||
@ -443,13 +452,14 @@ namespace bsmd.database
|
||||
cmd.Parameters.AddWithNullableValue("@SENDSUCCESS", this.SendSuccess);
|
||||
cmd.Parameters.AddWithNullableValue("@SENTBY", this.SentBy);
|
||||
cmd.Parameters.AddWithValue("@FLAGS", this.Flags);
|
||||
cmd.Parameters.AddWithNullableValue("@FILESEQNUM", this.FileSequenceNumber);
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
this.CreateId();
|
||||
cmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
string query = string.Format("INSERT INTO {0} (Id, ClientRequestId, MessageCoreId, MessageId, SentAt, ReceivedAt, RequestedAt, NotificationClass, Reset, Cancel, Status, ReportingPartyId, BSMDStatus, LastStatus, HIS, CreatedBy, ChangedBy, StatusInfo, SendSuccess, SentBy, Flags) " +
|
||||
"VALUES (@ID, @CLIENTREQUESTID, @MESSAGECOREID, @MESSAGEID, @SENTAT, @RECEIVEDAT, @REQUESTEDAT, @NOTIFICATIONCLASS, @RESET, @CANCEL, @STATUS, @REPORTINGPARTYID, @BSMDSTATUS, @LASTSTATUS, @HIS, @CREATEDBY, @CHANGEDBY, @STATUSINFO, @SENDSUCCESS, @SENTBY, @FLAGS)",
|
||||
string query = string.Format("INSERT INTO {0} (Id, ClientRequestId, MessageCoreId, MessageId, SentAt, ReceivedAt, RequestedAt, NotificationClass, Reset, Cancel, Status, ReportingPartyId, BSMDStatus, LastStatus, HIS, CreatedBy, ChangedBy, StatusInfo, SendSuccess, SentBy, Flags, FileNumSequence) " +
|
||||
"VALUES (@ID, @CLIENTREQUESTID, @MESSAGECOREID, @MESSAGEID, @SENTAT, @RECEIVEDAT, @REQUESTEDAT, @NOTIFICATIONCLASS, @RESET, @CANCEL, @STATUS, @REPORTINGPARTYID, @BSMDSTATUS, @LASTSTATUS, @HIS, @CREATEDBY, @CHANGEDBY, @STATUSINFO, @SENDSUCCESS, @SENTBY, @FLAGS, @FILESEQNUM)",
|
||||
this.Tablename);
|
||||
cmd.CommandText = query;
|
||||
}
|
||||
@ -458,7 +468,7 @@ namespace bsmd.database
|
||||
cmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
cmd.CommandText = string.Format("UPDATE {0} SET ClientRequestId = @CLIENTREQUESTID, MessageId = @MESSAGEID, SentAt = @SENTAT, ReceivedAt = @RECEIVEDAT, RequestedAt = @REQUESTEDAT, " +
|
||||
"NotificationClass = @NOTIFICATIONCLASS, Reset = @RESET, Cancel = @CANCEL, Status = @STATUS, ReportingPartyId = @REPORTINGPARTYID, BSMDStatus = @BSMDSTATUS, LastStatus = @LASTSTATUS, HIS = @HIS, " +
|
||||
"CreatedBy = @CREATEDBY, ChangedBy = @CHANGEDBY, StatusInfo = @STATUSINFO, SendSuccess = @SENDSUCCESS, SentBy = @SENTBY, Flags = @FLAGS WHERE Id = @ID", this.Tablename);
|
||||
"CreatedBy = @CREATEDBY, ChangedBy = @CHANGEDBY, StatusInfo = @STATUSINFO, SendSuccess = @SENDSUCCESS, SentBy = @SENTBY, Flags = @FLAGS, FileNumSequence = @FILESEQNUM WHERE Id = @ID", this.Tablename);
|
||||
}
|
||||
}
|
||||
|
||||
@ -466,7 +476,7 @@ namespace bsmd.database
|
||||
public override void PrepareLoadCommand(IDbCommand cmd, LoadFilter filter, params object[] criteria )
|
||||
{
|
||||
string query = string.Format("SELECT Id, ClientRequestId, MessageCoreId, MessageId, SentAt, ReceivedAt, RequestedAt, NotificationClass, " +
|
||||
"Reset, Cancel, Status, ReportingPartyId, BSMDStatus, LastStatus, HIS, Created, CreatedBy, ChangedBy, Changed, StatusInfo, SendSuccess, SentBy, Flags FROM {0} ",
|
||||
"Reset, Cancel, Status, ReportingPartyId, BSMDStatus, LastStatus, HIS, Created, CreatedBy, ChangedBy, Changed, StatusInfo, SendSuccess, SentBy, Flags, FileNumSequence FROM {0} ",
|
||||
this.Tablename);
|
||||
|
||||
switch (filter)
|
||||
@ -520,6 +530,12 @@ namespace bsmd.database
|
||||
((SqlCommand)cmd).Parameters.AddWithValue("@CLASS", criteria[1]);
|
||||
break;
|
||||
}
|
||||
case LoadFilter.BY_FILE_SEQ_NUM:
|
||||
{
|
||||
query += "WHERE FileNumSequence = @FILESEQNUM";
|
||||
((SqlCommand)cmd).Parameters.AddWithValue("@FILESEQNUM", criteria[0]);
|
||||
break;
|
||||
}
|
||||
case LoadFilter.ALL:
|
||||
default:
|
||||
break;
|
||||
@ -557,6 +573,7 @@ namespace bsmd.database
|
||||
if (!reader.IsDBNull(20)) msg.SendSuccess = reader.GetBoolean(20);
|
||||
if (!reader.IsDBNull(21)) msg.SentBy = reader.GetString(21);
|
||||
if (!reader.IsDBNull(22)) msg.Flags = reader.GetInt32(22);
|
||||
if (!reader.IsDBNull(23)) msg.FileSequenceNumber = reader.GetInt32(23);
|
||||
result.Add(msg);
|
||||
}
|
||||
reader.Close();
|
||||
|
||||
@ -212,8 +212,6 @@ namespace bsmd.database
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((int)_initialHIS > 3) // pre 7.0 declarations may have "Test-" HIS set
|
||||
return _initialHIS - 3;
|
||||
return _initialHIS;
|
||||
}
|
||||
set
|
||||
|
||||
@ -2,6 +2,6 @@
|
||||
|
||||
[assembly: AssemblyCompany("schick Informatik")]
|
||||
[assembly: AssemblyProduct("BSMD NSW interface")]
|
||||
[assembly: AssemblyInformationalVersion("7.7.0")]
|
||||
[assembly: AssemblyInformationalVersion("7.8.0")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014-2022 schick Informatik")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
@ -1,4 +1,4 @@
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("7.7.0.*")]
|
||||
[assembly: AssemblyVersion("7.8.0.*")]
|
||||
|
||||
|
||||
@ -258,6 +258,16 @@ namespace bsmd.database
|
||||
|
||||
#endregion
|
||||
|
||||
#region Validation
|
||||
|
||||
public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
|
||||
{
|
||||
if (this.TowageOnArrivalDraught_DMT.HasValue && ((this.TowageOnArrivalDraught_DMT.Value < 10) || (this.TowageOnArrivalDraught_DMT.Value > 200)))
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Check draught on arrival", null, this.Title, this.Identifier, this.Tablename));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -146,7 +146,7 @@ namespace bsmd.database
|
||||
}
|
||||
else
|
||||
{
|
||||
scmd.Parameters.AddWithValue(@"ID", this.Id);
|
||||
scmd.Parameters.AddWithValue("ID", this.Id);
|
||||
scmd.CommandText = string.Format("UPDATE {0} SET TowageOnDepartureName = @P2, TowageOnDepartureFlag = @P3, " +
|
||||
"TowageOnDepartureOperatorCompanyName = @P4, TowageOnDepartureOperatorStreetNameAndNumber = @P5, " +
|
||||
"TowageOnDepartureOperatorPostalCode = @P6, TowageOnDepartureOperatorCity = @P7, TowageOnDepartureOperatorCountry = @P8, " +
|
||||
@ -241,6 +241,16 @@ namespace bsmd.database
|
||||
|
||||
#endregion
|
||||
|
||||
#region Validation
|
||||
|
||||
public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
|
||||
{
|
||||
if (this.TowageOnDepartureDraught_DMT.HasValue && ((this.TowageOnDepartureDraught_DMT.Value < 10) || (this.TowageOnDepartureDraught_DMT.Value > 200)))
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Check draught on departure", null, this.Title, this.Identifier, this.Tablename));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ namespace bsmd.database
|
||||
[ShowReport]
|
||||
[MaxLength(70)]
|
||||
[ENI2Validation]
|
||||
[Validation(ValidationCode.STRING_MAXLEN, 70)]
|
||||
[Validation(ValidationCode.NOT_NULL_MAX_LEN, 70)]
|
||||
public string TreatmentFacilityProviderName { get; set; }
|
||||
|
||||
public string Identifier { get; set; }
|
||||
|
||||
@ -187,7 +187,7 @@ namespace bsmd.database
|
||||
// abgesehen von "Listen" für die Nachrichtenklassen auch untergeordnete Elemente erzeugen, falls nicht vorhanden!
|
||||
DatabaseEntity classElement;
|
||||
if (!Message.IsListClass(notificationClass) && (message.Elements.Count == 0))
|
||||
{
|
||||
{
|
||||
classElement = DBManager.CreateMessage(notificationClass);
|
||||
|
||||
// CH: 6.10.17: Für die manuelle Eingabe (wird leider nicht ganz auszuschließen sein) wäre es hilfreich, wenn alle Checkboxen nicht leer sind, sondern False beinhalten.
|
||||
|
||||
@ -345,7 +345,7 @@ namespace bsmd.database
|
||||
{
|
||||
RuleEngine.ValidateProperties(wasteReceived, errors, violations);
|
||||
wasteReceived.Validate(errors, violations);
|
||||
}
|
||||
}
|
||||
|
||||
bool entryMissing = false;
|
||||
string missingType = "";
|
||||
|
||||
145
bsmd.dbh/MessageController.cs
Normal file
145
bsmd.dbh/MessageController.cs
Normal file
@ -0,0 +1,145 @@
|
||||
// Copyright (c) 2020-present schick Informatik
|
||||
// Description: Manager zum Senden/Empfangen von Daten mit dbh
|
||||
|
||||
using log4net;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
using bsmd.database;
|
||||
|
||||
namespace bsmd.dbh
|
||||
{
|
||||
public static class MessageController
|
||||
{
|
||||
private static readonly ILog _log = LogManager.GetLogger(typeof(MessageController));
|
||||
private static int? _fileSequenceCounter = null;
|
||||
|
||||
public static bool SendMessage(MessageCore core, Message message)
|
||||
{
|
||||
bool result = true;
|
||||
try
|
||||
{
|
||||
if (message == null) return false;
|
||||
|
||||
if (message.ReportingParty == null)
|
||||
{
|
||||
_log.ErrorFormat("Reporting party not set on message {0}", message.Id);
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((message.MessageNotificationClass != Message.NotificationClass.VISIT) &&
|
||||
(message.MessageNotificationClass != Message.NotificationClass.TRANSIT) &&
|
||||
(message.Elements.Count == 0))
|
||||
{
|
||||
_log.ErrorFormat("trying to send message {0} class {1} but there are no depending record elements",
|
||||
message.Id, message.MessageNotificationClass);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!_fileSequenceCounter.HasValue)
|
||||
_fileSequenceCounter = DBManager.Instance.GetMessageFileMaxNum();
|
||||
_fileSequenceCounter += 1;
|
||||
message.FileSequenceNumber = _fileSequenceCounter;
|
||||
|
||||
string messageFile = RequestUtil.CreateMessageFile(core, message);
|
||||
|
||||
if (messageFile != null)
|
||||
{
|
||||
string onlyFileName = Path.GetFileName(messageFile);
|
||||
string moveTarget = Path.Combine(Properties.Settings.Default.OutgoingFolder, onlyFileName);
|
||||
// move file to output directory
|
||||
File.Move(messageFile, moveTarget);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_log.Error(ex.ToString());
|
||||
result = false;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static bool SendCancelCore(MessageCore core)
|
||||
{
|
||||
bool result = true;
|
||||
|
||||
Message cancelMessage = null;
|
||||
foreach(Message aMessage in DBManager.Instance.GetMessagesForCore(core, DBManager.MessageLoad.ALL))
|
||||
{
|
||||
if(core.IsTransit && (aMessage.MessageNotificationClass == Message.NotificationClass.TRANSIT))
|
||||
{
|
||||
cancelMessage = aMessage; break;
|
||||
}
|
||||
if(!core.IsTransit && (aMessage.MessageNotificationClass == Message.NotificationClass.VISIT))
|
||||
{
|
||||
cancelMessage = aMessage; break;
|
||||
}
|
||||
}
|
||||
|
||||
string messageFile = RequestUtil.CreateMessageFile(core, cancelMessage);
|
||||
|
||||
if (messageFile != null)
|
||||
{
|
||||
|
||||
if (!_fileSequenceCounter.HasValue)
|
||||
_fileSequenceCounter = DBManager.Instance.GetMessageFileMaxNum();
|
||||
_fileSequenceCounter += 1;
|
||||
cancelMessage.FileSequenceNumber = _fileSequenceCounter;
|
||||
|
||||
string onlyFileName = Path.GetFileName(messageFile);
|
||||
string moveTarget = Path.Combine(Properties.Settings.Default.OutgoingFolder, onlyFileName);
|
||||
// move file to output directory
|
||||
File.Move(messageFile, moveTarget);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static void SendAndReceive()
|
||||
{
|
||||
// sent unsent messages in output folder
|
||||
bsmd.dakosy.SFtp.TransmitAll(Properties.Settings.Default.RemoteIncomingFolder, Properties.Settings.Default.OutgoingFolder, dakosy.SFtp.Direction.OUTGOING, Properties.Settings.Default.SFTPSessionName);
|
||||
// move files from output folder to archive folder
|
||||
foreach(string sentFile in Directory.GetFiles(Properties.Settings.Default.OutgoingFolder))
|
||||
{
|
||||
_log.InfoFormat("sent {0}", sentFile);
|
||||
string onlyFileName = Path.GetFileName(sentFile);
|
||||
string moveTarget = Path.Combine(Properties.Settings.Default.OutgoingArchiveFolder, onlyFileName);
|
||||
File.Move(sentFile, moveTarget);
|
||||
}
|
||||
|
||||
// receive files from remote host
|
||||
// SFTP verbindung öffnen und alle Dateien herunterladen
|
||||
bsmd.dakosy.SFtp.TransmitAll(Properties.Settings.Default.RemoteOutgoingFolder, Properties.Settings.Default.IncomingFolder, dakosy.SFtp.Direction.INCOMING, Properties.Settings.Default.SFTPSessionName);
|
||||
|
||||
foreach (string inputFile in Directory.GetFiles(Properties.Settings.Default.IncomingFolder))
|
||||
{
|
||||
string justFilename = Path.GetFileName(inputFile);
|
||||
// lokale Dateien verarbeiten
|
||||
if (!ResponseUtil.Read(inputFile))
|
||||
{
|
||||
_log.ErrorFormat("Error reading input file {0}", justFilename);
|
||||
string errorPath = Path.Combine(Properties.Settings.Default.IncomingErrorFolder, justFilename);
|
||||
File.Move(inputFile, errorPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
_log.InfoFormat("Incoming file {0} processed", justFilename);
|
||||
string archivePath = Path.Combine(Properties.Settings.Default.IncomingArchiveFolder, justFilename);
|
||||
File.Move(inputFile, archivePath);
|
||||
}
|
||||
// remote Dateien löschen
|
||||
bsmd.dakosy.SFtp.RemoveProcessedFile(Properties.Settings.Default.RemoteOutgoingFolder, Path.GetFileName(inputFile), Properties.Settings.Default.SFTPSessionName);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
97
bsmd.dbh/Properties/Settings.Designer.cs
generated
97
bsmd.dbh/Properties/Settings.Designer.cs
generated
@ -23,28 +23,93 @@ namespace bsmd.dbh.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("https://edi-gate.dbh.de/test/bsmd-soap")]
|
||||
public string bsmd_dbh_DBHWebReference_Dbh_Osis_Answ_Ws {
|
||||
get {
|
||||
return ((string)(this["bsmd_dbh_DBHWebReference_Dbh_Osis_Answ_Ws"]));
|
||||
}
|
||||
set {
|
||||
this["bsmd_dbh_DBHWebReference_Dbh_Osis_Answ_Ws"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("00003050")]
|
||||
public string Sender {
|
||||
get {
|
||||
return ((string)(this["Sender"]));
|
||||
}
|
||||
set {
|
||||
this["Sender"] = value;
|
||||
}
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("e:\\temp\\dbh\\out")]
|
||||
public string OutgoingFolder {
|
||||
get {
|
||||
return ((string)(this["OutgoingFolder"]));
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("e:\\temp\\dbh\\out_archive")]
|
||||
public string OutgoingArchiveFolder {
|
||||
get {
|
||||
return ((string)(this["OutgoingArchiveFolder"]));
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("e:\\temp\\dbh\\in")]
|
||||
public string IncomingFolder {
|
||||
get {
|
||||
return ((string)(this["IncomingFolder"]));
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("e:\\temp\\dbh\\in_archive")]
|
||||
public string IncomingArchiveFolder {
|
||||
get {
|
||||
return ((string)(this["IncomingArchiveFolder"]));
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("test/bsmd_2_dbh")]
|
||||
public string RemoteIncomingFolder {
|
||||
get {
|
||||
return ((string)(this["RemoteIncomingFolder"]));
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("test/dbh_2_bsmd")]
|
||||
public string RemoteOutgoingFolder {
|
||||
get {
|
||||
return ((string)(this["RemoteOutgoingFolder"]));
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("dbh")]
|
||||
public string SFTPSessionName {
|
||||
get {
|
||||
return ((string)(this["SFTPSessionName"]));
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string IncomingErrorFolder {
|
||||
get {
|
||||
return ((string)(this["IncomingErrorFolder"]));
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("00006017")]
|
||||
public string SenderMaersk {
|
||||
get {
|
||||
return ((string)(this["SenderMaersk"]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,11 +2,35 @@
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="bsmd.dbh.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="bsmd_dbh_DBHWebReference_Dbh_Osis_Answ_Ws" Type="(Web Service URL)" Scope="User">
|
||||
<Value Profile="(Default)">https://edi-gate.dbh.de/test/bsmd-soap</Value>
|
||||
</Setting>
|
||||
<Setting Name="Sender" Type="System.String" Scope="User">
|
||||
<Setting Name="Sender" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">00003050</Value>
|
||||
</Setting>
|
||||
<Setting Name="OutgoingFolder" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">e:\temp\dbh\out</Value>
|
||||
</Setting>
|
||||
<Setting Name="OutgoingArchiveFolder" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">e:\temp\dbh\out_archive</Value>
|
||||
</Setting>
|
||||
<Setting Name="IncomingFolder" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">e:\temp\dbh\in</Value>
|
||||
</Setting>
|
||||
<Setting Name="IncomingArchiveFolder" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">e:\temp\dbh\in_archive</Value>
|
||||
</Setting>
|
||||
<Setting Name="RemoteIncomingFolder" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">test/bsmd_2_dbh</Value>
|
||||
</Setting>
|
||||
<Setting Name="RemoteOutgoingFolder" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">test/dbh_2_bsmd</Value>
|
||||
</Setting>
|
||||
<Setting Name="SFTPSessionName" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">dbh</Value>
|
||||
</Setting>
|
||||
<Setting Name="IncomingErrorFolder" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="SenderMaersk" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">00006017</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@ -5,7 +5,7 @@
|
||||
// Author: dani
|
||||
// Created: 3/1/2015 8:05:05 PM
|
||||
//
|
||||
// Copyright (c) 2015-2017 Informatikbüro Daniel Schick. All rights reserved.
|
||||
// Copyright (c) 2015-present Informatikbüro Daniel Schick. All rights reserved.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -17,9 +17,14 @@ using bsmd.dbh.DBHWebReference;
|
||||
namespace bsmd.dbh
|
||||
{
|
||||
|
||||
public class Request
|
||||
/// <summary>
|
||||
/// This class implements the "oldschool" approach of sending classes via the SOAP interface.
|
||||
/// It has been superseded by a file-based approach that transmits classes via SFTP.
|
||||
/// </summary>
|
||||
[Obsolete]
|
||||
public class RequestWeb
|
||||
{
|
||||
private static readonly ILog _log = LogManager.GetLogger(typeof(Request));
|
||||
private static readonly ILog _log = LogManager.GetLogger(typeof(RequestWeb));
|
||||
|
||||
public static bool SendCancelCore(MessageCore core)
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
1742
bsmd.dbh/RequestUtil.cs
Normal file
1742
bsmd.dbh/RequestUtil.cs
Normal file
File diff suppressed because it is too large
Load Diff
@ -16,7 +16,7 @@ using System.Xml.Serialization;
|
||||
|
||||
namespace bsmd.dbh
|
||||
{
|
||||
public class Response
|
||||
public static class ResponseWeb
|
||||
{
|
||||
|
||||
private static readonly ILog _log = LogManager.GetLogger("dbh Response");
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
203
bsmd.dbh/ResponseUtil.cs
Normal file
203
bsmd.dbh/ResponseUtil.cs
Normal file
@ -0,0 +1,203 @@
|
||||
// Copyright (c) 2020-present schick Informatik
|
||||
// Description: Verarbeitung von empfangenen Rückmeldungen
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Serialization;
|
||||
using log4net;
|
||||
using bsmd.database;
|
||||
|
||||
namespace bsmd.dbh
|
||||
{
|
||||
internal static class ResponseUtil
|
||||
{
|
||||
private static readonly ILog _log = LogManager.GetLogger(typeof(ResponseUtil));
|
||||
private static readonly Regex _regexFilename = new Regex(@".*NSW\.DBH\.BSMD(MAERSK)?\.(.*)\.xml");
|
||||
|
||||
internal static bool Read(string inputFile)
|
||||
{
|
||||
bool result = false;
|
||||
if(!inputFile.EndsWith(".xml", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
_log.ErrorFormat("no xml file: {0}", inputFile);
|
||||
return result;
|
||||
}
|
||||
|
||||
Match m = _regexFilename.Match(inputFile);
|
||||
if(!m.Success) {
|
||||
_log.WarnFormat("returned file doesn't follow naming convention NSW.DBH.BSMD(MAERSK)?.*:{0}", inputFile);
|
||||
return result;
|
||||
}
|
||||
|
||||
// Achtung! Die laufende Nummer der rücklaufenden Datei ist _nicht_ dieselbe und kann zur Identifikation der Meldeklasse
|
||||
// nicht verwendet werden
|
||||
|
||||
string fileSeqString = m.Groups[2].Value;
|
||||
|
||||
if(!Int32.TryParse(fileSeqString, out int fileSeqNum))
|
||||
{
|
||||
_log.ErrorFormat("matched file sequence number couldn't be parsed: {0}", fileSeqString);
|
||||
return result;
|
||||
}
|
||||
|
||||
bsmd.dbh.Response.Root root = null;
|
||||
try
|
||||
{
|
||||
XmlSerializer serializer = new XmlSerializer(typeof(bsmd.dbh.Response.Root));
|
||||
using (Stream s = new FileStream(inputFile, FileMode.Open))
|
||||
{
|
||||
root = (bsmd.dbh.Response.Root) serializer.Deserialize(s);
|
||||
}
|
||||
|
||||
Message sentMessage = null;
|
||||
MessageCore aCore = null;
|
||||
|
||||
if(Guid.TryParse(root.SenderReference, out Guid refGuid))
|
||||
{
|
||||
// load message(s?) by file seq string
|
||||
sentMessage = DBManager.Instance.GetMessageById(refGuid) as Message;
|
||||
if (sentMessage == null)
|
||||
{
|
||||
_log.ErrorFormat("cannot find a message for file sequence number {0}", fileSeqNum);
|
||||
return result;
|
||||
}
|
||||
|
||||
aCore = DBManager.Instance.GetMessageCoreById(sentMessage.MessageCoreId.Value);
|
||||
if (aCore == null)
|
||||
{
|
||||
_log.ErrorFormat("There is no core with id {0}", sentMessage.MessageCoreId.Value);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_log.ErrorFormat("sender ref {0} is no guid", root.SenderReference);
|
||||
return result;
|
||||
}
|
||||
|
||||
switch(root.Type)
|
||||
{
|
||||
case Response.RootType.VISIT:
|
||||
if (aCore.VisitId.IsNullOrEmpty() && !root.VisitId.IsNullOrEmpty())
|
||||
{
|
||||
aCore.VisitId = root.VisitId;
|
||||
sentMessage.SendSuccess = true;
|
||||
sentMessage.Status = Message.MessageStatus.ACCEPTED;
|
||||
sentMessage.InternalStatus = Message.BSMDStatus.CONFIRMED;
|
||||
_log.InfoFormat("Received Visit-Id {0} for core {1}", root.VisitId, aCore.Id);
|
||||
}
|
||||
break;
|
||||
case Response.RootType.TRANSIT:
|
||||
if (aCore.TransitId.IsNullOrEmpty() && !root.TransitId.IsNullOrEmpty())
|
||||
{
|
||||
aCore.TransitId = root.TransitId;
|
||||
sentMessage.SendSuccess = true;
|
||||
sentMessage.Status = Message.MessageStatus.ACCEPTED;
|
||||
sentMessage.InternalStatus = Message.BSMDStatus.CONFIRMED;
|
||||
_log.InfoFormat("Received Transit-Id {0} for core {1}", root.TransitId, aCore.Id);
|
||||
}
|
||||
break;
|
||||
case Response.RootType.DATA:
|
||||
if(root.ReportingClassesFull?.ReportingClass.Length > 0)
|
||||
{
|
||||
_log.InfoFormat("Message {0} confirmed (full), {1} messages", sentMessage.MessageNotificationClassDisplay, root.Messages?.Length);
|
||||
sentMessage.SendSuccess = true;
|
||||
sentMessage.Status = Message.MessageStatus.ACCEPTED;
|
||||
sentMessage.InternalStatus = Message.BSMDStatus.CONFIRMED;
|
||||
}
|
||||
if (root.ReportingClassesPartial?.ReportingClass.Length > 0)
|
||||
{
|
||||
_log.WarnFormat("Message {0} confirmed (partial), {1} messages", sentMessage.MessageNotificationClassDisplay, root.Messages?.Length);
|
||||
sentMessage.SendSuccess = true;
|
||||
sentMessage.Status = Message.MessageStatus.ACCEPTED;
|
||||
sentMessage.InternalStatus = Message.BSMDStatus.VIOLATION;
|
||||
}
|
||||
if (root.ReportingClassesError?.ReportingClass.Length > 0)
|
||||
{
|
||||
_log.ErrorFormat("Message {0} rejected, {1} messages", sentMessage.MessageNotificationClassDisplay, root.Messages?.Length);
|
||||
sentMessage.SendSuccess = false;
|
||||
sentMessage.Status = Message.MessageStatus.REJECTED;
|
||||
sentMessage.InternalStatus = Message.BSMDStatus.ERROR;
|
||||
sentMessage.StatusInfo = "Errors reported";
|
||||
}
|
||||
break;
|
||||
case Response.RootType.RESET:
|
||||
if(root.ReportingClassesResetted?.ReportingClass.Length > 0)
|
||||
{
|
||||
_log.InfoFormat("Message {0} RESET confirmed, {1} messages", sentMessage.MessageNotificationClassDisplay, root.Messages.Length); ;
|
||||
sentMessage.SendSuccess = false; // bestätigter Reset setzt grünen Buppel zurück
|
||||
sentMessage.Status = Message.MessageStatus.ACCEPTED;
|
||||
sentMessage.InternalStatus = Message.BSMDStatus.CONFIRMED;
|
||||
}
|
||||
break;
|
||||
case Response.RootType.CANCEL:
|
||||
_log.InfoFormat("Core {0} CANCEL confirmed", aCore.DisplayId);
|
||||
aCore.BSMDStatusInternal = MessageCore.BSMDStatus.RESPONDED;
|
||||
break;
|
||||
}
|
||||
|
||||
// "alte" Meldungen entfernen
|
||||
foreach (MessageError existingError in sentMessage.ErrorList)
|
||||
DBManager.Instance.Delete(existingError);
|
||||
|
||||
foreach (MessageViolation existingViolation in sentMessage.ViolationList)
|
||||
DBManager.Instance.Delete(existingViolation);
|
||||
|
||||
if (root.Messages != null)
|
||||
{
|
||||
foreach (Response.RootMessage rootMessage in root.Messages)
|
||||
{
|
||||
_log.InfoFormat("Message[{0}]: {1} {2} {3}", rootMessage.ID, rootMessage.Type, rootMessage.Location, rootMessage.Text);
|
||||
switch (rootMessage.Type)
|
||||
{
|
||||
case Response.RootMessageType.ERROR:
|
||||
MessageError me = new MessageError();
|
||||
me.MessageHeaderId = sentMessage.Id.Value;
|
||||
me.MessageHeader = sentMessage;
|
||||
me.ErrorText = rootMessage.Text;
|
||||
DBManager.Instance.Save(me);
|
||||
break;
|
||||
case Response.RootMessageType.VIOLATION:
|
||||
MessageViolation mv = new MessageViolation();
|
||||
mv.MessageHeaderId = sentMessage.Id.Value;
|
||||
mv.MessageHeader = sentMessage;
|
||||
mv.ViolationText = rootMessage.Text;
|
||||
DBManager.Instance.Save(mv);
|
||||
break;
|
||||
case Response.RootMessageType.XSD_ERROR:
|
||||
// TODO
|
||||
break;
|
||||
case Response.RootMessageType.INFO:
|
||||
// TODO
|
||||
break;
|
||||
case Response.RootMessageType.WARNING:
|
||||
// TODO
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DBManager.Instance.Save(sentMessage);
|
||||
|
||||
if (!(aCore.Cancelled ?? false))
|
||||
aCore.BSMDStatusInternal = MessageCore.BSMDStatus.RESPONDED;
|
||||
|
||||
DBManager.Instance.Save(aCore);
|
||||
result = true;
|
||||
}
|
||||
|
||||
catch(Exception ex)
|
||||
{
|
||||
_log.ErrorFormat("Failed to deserialize return message: {0}", ex.Message);
|
||||
return result;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<DiscoveryClientResultsFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<Results>
|
||||
<DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="file:///E:/svnlager/bsmd/nsw/dbh/answ-osis-extern.wsdl" filename="answ-osis-extern.wsdl" />
|
||||
<DiscoveryClientResult referenceType="System.Web.Services.Discovery.SchemaReference" url="file:///E:/svnlager/bsmd/nsw/dbh/NSWRequest.xsd" filename="NSWRequest.xsd" />
|
||||
</Results>
|
||||
</DiscoveryClientResultsFile>
|
||||
@ -1,46 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:cw="http://www.openuri.org/2002/04/wsdl/conversation/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s0="http://www.openuri.org/" xmlns:jms="http://www.openuri.org/2002/04/wsdl/jms/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:conv="http://www.openuri.org/2002/04/soap/conversation/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://www.openuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
|
||||
<wsdl:types>
|
||||
<s:schema xmlns:ope="http://www.openuri.org/" elementFormDefault="qualified" targetNamespace="http://www.openuri.org/">
|
||||
<s:include schemaLocation="NSWRequest.xsd" />
|
||||
<s:element name="submitResponse">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" name="messageID" type="s:string" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
</s:schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="submitSoapIn">
|
||||
<wsdl:part name="parameters" element="s0:Root" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="submitSoapOut">
|
||||
<wsdl:part name="parameters" element="s0:submitResponse" />
|
||||
</wsdl:message>
|
||||
<wsdl:portType name="Dbh_Osis_Answ_Ws">
|
||||
<wsdl:operation name="Root">
|
||||
<wsdl:documentation>Submit a new NSW Request (only one NSWRequest per Submit!) to DBH ANSW OSIS, giving the senderID, messageID, messageType, the message. The method returns the OsisOrderNr (Unique message identifier generated by OSIS). </wsdl:documentation>
|
||||
<wsdl:input message="s0:submitSoapIn" />
|
||||
<wsdl:output message="s0:submitSoapOut" />
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
<wsdl:binding name="Dbh_Osis_Answ_Ws" type="s0:Dbh_Osis_Answ_Ws">
|
||||
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<wsdl:operation name="Root">
|
||||
<soap:operation soapAction="http://www.openuri.org/submit" style="document" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="Dbh_Osis_Answ_Ws">
|
||||
<wsdl:documentation>Dbh_Osis_Answ_Ws is used to send Message to the DBH ANSW OSIS Application. Message format is XML.</wsdl:documentation>
|
||||
<wsdl:port name="Dbh_Osis_Answ_Ws" binding="s0:Dbh_Osis_Answ_Ws">
|
||||
<soap:address location="https://edi-gate.dbh.de/test/bsmd-soap" />
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>
|
||||
@ -1,18 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="bsmd.dbh.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="bsmd.dbh.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<userSettings>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup><applicationSettings>
|
||||
<bsmd.dbh.Properties.Settings>
|
||||
<setting name="bsmd_dbh_DBHWebReference_Dbh_Osis_Answ_Ws" serializeAs="String">
|
||||
<value>https://edi-gate.dbh.de/test/bsmd-soap</value>
|
||||
</setting>
|
||||
<setting name="Sender" serializeAs="String">
|
||||
<value>00003050</value>
|
||||
</setting>
|
||||
<setting name="OutgoingFolder" serializeAs="String">
|
||||
<value>e:\temp\dbh\out</value>
|
||||
</setting>
|
||||
<setting name="OutgoingArchiveFolder" serializeAs="String">
|
||||
<value>e:\temp\dbh\out_archive</value>
|
||||
</setting>
|
||||
<setting name="IncomingFolder" serializeAs="String">
|
||||
<value>e:\temp\dbh\in</value>
|
||||
</setting>
|
||||
<setting name="IncomingArchiveFolder" serializeAs="String">
|
||||
<value>e:\temp\dbh\in_archive</value>
|
||||
</setting>
|
||||
<setting name="RemoteIncomingFolder" serializeAs="String">
|
||||
<value>test/bsmd_2_dbh</value>
|
||||
</setting>
|
||||
<setting name="RemoteOutgoingFolder" serializeAs="String">
|
||||
<value>test/dbh_2_bsmd</value>
|
||||
</setting>
|
||||
<setting name="SFTPSessionName" serializeAs="String">
|
||||
<value>dbh</value>
|
||||
</setting>
|
||||
<setting name="IncomingErrorFolder" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="SenderMaersk" serializeAs="String">
|
||||
<value>00006017</value>
|
||||
</setting>
|
||||
</bsmd.dbh.Properties.Settings>
|
||||
</userSettings>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
|
||||
</applicationSettings>
|
||||
</configuration>
|
||||
|
||||
@ -66,28 +66,32 @@
|
||||
<Compile Include="..\bsmd.database\Properties\AssemblyProjectKeyInfo.cs">
|
||||
<Link>Properties\AssemblyProjectKeyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="NSWResponse.cs" />
|
||||
<Compile Include="MessageController.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Request.cs" />
|
||||
<Compile Include="Response.cs" />
|
||||
<Compile Include="Web References\DBHWebReference\Reference.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Reference.map</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="RequestUtil.cs" />
|
||||
<Compile Include="Request\NSWRequest.cs" />
|
||||
<Compile Include="ResponseUtil.cs" />
|
||||
<Compile Include="Response\NSWResponse.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\bsmd.dakosy\bsmd.dakosy.csproj">
|
||||
<Project>{6255f8c4-b0b5-4e77-860e-10ebcd7b368f}</Project>
|
||||
<Name>bsmd.dakosy</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\bsmd.database\bsmd.database.csproj">
|
||||
<Project>{19945af2-379b-46a5-b27a-303b5ec1d557}</Project>
|
||||
<Name>bsmd.database</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\bsmd.database\bsmd.database.licenseheader">
|
||||
<Link>bsmd.database.licenseheader</Link>
|
||||
</None>
|
||||
<None Include="..\bsmdKey.snk" />
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
@ -95,37 +99,14 @@
|
||||
<Generator>PublicSettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="Web References\DBHWebReference\answ-osis-extern.wsdl" />
|
||||
<None Include="Web References\DBHWebReference\NSWRequest.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="Web References\DBHWebReference\Reference.map">
|
||||
<Generator>MSDiscoCodeGenerator</Generator>
|
||||
<LastGenOutput>Reference.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<WCFMetadata Include="Service References\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<WebReferences Include="Web References\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<WebReferenceUrl Include="E:\svnlager\bsmd\nsw\dbh\answ-osis-extern.wsdl">
|
||||
<UrlBehavior>Dynamic</UrlBehavior>
|
||||
<RelPath>Web References\DBHWebReference\</RelPath>
|
||||
<UpdateFromURL>E:\svnlager\bsmd\nsw\dbh\answ-osis-extern.wsdl</UpdateFromURL>
|
||||
<ServiceLocationURL>
|
||||
</ServiceLocationURL>
|
||||
<CachedDynamicPropName>
|
||||
</CachedDynamicPropName>
|
||||
<CachedAppSettingsObjectName>Settings</CachedAppSettingsObjectName>
|
||||
<CachedSettingsPropName>bsmd_dbh_DBHWebReference_Dbh_Osis_Answ_Ws</CachedSettingsPropName>
|
||||
</WebReferenceUrl>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="readme.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
26
bsmd.dbh/misc/sshkey.ppk
Normal file
26
bsmd.dbh/misc/sshkey.ppk
Normal file
@ -0,0 +1,26 @@
|
||||
PuTTY-User-Key-File-2: ssh-rsa
|
||||
Encryption: aes256-cbc
|
||||
Comment: rsa-key-20221031 dbh
|
||||
Public-Lines: 6
|
||||
AAAAB3NzaC1yc2EAAAABJQAAAQEAujJ+P4nqiTRaPaorpEyBJvhjsU1DQ19GD4wN
|
||||
XvbawZg2qHnIoEFt/0QItgHo5qij72cU//A2owCgEMrvaiXwPKk/ey1f1O3VlP3G
|
||||
uK92aSYx+kwvqzjq4NKG2d/OVImcu5Y7KF7WaPNs44F7KvPI/yu5ZSJ7eL3+d9Tz
|
||||
8Xtkw0Cca121+KrSmrEEot0PPjvl/ltrRc/MZwpdHBaahhfdNShAFYW9YI9/Jx8R
|
||||
MNZ8PvN6KqE0GRvyYoNWQ839LJTmV4TDovc/Q30OaxvkpfV/JVzlSK34NZf4L2Av
|
||||
V84PNSSMMmS1ZyPlIivol4iorsMFL4ExWCD5RFT1TJtnHAT7sQ==
|
||||
Private-Lines: 14
|
||||
mM+ucPZK+y4ZO6hmpxOzLGKsGtLQK0Z61x0KO9e68jq7gdyaj1uNRbE8k6hwgs+a
|
||||
/3yh9BJRG70F/FR0xcwhxVbyd38JFKjhb5l563twAzql1iM3+rfeM+HB3pRGHr/a
|
||||
glK2MVErCIaP+DxpwoAgMBP8PlpRkbwA9kJ7AxqfN/CtIbjPRVxONBIAcEWG2hY4
|
||||
TCS7OVS4GMQA/hObytd8rGgFF/f6VSpMwHM2+ztXNgj6+oFHJh2/SrxkM2zVdj65
|
||||
I63Z83oxM3fxW69oJ7od5jXGHq2qzd5PQoUz+W5WSwjWsDKDYH2T7xNc5oI0D0g6
|
||||
cYtNnwHRmbj+oxVgyqORn9kVCM4MaRlqJVU5y9C29fEIUPl7x4Xc5b7SppSm3HOd
|
||||
vrLtftP7OlYjAapm+G3hMMZ0V5kSOxllx9wSEPYQW9qxWIgEZ0ytladFrwHu2NGa
|
||||
xTRNn4JjP6LkfadJLdTciVwRujTmteLGq7dqSrrv2GasoWPMMON8usgxCLokBapP
|
||||
fz/4hPxrKxJNbjkcbbsVn3UhY2OfeUiAgW5R+ms1MKHw3hewI3+psDVfYuJeFsFp
|
||||
A/J453Ypmi/89hqMkPOCpy7aBWO9SorRFakYgeE1Tq0dYChK8+nu60MpALBU1mQK
|
||||
xXhj9fUYEF7voJcsWN0ZH3oAo+/840blQuV4o+DQZVFwcKzpOOm1wPzQZgvqcz4c
|
||||
lTnLg/xUiMKNpVdzc8sJz3nIlXkDo6rrkIVMf40ergGz7So6nij9DIh/ZsUeQ6Yb
|
||||
z23HtiG0s17O3iJLSOgoFcXrAh9sWkp0k/Vg8aVvLVzp2VBLC9cejRFBRG1z0lM2
|
||||
qYv61RQLU2r3b8gpqQzBT1HLgy8N7I51AhfUUlBHs+UxdXy0NrYvS4eEiXksGK/5
|
||||
Private-MAC: 91ed4f6f4074a6c4ebb5cacf53e39989e737774e
|
||||
9
bsmd.dbh/misc/sshkey.pub
Normal file
9
bsmd.dbh/misc/sshkey.pub
Normal file
@ -0,0 +1,9 @@
|
||||
---- BEGIN SSH2 PUBLIC KEY ----
|
||||
Comment: "rsa-key-20221031 dbh"
|
||||
AAAAB3NzaC1yc2EAAAABJQAAAQEAujJ+P4nqiTRaPaorpEyBJvhjsU1DQ19GD4wN
|
||||
XvbawZg2qHnIoEFt/0QItgHo5qij72cU//A2owCgEMrvaiXwPKk/ey1f1O3VlP3G
|
||||
uK92aSYx+kwvqzjq4NKG2d/OVImcu5Y7KF7WaPNs44F7KvPI/yu5ZSJ7eL3+d9Tz
|
||||
8Xtkw0Cca121+KrSmrEEot0PPjvl/ltrRc/MZwpdHBaahhfdNShAFYW9YI9/Jx8R
|
||||
MNZ8PvN6KqE0GRvyYoNWQ839LJTmV4TDovc/Q30OaxvkpfV/JVzlSK34NZf4L2Av
|
||||
V84PNSSMMmS1ZyPlIivol4iorsMFL4ExWCD5RFT1TJtnHAT7sQ==
|
||||
---- END SSH2 PUBLIC KEY ----
|
||||
26
bsmd.dbh/misc/sshkeynp.ppk
Normal file
26
bsmd.dbh/misc/sshkeynp.ppk
Normal file
@ -0,0 +1,26 @@
|
||||
PuTTY-User-Key-File-2: ssh-rsa
|
||||
Encryption: none
|
||||
Comment: rsa-key-20221031 dbh
|
||||
Public-Lines: 6
|
||||
AAAAB3NzaC1yc2EAAAABJQAAAQEAujJ+P4nqiTRaPaorpEyBJvhjsU1DQ19GD4wN
|
||||
XvbawZg2qHnIoEFt/0QItgHo5qij72cU//A2owCgEMrvaiXwPKk/ey1f1O3VlP3G
|
||||
uK92aSYx+kwvqzjq4NKG2d/OVImcu5Y7KF7WaPNs44F7KvPI/yu5ZSJ7eL3+d9Tz
|
||||
8Xtkw0Cca121+KrSmrEEot0PPjvl/ltrRc/MZwpdHBaahhfdNShAFYW9YI9/Jx8R
|
||||
MNZ8PvN6KqE0GRvyYoNWQ839LJTmV4TDovc/Q30OaxvkpfV/JVzlSK34NZf4L2Av
|
||||
V84PNSSMMmS1ZyPlIivol4iorsMFL4ExWCD5RFT1TJtnHAT7sQ==
|
||||
Private-Lines: 14
|
||||
AAABAEZz+GsRlwN7l8ROOgbQ1uwmokMWUM1iUdxegZmN1jtqBtf2up2AinxDQZD5
|
||||
zb8PYJ/GI58cnw0+gcEqMRNoTRAIsDxyCJXBxm+5+Co0jas+4npiBDLy8RbMMwZU
|
||||
ru+OA/Pzp65pEtuaYI1vQ1xcPjcJoBht6Yeh1egnEDHbqZX8H0bPflHjFwifKQjb
|
||||
A4dDFR0MjhaRupoABPgFJrmMcRJc4OxgBCzsNdi7fPSQXB5NNc5Bcmt2nENGIwKl
|
||||
DLfkNmfVLM6Dba9gLDlKY26120b6oyzGKW0c6QlKygIqgSuUlWE5QkQe1O3DgOma
|
||||
ArQA4hJThI6lr298L6Vd5nIGS00AAACBAPSYGhlBWJO0h3kNcUYbSqW4YUbzo7Tr
|
||||
Xi69mUXKK3yayx3oJvQ0s3cUZPs5ffEydzZvwL6t+REQNIPdE+v9R7zg3zoEq9Kj
|
||||
ynPc7fFu0bqcPsVoc91rmvsGPZG9wzeP/uWhdvsjN2wm5+dUhndFSQlKI/eE1kUX
|
||||
yR+iF3I5JzSNAAAAgQDC4UPO3ufLKs4M2XIbPXbRncaszWHO5KwhPLjcGrARMvn0
|
||||
TvNQa/4MDMqU3rZzBYujPlgQKo37MsxRTXOUJLsr9oRuoRSmK6IlraA1koxKKPVw
|
||||
oMCtTjCVR28+lFFdsfhk62ivtHZq0Ah1tQ+8jcDK/hLJNblkhegzLFTvR80ktQAA
|
||||
AIBGxWBNRjWjJ6hUigx2VaFVyhD5BjXJMBOwQhT2TypVc2JpoMCHbGiUmodwgeLQ
|
||||
Vw2OdjpkBIpFOnSJi5r2ZInLLhEXn7wTKm+oDifNdz7OBwb5MAtH7DIOxsg5OcJf
|
||||
85k6/GSa1vnX0nqN7MhiEgVC7iBqcV9nsQ2Cu54K60Q+7g==
|
||||
Private-MAC: 0b938b49cfacc9f022a41e09918c08757c5a853a
|
||||
40
bsmd.hisnord/Properties/Settings.Designer.cs
generated
40
bsmd.hisnord/Properties/Settings.Designer.cs
generated
@ -23,100 +23,76 @@ namespace bsmd.hisnord.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("1")]
|
||||
public int BatchTimeoutMins {
|
||||
get {
|
||||
return ((int)(this["BatchTimeoutMins"]));
|
||||
}
|
||||
set {
|
||||
this["BatchTimeoutMins"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("E:\\svnlager\\BSMD\\nsw\\HIS-NORD\\Transmitter-Tool\\IMP")]
|
||||
public string OutputDir {
|
||||
get {
|
||||
return ((string)(this["OutputDir"]));
|
||||
}
|
||||
set {
|
||||
this["OutputDir"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("E:\\svnlager\\BSMD\\nsw\\HIS-NORD\\Transmitter-Tool\\client.bat")]
|
||||
public string Transmitter {
|
||||
get {
|
||||
return ((string)(this["Transmitter"]));
|
||||
}
|
||||
set {
|
||||
this["Transmitter"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("E:\\svnlager\\BSMD\\nsw\\HIS-NORD\\Transmitter-Tool\\RESULTS")]
|
||||
public string ResultDir {
|
||||
get {
|
||||
return ((string)(this["ResultDir"]));
|
||||
}
|
||||
set {
|
||||
this["ResultDir"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("E:\\svnlager\\BSMD\\nsw\\HIS-NORD\\Transmitter-Tool\\ANSWERS")]
|
||||
public string AnswerDir {
|
||||
get {
|
||||
return ((string)(this["AnswerDir"]));
|
||||
}
|
||||
set {
|
||||
this["AnswerDir"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("E:\\svnlager\\BSMD\\nsw\\HIS-NORD\\Transmitter-Tool\\ANSWERS_DONE")]
|
||||
public string AnswerArchiveDir {
|
||||
get {
|
||||
return ((string)(this["AnswerArchiveDir"]));
|
||||
}
|
||||
set {
|
||||
this["AnswerArchiveDir"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("E:\\svnlager\\BSMD\\nsw\\HIS-NORD\\Transmitter-Tool\\ANSWERS_CORRUPT")]
|
||||
public string AnswerCorruptDir {
|
||||
get {
|
||||
return ((string)(this["AnswerCorruptDir"]));
|
||||
}
|
||||
set {
|
||||
this["AnswerCorruptDir"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("E:\\svnlager\\BSMD\\nsw\\HIS-NORD\\")]
|
||||
public string TransmitterRoot {
|
||||
get {
|
||||
return ((string)(this["TransmitterRoot"]));
|
||||
}
|
||||
set {
|
||||
this["TransmitterRoot"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,28 +2,28 @@
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="bsmd.hisnord.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="BatchTimeoutMins" Type="System.Int32" Scope="User">
|
||||
<Setting Name="BatchTimeoutMins" Type="System.Int32" Scope="Application">
|
||||
<Value Profile="(Default)">1</Value>
|
||||
</Setting>
|
||||
<Setting Name="OutputDir" Type="System.String" Scope="User">
|
||||
<Setting Name="OutputDir" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">E:\svnlager\BSMD\nsw\HIS-NORD\Transmitter-Tool\IMP</Value>
|
||||
</Setting>
|
||||
<Setting Name="Transmitter" Type="System.String" Scope="User">
|
||||
<Setting Name="Transmitter" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">E:\svnlager\BSMD\nsw\HIS-NORD\Transmitter-Tool\client.bat</Value>
|
||||
</Setting>
|
||||
<Setting Name="ResultDir" Type="System.String" Scope="User">
|
||||
<Setting Name="ResultDir" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">E:\svnlager\BSMD\nsw\HIS-NORD\Transmitter-Tool\RESULTS</Value>
|
||||
</Setting>
|
||||
<Setting Name="AnswerDir" Type="System.String" Scope="User">
|
||||
<Setting Name="AnswerDir" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">E:\svnlager\BSMD\nsw\HIS-NORD\Transmitter-Tool\ANSWERS</Value>
|
||||
</Setting>
|
||||
<Setting Name="AnswerArchiveDir" Type="System.String" Scope="User">
|
||||
<Setting Name="AnswerArchiveDir" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">E:\svnlager\BSMD\nsw\HIS-NORD\Transmitter-Tool\ANSWERS_DONE</Value>
|
||||
</Setting>
|
||||
<Setting Name="AnswerCorruptDir" Type="System.String" Scope="User">
|
||||
<Setting Name="AnswerCorruptDir" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">E:\svnlager\BSMD\nsw\HIS-NORD\Transmitter-Tool\ANSWERS_CORRUPT</Value>
|
||||
</Setting>
|
||||
<Setting Name="TransmitterRoot" Type="System.String" Scope="User">
|
||||
<Setting Name="TransmitterRoot" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">E:\svnlager\BSMD\nsw\HIS-NORD\</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="bsmd.hisnord.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="bsmd.hisnord.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<userSettings>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup><applicationSettings>
|
||||
<bsmd.hisnord.Properties.Settings>
|
||||
<setting name="BatchTimeoutMins" serializeAs="String">
|
||||
<value>1</value>
|
||||
@ -32,5 +32,5 @@
|
||||
<value>E:\svnlager\BSMD\nsw\HIS-NORD\</value>
|
||||
</setting>
|
||||
</bsmd.hisnord.Properties.Settings>
|
||||
</userSettings>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
|
||||
</applicationSettings>
|
||||
</configuration>
|
||||
|
||||
@ -15,8 +15,8 @@ namespace bsmd.status
|
||||
public class Status
|
||||
{
|
||||
|
||||
private static ILog _log = LogManager.GetLogger(typeof(bsmd.status.Status));
|
||||
private MessageCore _queryCore;
|
||||
private static readonly ILog _log = LogManager.GetLogger(typeof(bsmd.status.Status));
|
||||
private readonly MessageCore _queryCore;
|
||||
|
||||
public Status(MessageCore core2Query) { _queryCore = core2Query; }
|
||||
|
||||
@ -73,12 +73,12 @@ namespace bsmd.status
|
||||
{
|
||||
// three-way bool!
|
||||
if (result.NswResponse.Cancelled != null)
|
||||
_queryCore.Cancelled = result.NswResponse.Equals("Y") ? true : false;
|
||||
_queryCore.Cancelled = result.NswResponse.Equals("Y");
|
||||
else
|
||||
_queryCore.Cancelled = null;
|
||||
|
||||
if (result.NswResponse.VisitIdOrTransitIdCancellable != null)
|
||||
_queryCore.VisitIdOrTransitIdCancellable = result.NswResponse.VisitIdOrTransitIdCancellable.Equals("Y") ? true : false;
|
||||
_queryCore.VisitIdOrTransitIdCancellable = result.NswResponse.VisitIdOrTransitIdCancellable.Equals("Y");
|
||||
else
|
||||
_queryCore.VisitIdOrTransitIdCancellable = null;
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ namespace bsmd.status
|
||||
[Serializable]
|
||||
public class dataset
|
||||
{
|
||||
private static ILog _log = LogManager.GetLogger(typeof(bsmd.status.dataset));
|
||||
private static readonly ILog _log = LogManager.GetLogger(typeof(bsmd.status.dataset));
|
||||
|
||||
/// <summary>
|
||||
/// this class needs a public empty constructor for deserialization
|
||||
|
||||
Loading…
Reference in New Issue
Block a user