Version 3.9.0: Verdopplungsfehler, allerlei andere kleine Bugs, l10p Import ergänzt
This commit is contained in:
parent
7be0296cba
commit
f6caab44f8
@ -80,14 +80,16 @@ namespace ENI2
|
||||
|
||||
// Preload validation fields
|
||||
List<ValidationField> vFields = bsmd.database.ValidationRule.ValidationFields;
|
||||
RuleEngine.RegisterLocodeChecker(bsmd.ExcelReadService.LocodeDB.IsValidLocode);
|
||||
RuleEngine.RegisterLocodeChecker(Util.GlobalStructures.IsValidLocode);
|
||||
|
||||
// Connect to locking service (if enabled)
|
||||
try
|
||||
{
|
||||
if (ENI2.Properties.Settings.Default.UseLocking)
|
||||
{
|
||||
App._lockingServiceClient = new ServiceClient("BasicHttpBinding_IService", ENI2.Properties.Settings.Default.LockingServerAddress);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.Diagnostics.Trace.WriteLine("Exception creating locking service client: {0}", ex.ToString());
|
||||
|
||||
@ -370,6 +370,7 @@ namespace ENI2
|
||||
private void DetailControl_RequestSendValidation()
|
||||
{
|
||||
this.Validate(false);
|
||||
|
||||
foreach(Message aMessage in this._messages)
|
||||
{
|
||||
if(aMessage.InternalStatus == Message.BSMDStatus.TOSEND)
|
||||
@ -387,6 +388,56 @@ namespace ENI2
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// NOA_NOD vor ATA vor ATD Versendereihenfolge sicherstellen
|
||||
bool noa_nod_queued_or_sent = false;
|
||||
bool ata_queued_or_sent = false;
|
||||
foreach(Message aMessage in this._messages)
|
||||
{
|
||||
if(aMessage.MessageNotificationClass == Message.NotificationClass.NOA_NOD)
|
||||
{
|
||||
if ((aMessage.SendSuccess ?? false) || (aMessage.InternalStatus == Message.BSMDStatus.TOSEND))
|
||||
noa_nod_queued_or_sent = true;
|
||||
}
|
||||
if (aMessage.MessageNotificationClass == Message.NotificationClass.ATA)
|
||||
{
|
||||
if ((aMessage.SendSuccess ?? false) || (aMessage.InternalStatus == Message.BSMDStatus.TOSEND))
|
||||
ata_queued_or_sent = true;
|
||||
}
|
||||
}
|
||||
|
||||
foreach(Message aMessage in this._messages)
|
||||
{
|
||||
if((aMessage.MessageNotificationClass == Message.NotificationClass.ATA) && (aMessage.InternalStatus == Message.BSMDStatus.TOSEND))
|
||||
{
|
||||
if(!noa_nod_queued_or_sent)
|
||||
{
|
||||
aMessage.InternalStatus = Message.BSMDStatus.SUSPENDED;
|
||||
aMessage.ChangedBy = "";
|
||||
aMessage.StatusInfo = string.Format("Validation error: NOA_NOD must be sent before ATA");
|
||||
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(aMessage);
|
||||
}
|
||||
}
|
||||
|
||||
if ((aMessage.MessageNotificationClass == Message.NotificationClass.ATD) && (aMessage.InternalStatus == Message.BSMDStatus.TOSEND))
|
||||
{
|
||||
if (!noa_nod_queued_or_sent)
|
||||
{
|
||||
aMessage.InternalStatus = Message.BSMDStatus.SUSPENDED;
|
||||
aMessage.ChangedBy = "";
|
||||
aMessage.StatusInfo = string.Format("Validation error: NOA_NOD must be sent before ATD");
|
||||
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(aMessage);
|
||||
}
|
||||
|
||||
if(!ata_queued_or_sent)
|
||||
{
|
||||
aMessage.InternalStatus = Message.BSMDStatus.SUSPENDED;
|
||||
aMessage.ChangedBy = "";
|
||||
aMessage.StatusInfo = string.Format("Validation error: ATA must be sent before ATD");
|
||||
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(aMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DetailControl_RequestValidate()
|
||||
|
||||
@ -379,9 +379,13 @@ namespace ENI2.DetailViewControls
|
||||
{
|
||||
this.textBoxDisplayId.DataContext = null;
|
||||
this.textBoxDisplayId.DataContext = this.Core;
|
||||
this.textBoxDisplayId.GetBindingExpression(TextBox.TextProperty)?.UpdateTarget();
|
||||
|
||||
this.labelBSMDStatusInternal.DataContext = null;
|
||||
this.labelBSMDStatusInternal.DataContext = this.Core;
|
||||
MessageBox.Show("Visit/Transit ID updated!");
|
||||
this.labelBSMDStatusInternal.GetBindingExpression(Label.ContentProperty)?.UpdateTarget();
|
||||
|
||||
MessageBox.Show(string.Format("Visit/Transit ID updated: {0}", this.Core.DisplayId));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@ -92,7 +92,13 @@
|
||||
</GroupBox>
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static p:Resources.textLast10PortFacilities}" Name="tabLast10PortFacilites">
|
||||
<enictrl:ENIDataGrid Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" x:Name="dataGridLast10PortFacilities" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Button Name="buttonImportExcel" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textImportFromExcel}" Margin="2" Width="120" HorizontalAlignment="Left" VerticalAlignment="Center" Background="Transparent" Click="buttonImportExcel_Click" />
|
||||
<enictrl:ENIDataGrid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" x:Name="dataGridLast10PortFacilities" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||
AutoGenerateColumns="False" Margin="0,5,0,0">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="" Binding="{Binding Identifier}" IsReadOnly="True" />
|
||||
@ -117,6 +123,7 @@
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textSecurityMatters}" Binding="{Binding PortFacilitySecurityMattersToReport}" IsReadOnly="True" Width="0.2*" />
|
||||
</DataGrid.Columns>
|
||||
</enictrl:ENIDataGrid>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static p:Resources.textShipToShip}" Name="tabShipToShip">
|
||||
<enictrl:ENIDataGrid Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" x:Name="dataGridShip2ShipActivities" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||
|
||||
@ -10,6 +10,10 @@ using bsmd.database;
|
||||
|
||||
using System.Windows.Data;
|
||||
using System;
|
||||
using Microsoft.Win32;
|
||||
using System.IO;
|
||||
using ExcelDataReader;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ENI2.DetailViewControls
|
||||
{
|
||||
@ -297,6 +301,89 @@ namespace ENI2.DetailViewControls
|
||||
|
||||
#endregion
|
||||
|
||||
#region Excel import last 10 port facilities
|
||||
|
||||
private void buttonImportExcel_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
OpenFileDialog ofd = new OpenFileDialog();
|
||||
ofd.Filter = "Excel Files|*.xls;*.xlsx";
|
||||
if (ofd.ShowDialog() ?? false)
|
||||
{
|
||||
FileStream stream = null;
|
||||
try
|
||||
{
|
||||
stream = File.Open(ofd.FileName, FileMode.Open, FileAccess.Read);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
using (var reader = ExcelReaderFactory.CreateReader(stream))
|
||||
{
|
||||
List<LastTenPortFacilitiesCalled> importL10C = new List<LastTenPortFacilitiesCalled>();
|
||||
|
||||
try
|
||||
{
|
||||
do
|
||||
{
|
||||
int cnt = 0;
|
||||
while (reader.Read() && (cnt < 10))
|
||||
{
|
||||
if (((IExcelDataReader)reader).FieldCount < 8)
|
||||
{
|
||||
throw new InvalidDataException("Sheet must have 8 Columns of data");
|
||||
}
|
||||
LastTenPortFacilitiesCalled l10c = new LastTenPortFacilitiesCalled();
|
||||
if (reader.IsDBNull(0) && reader.IsDBNull(1)) continue;
|
||||
if (!reader.IsDBNull(0)) l10c.PortFacilityPortName = reader.GetString(0);
|
||||
if (!reader.IsDBNull(2)) l10c.PortFacilityPortCountry = reader.GetString(2);
|
||||
if (!reader.IsDBNull(3)) l10c.PortFacilityPortLoCode = reader.GetString(3);
|
||||
object o = null;
|
||||
if (!reader.IsDBNull(4)) o = reader.GetValue(4);
|
||||
if(o != null) l10c.PortFacilityDateOfArrival = Convert.ToDateTime(o);
|
||||
if (!reader.IsDBNull(5)) o = reader.GetValue(5);
|
||||
if (o != null) l10c.PortFacilityDateOfDeparture = Convert.ToDateTime(o);
|
||||
// if (!reader.IsDBNull(4)) l10c.PortFacilityDateOfArrival = reader.GetDateTime(4);
|
||||
// if (!reader.IsDBNull(5)) l10c.PortFacilityDateOfDeparture = reader.GetDateTime(5);
|
||||
if (!reader.IsDBNull(6)) o = reader.GetValue(6);
|
||||
if (o != null) l10c.PortFacilityShipSecurityLevel = Convert.ToByte(o);
|
||||
if (!reader.IsDBNull(7)) o = reader.GetValue(7);
|
||||
int gisis = Convert.ToInt32(o);
|
||||
if (!reader.IsDBNull(7)) l10c.PortFacilityGISISCode = gisis.ToString().PadLeft(4, '0');
|
||||
if (!reader.IsDBNull(8)) l10c.PortFacilitySecurityMattersToReport = reader.GetString(8);
|
||||
if (l10c.PortFacilitySecurityMattersToReport.Equals("nil", StringComparison.CurrentCultureIgnoreCase))
|
||||
l10c.PortFacilitySecurityMattersToReport = null;
|
||||
|
||||
l10c.SEC = this._sec;
|
||||
l10c.IsDirty = true;
|
||||
l10c.Identifier = LastTenPortFacilitiesCalled.GetNewIdentifier(this._sec.LastTenPortFacilitesCalled);
|
||||
this._sec.LastTenPortFacilitesCalled.Add(l10c);
|
||||
importL10C.Add(l10c);
|
||||
cnt++;
|
||||
}
|
||||
} while (reader.NextResult());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("Error reading Excel: " + ex.Message, Properties.Resources.textCaptionError, MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
|
||||
if (importL10C.Count > 0)
|
||||
{
|
||||
this.dataGridLast10PortFacilities.Items.Refresh();
|
||||
this.SublistElementChanged(Message.NotificationClass.SEC);
|
||||
MessageBox.Show(String.Format(Properties.Resources.textL10PImported, importL10C.Count), Properties.Resources.textCaptionInformation, MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
}
|
||||
}
|
||||
|
||||
stream.Close();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region enable / disable controls
|
||||
|
||||
private void CheckBoxKielCanalPassagePlanned_Checked(object sender, RoutedEventArgs e)
|
||||
|
||||
@ -35,8 +35,8 @@
|
||||
<MinimumRequiredVersion>3.5.1.0</MinimumRequiredVersion>
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>publish.html</WebPage>
|
||||
<ApplicationRevision>2</ApplicationRevision>
|
||||
<ApplicationVersion>3.8.11.%2a</ApplicationVersion>
|
||||
<ApplicationRevision>1</ApplicationRevision>
|
||||
<ApplicationVersion>3.9.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
|
||||
@ -65,7 +65,7 @@ namespace ENI2
|
||||
public static Dictionary<string, string> getNationalities()
|
||||
{
|
||||
Dictionary<string, string> result = new Dictionary<string, string>();
|
||||
string query = string.Format("SELECT Code, Name FROM Nationality");
|
||||
string query = string.Format("SELECT Code, Name FROM Nationality ORDER BY Code");
|
||||
SQLiteCommand cmd = new SQLiteCommand(query, _con);
|
||||
IDataReader reader = cmd.ExecuteReader();
|
||||
while(reader.Read())
|
||||
|
||||
9
ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs
generated
9
ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs
generated
@ -2426,6 +2426,15 @@ namespace ENI2.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0} ports visited imported.
|
||||
/// </summary>
|
||||
public static string textL10PImported {
|
||||
get {
|
||||
return ResourceManager.GetString("textL10PImported", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to LA Code.
|
||||
/// </summary>
|
||||
|
||||
@ -1594,4 +1594,7 @@
|
||||
<data name="textValidationOK" xml:space="preserve">
|
||||
<value>No errors or violations detected</value>
|
||||
</data>
|
||||
<data name="textL10PImported" xml:space="preserve">
|
||||
<value>{0} ports visited imported</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -49,7 +49,7 @@ namespace ENI2.Util
|
||||
|
||||
if(entity.IsTransit)
|
||||
{
|
||||
if (!entity.TransitId.Equals(watchedEntity.TransitId))
|
||||
if ((!watchedEntity.TransitId.IsNullOrEmpty()) && !entity.TransitId.Equals(watchedEntity.TransitId))
|
||||
{
|
||||
OnVisitTransitIdUpdated(entity);
|
||||
watchedEntity.TransitId = entity.TransitId;
|
||||
@ -57,7 +57,7 @@ namespace ENI2.Util
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!entity.VisitId.Equals(watchedEntity.VisitId))
|
||||
if ((!watchedEntity.VisitId.IsNullOrEmpty()) && !entity.VisitId.Equals(watchedEntity.VisitId))
|
||||
{
|
||||
OnVisitTransitIdUpdated(entity);
|
||||
watchedEntity.VisitId = entity.VisitId;
|
||||
|
||||
@ -7,6 +7,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using bsmd.ExcelReadService;
|
||||
|
||||
namespace ENI2.Util
|
||||
{
|
||||
@ -196,5 +197,19 @@ namespace ENI2.Util
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool IsValidLocode(string locode, RuleEngine.LocodeMode mode)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case RuleEngine.LocodeMode.NO_PORT_FLAG:
|
||||
return !LocodeDB.LocationNameFromLocode(locode).IsNullOrEmpty();
|
||||
case RuleEngine.LocodeMode.SSN:
|
||||
return !LocalizedLookup.SSNPortNameFromLocode(locode).IsNullOrEmpty();
|
||||
default:
|
||||
return !LocodeDB.PortNameFromLocode(locode).IsNullOrEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
BIN
ENI-2/data/SEC_Last_10_Ports_Import.xlsx
Normal file
BIN
ENI-2/data/SEC_Last_10_Ports_Import.xlsx
Normal file
Binary file not shown.
Binary file not shown.
@ -159,6 +159,10 @@ namespace SendNSWMessageService
|
||||
}
|
||||
}
|
||||
|
||||
// nach NotificationClass sortieren
|
||||
// das ist wichtig für 861,881,882: NOA_NOD vor ATA vor ATD, falls alles gleichzeitig gesendet wird.
|
||||
toSendMessageList.Sort();
|
||||
|
||||
foreach (Message message in toSendMessageList)
|
||||
{
|
||||
try
|
||||
@ -481,13 +485,13 @@ namespace SendNSWMessageService
|
||||
}
|
||||
|
||||
bsmd.hisnord.transmitter.CallTransmitter(true);
|
||||
// bsmd.hisnord.transmitter.CallTransmitter(false); // wird aktuell nicht funktionieren
|
||||
bsmd.hisnord.transmitter.CallTransmitter(false); // wird aktuell nicht funktionieren
|
||||
|
||||
// ob test oder nicht ist in stat. dict gespeicher
|
||||
bsmd.hisnord.Request.ReadResponseFiles();
|
||||
|
||||
bsmd.hisnord.Response.ReadAnswers(true);
|
||||
// bsmd.hisnord.Response.ReadAnswers(false);
|
||||
bsmd.hisnord.Response.ReadAnswers(false);
|
||||
|
||||
List<MessageCore> coresMarkedForStatusQuery = DBManager.Instance.GetMessageCoresWithNSWStatusFlag();
|
||||
|
||||
|
||||
@ -12,7 +12,6 @@ using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SQLite;
|
||||
using bsmd.database;
|
||||
using ENI2;
|
||||
|
||||
namespace bsmd.ExcelReadService
|
||||
{
|
||||
@ -58,19 +57,6 @@ namespace bsmd.ExcelReadService
|
||||
return result;
|
||||
}
|
||||
|
||||
public static bool IsValidLocode(string locode, RuleEngine.LocodeMode mode)
|
||||
{
|
||||
switch(mode)
|
||||
{
|
||||
case RuleEngine.LocodeMode.NO_PORT_FLAG:
|
||||
return !LocodeDB.LocationNameFromLocode(locode).IsNullOrEmpty();
|
||||
case RuleEngine.LocodeMode.SSN:
|
||||
return !LocalizedLookup.SSNPortNameFromLocode(locode).IsNullOrEmpty();
|
||||
default:
|
||||
return !LocodeDB.PortNameFromLocode(locode).IsNullOrEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static List<string> AllLocodesForCityName(string city)
|
||||
{
|
||||
|
||||
@ -1152,27 +1152,11 @@ namespace bsmd.ExcelReadService
|
||||
reader.Conf.ConfirmText("NOA_NOD.LastPort", lastPort, noa_nod.LastPort.IsNullOrEmpty() ? ExcelReader.ReadState.WARN : ExcelReader.ReadState.OK);
|
||||
|
||||
string nextPort = reader.ReadText("NOA_NOD.NextPort");
|
||||
if (!nextPort.IsNullOrEmpty()) nextPort = nextPort.Trim();
|
||||
|
||||
if (nextPort != null)
|
||||
if (!nextPort.IsNullOrEmpty())
|
||||
{
|
||||
if (LocodeDB.PortNameFromLocode(nextPort) != null)
|
||||
{
|
||||
noa_nod.NextPort = nextPort;
|
||||
}
|
||||
else
|
||||
{
|
||||
List<string> nextPorts = LocodeDB.AllLocodesForCityName(nextPort);
|
||||
if (nextPorts.Count == 1)
|
||||
noa_nod.NextPort = nextPorts[0];
|
||||
else
|
||||
{
|
||||
if (nextPort.Equals("ZZUKN", StringComparison.OrdinalIgnoreCase))
|
||||
noa_nod.NextPort = nextPort;
|
||||
else
|
||||
_log.WarnFormat("{0} results in {1} possible LOCODES", nextPort, nextPorts.Count);
|
||||
}
|
||||
}
|
||||
noa_nod.NextPort = nextPort.Trim();
|
||||
if (noa_nod.NextPort.Length > 5)
|
||||
noa_nod.NextPort = noa_nod.NextPort.Substring(0, 5); //trunc
|
||||
}
|
||||
|
||||
reader.Conf.ConfirmText("NOA_NOD.NextPort", nextPort, noa_nod.NextPort.IsNullOrEmpty() ? ExcelReader.ReadState.WARN : ExcelReader.ReadState.OK);
|
||||
|
||||
22
nsw/Source/bsmd.Tool.sln
Normal file
22
nsw/Source/bsmd.Tool.sln
Normal file
@ -0,0 +1,22 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25123.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bsmd.Tool", "bsmd.Tool\bsmd.Tool.csproj", "{5F5E65EE-9351-4F30-817A-9C6C6D6835AE}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{5F5E65EE-9351-4F30-817A-9C6C6D6835AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5F5E65EE-9351-4F30-817A-9C6C6D6835AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5F5E65EE-9351-4F30-817A-9C6C6D6835AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5F5E65EE-9351-4F30-817A-9C6C6D6835AE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@ -1,10 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-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="bsmd.Tool.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<log4net>
|
||||
<root>
|
||||
<level value="DEBUG" />
|
||||
<appender-ref ref="LogFileAppender" />
|
||||
</root>
|
||||
<appender name="LogFileAppender" type="log4net.Appender.RollingFileAppender" >
|
||||
<param name="File" value="log.bsmd.Tool.txt" />
|
||||
<param name="AppendToFile" value="true" />
|
||||
<rollingStyle value="Size" />
|
||||
<maxSizeRollBackups value="10" />
|
||||
<maximumFileSize value="10MB" />
|
||||
<staticLogFileName value="true" />
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<param name="ConversionPattern" value="%date [%thread] %-5level [%logger] - %message%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
</log4net>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
|
||||
40
nsw/Source/bsmd.Tool/CleanupFiles.cs
Normal file
40
nsw/Source/bsmd.Tool/CleanupFiles.cs
Normal file
@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.IO;
|
||||
|
||||
namespace bsmd.Tool
|
||||
{
|
||||
class CleanupFiles
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Alle XML Dateien in einem Dateipfad(rootPath) (recursive) löschen, die älter als (staleDays) Tage sind
|
||||
/// </summary>
|
||||
/// <param name="rootPath"></param>
|
||||
/// <param name="staleDays"></param>
|
||||
/// <param name="recursive"></param>
|
||||
public static void Cleanup(string rootPath, int staleDays, bool recursive)
|
||||
{
|
||||
if (!Directory.Exists(rootPath)) throw new ArgumentException("directory does not exist");
|
||||
foreach (string file in Directory.GetFiles(rootPath, "*.xml"))
|
||||
{
|
||||
double age = (DateTime.Now - File.GetCreationTime(file)).TotalDays;
|
||||
if (age > staleDays)
|
||||
{
|
||||
Console.WriteLine(file + " - " + age.ToString());
|
||||
File.Delete(file);
|
||||
}
|
||||
}
|
||||
|
||||
if(recursive)
|
||||
{
|
||||
foreach (string directory in Directory.GetDirectories(rootPath))
|
||||
Cleanup(directory, staleDays, recursive);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -25,6 +25,15 @@ namespace bsmd.Tool
|
||||
[Option('r', "checkrules", MutuallyExclusiveSet = "command", HelpText = "Use rule engine on message core")]
|
||||
public bool CheckRules { get; set; }
|
||||
|
||||
[Option('s', "staledays", DefaultValue = 30, HelpText ="Delete files older than X days")]
|
||||
public int StaleDays { get; set; }
|
||||
|
||||
[Option('p', "path", HelpText ="Path to cleanup root folder")]
|
||||
public string CleanupFolderRoot { get; set; }
|
||||
|
||||
[Option('x', "recursive", DefaultValue = false, HelpText ="Cleanup subdirectories recursively")]
|
||||
public bool CleanupRecursive { get; set; }
|
||||
|
||||
[ParserState]
|
||||
public IParserState LastParserState { get; set; }
|
||||
|
||||
|
||||
@ -32,9 +32,13 @@ namespace bsmd.Tool
|
||||
log.FatalFormat("CheckRules: cannot parse message core id");
|
||||
}
|
||||
}
|
||||
else if((options.CleanupFolderRoot != null) && (options.CleanupFolderRoot.Length > 0))
|
||||
{
|
||||
CleanupFiles.Cleanup(options.CleanupFolderRoot, options.StaleDays, options.CleanupRecursive);
|
||||
}
|
||||
else
|
||||
{
|
||||
// .. anderes
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -41,8 +41,8 @@
|
||||
<Reference Include="CommandLine">
|
||||
<HintPath>..\packages\CommandLineParser.1.9.71\lib\net45\CommandLine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=2.0.7.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\log4net.2.0.7\lib\net45-full\log4net.dll</HintPath>
|
||||
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
@ -64,6 +64,7 @@
|
||||
<Link>Properties\AssemblyProjectKeyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="CheckRules.cs" />
|
||||
<Compile Include="CleanupFiles.cs" />
|
||||
<Compile Include="Options.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
||||
<StartArguments>-r -c "8ECF90D2-1F1F-4CDD-A7C7-8E1BB3EF7105"</StartArguments>
|
||||
<StartArguments>-s 100 -p E:\svnlager\BSMD\nsw\HIS-NORD\Transmitter-Tool -x</StartArguments>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="CommandLineParser" version="1.9.71" targetFramework="net45" />
|
||||
<package id="log4net" version="2.0.7" targetFramework="net45" />
|
||||
<package id="log4net" version="2.0.8" targetFramework="net45" />
|
||||
</packages>
|
||||
@ -129,9 +129,11 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
cmd.CommandText = string.Format("INSERT INTO {0} (MessageHeaderId, AgentCompanyName, AgentStreetAndNumber, " +
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
cmd.CommandText = string.Format("INSERT INTO {0} (Id, MessageHeaderId, AgentCompanyName, AgentStreetAndNumber, " +
|
||||
"AgentPostalCode, AgentCity, AgentCountry, AgentLastName, AgentFirstName, AgentPhone, AgentFax, " +
|
||||
"AgentEMail) VALUES (@P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11)", this.Tablename);
|
||||
"AgentEMail) VALUES (@ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11)", this.Tablename);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -51,7 +51,9 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (MessageHeaderId, ATAPortOfCall) VALUES ( @P1, @P2 )",
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, MessageHeaderId, ATAPortOfCall) VALUES (@ID, @P1, @P2 )",
|
||||
this.Tablename);
|
||||
}
|
||||
else
|
||||
|
||||
@ -51,7 +51,9 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (MessageHeaderId, ATDPortOfCall) VALUES ( @P1, @P2 )",
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, MessageHeaderId, ATDPortOfCall) VALUES (@ID, @P1, @P2 )",
|
||||
this.Tablename);
|
||||
}
|
||||
else
|
||||
|
||||
@ -63,8 +63,10 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (MessageHeaderId, BunkerFuelType, BunkerFuelQuantity_TNE, Identifier) " +
|
||||
"VALUES ( @P1, @P2, @P3, @P4 )", this.Tablename);
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, MessageHeaderId, BunkerFuelType, BunkerFuelQuantity_TNE, Identifier) " +
|
||||
"VALUES (@ID, @P1, @P2, @P3, @P4 )", this.Tablename);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -63,8 +63,10 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (MessageHeaderId, BunkerFuelType, BunkerFuelQuantity_TNE, Identifier) " +
|
||||
"VALUES ( @P1, @P2, @P3, @P4 )", this.Tablename);
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, MessageHeaderId, BunkerFuelType, BunkerFuelQuantity_TNE, Identifier) " +
|
||||
"VALUES ( @ID, @P1, @P2, @P3, @P4 )", this.Tablename);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -146,10 +146,12 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (MessageHeaderId, CrewMemberLastName, CrewMemberFirstName, " +
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, MessageHeaderId, CrewMemberLastName, CrewMemberFirstName, " +
|
||||
"CrewMemberPlaceOfBirth, CrewMemberDateOfBirth, CrewMemberGender, CrewMemberNationality,CrewMemberIdentityDocumentType, " +
|
||||
"CrewMemberIdentityDocumentId, CrewMemberVisaNumber, CrewMemberDuty, Identifier, IsDeparture) " +
|
||||
"VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13 )", this.Tablename);
|
||||
"VALUES (@ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13 )", this.Tablename);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -54,8 +54,10 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (NOA_NODId, CallPurposeCode, CallPurposeDescription, Identifier) " +
|
||||
" VALUES ( @P1, @P2, @P3, @P4 )", this.Tablename);
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, NOA_NODId, CallPurposeCode, CallPurposeDescription, Identifier) " +
|
||||
" VALUES (@ID, @P1, @P2, @P3, @P4 )", this.Tablename);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -175,9 +175,11 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (HAZId, ProductName, PollutionCategory, Hazards, " +
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, HAZId, ProductName, PollutionCategory, Hazards, " +
|
||||
"FlashpointInformation, Flashpoint_CEL, Quantity_KGM, StowagePosition, PortOfLoading, PortOfDischarge, " +
|
||||
"SpecRef15_19, Remarks, Identifier) VALUES (@P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, " +
|
||||
"SpecRef15_19, Remarks, Identifier) VALUES (@ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, " +
|
||||
"@P11, @P12, @P13)", this.Tablename);
|
||||
}
|
||||
else
|
||||
|
||||
@ -95,8 +95,10 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (HAZId, UNNumber, IMOClass, ProductName, Quantity_KGM, " +
|
||||
"StowagePosition, PortOfLoading, PortOfDischarge, Remarks, Identifier) VALUES (@P1, @P2, @P3, @P4, " +
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, HAZId, UNNumber, IMOClass, ProductName, Quantity_KGM, " +
|
||||
"StowagePosition, PortOfLoading, PortOfDischarge, Remarks, Identifier) VALUES (@ID, @P1, @P2, @P3, @P4, " +
|
||||
"@P5, @P6, @P7, @P8, @P9, @P10)", this.Tablename);
|
||||
}
|
||||
else
|
||||
|
||||
@ -101,9 +101,11 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (HAZId, BulkCargoShippingName, MHB, UNNumber, " +
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, HAZId, BulkCargoShippingName, MHB, UNNumber, " +
|
||||
"IMOClass, Quantity_KGM, StowagePosition, PortOfLoading, PortOfDischarge, Remarks, Identifier) " +
|
||||
" VALUES (@P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11)", this.Tablename);
|
||||
" VALUES (@ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11)", this.Tablename);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -108,9 +108,11 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (MessageHeaderId, ShippingArea, RequestedPositionInPortOfCall, " +
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, MessageHeaderId, ShippingArea, RequestedPositionInPortOfCall, " +
|
||||
"SpecialRequirementsOfShipAtBerth, ConstructionCharacteristicsOfShip, FumigatedBulkCargo, DeplacementSummerDraught_TNE, " +
|
||||
"PortArea, BowThrusterPower, SternThrusterPower, PortFacility) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11 )", this.Tablename);
|
||||
"PortArea, BowThrusterPower, SternThrusterPower, PortFacility) VALUES ( @ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11 )", this.Tablename);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -154,9 +154,11 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (MessageHeaderId, CargoHandlingType, CargoCodeNST, " +
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, MessageHeaderId, CargoHandlingType, CargoCodeNST, " +
|
||||
"CargoNumberOfItems, CargoGrossQuantity_TNE, PortOfLoading, PortOfDischarge, Identifier, CargoLACode, CargoCodeNST_3) VALUES " +
|
||||
"( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10 )", this.Tablename);
|
||||
"( @ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10 )", this.Tablename);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -93,9 +93,11 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (SEC_Id, PortFacilityPortName, PortFacilityPortCountry, " +
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, SEC_Id, PortFacilityPortName, PortFacilityPortCountry, " +
|
||||
"PortFacilityPortLoCode, PortFacilityDateOfArrival, PortFacilityDateOfDeparture, PortFacilityShipSecurityLevel, " +
|
||||
"PortFacilitySecurityMattersToReport, PortFacilityGISISCode, Identifier) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10)",
|
||||
"PortFacilitySecurityMattersToReport, PortFacilityGISISCode, Identifier) VALUES ( @ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10)",
|
||||
this.Tablename);
|
||||
}
|
||||
else
|
||||
|
||||
@ -106,9 +106,11 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (HAZId, Name, FlashpointInformation, Flashpoint_CEL, " +
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, HAZId, Name, FlashpointInformation, Flashpoint_CEL, " +
|
||||
"Quantity_KGM, StowagePosition, PortOfLoading, PortOfDischarge, Remarks, Identifier) VALUES " +
|
||||
"(@P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10)", this.Tablename);
|
||||
"(@ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10)", this.Tablename);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -57,7 +57,9 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (MessageHeaderId, ErrorCode, ErrorText) VALUES (@MHID, @VC, @VT)", this.Tablename);
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, MessageHeaderId, ErrorCode, ErrorText) VALUES (@ID, @MHID, @VC, @VT)", this.Tablename);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -54,7 +54,9 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (MessageHeaderId, ViolationCode, ViolationText) VALUES (@MHID, @VC, @VT)", this.Tablename);
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, MessageHeaderId, ViolationCode, ViolationText) VALUES (@ID, @MHID, @VC, @VT)", this.Tablename);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -53,7 +53,9 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (MessageHeaderId, NameOfMaster) VALUES ( @P1, @P2 )",
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, MessageHeaderId, NameOfMaster) VALUES ( @ID, @P1, @P2 )",
|
||||
this.Tablename);
|
||||
}
|
||||
else
|
||||
|
||||
@ -159,10 +159,12 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (MessageHeaderId, PassengerLastName, PassengerFirstName, " +
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, MessageHeaderId, PassengerLastName, PassengerFirstName, " +
|
||||
"PassengerPlaceOfBirth, PassengerDateOfBirth, PassengerGender, PassengerNationality, PassengerIdentityDocumentType, " +
|
||||
"PassengerIdentityDocumentId, PassengerVisaNumber, PassengerPortOfEmbarkation, PassengerPortOfDisembarkation," +
|
||||
"PassengerInTransit, Identifier, IsDeparture) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15 )",
|
||||
"PassengerInTransit, Identifier, IsDeparture) VALUES (@ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15 )",
|
||||
this.Tablename);
|
||||
}
|
||||
else
|
||||
|
||||
@ -69,9 +69,11 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (MessageHeaderId, TotalPersonsOnBoardUponArrival, " +
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, MessageHeaderId, TotalPersonsOnBoardUponArrival, " +
|
||||
"TotalCrewMembersOnBoardUponArrival, TotalPassengersOnBoardUponArrival, " +
|
||||
"TotalStowawaysOnBoardUponArrival) VALUES (@P1, @P2, @P3, @P4, @P5)", this.Tablename);
|
||||
"TotalStowawaysOnBoardUponArrival) VALUES (@ID, @P1, @P2, @P3, @P4, @P5)", this.Tablename);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -69,9 +69,11 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (MessageHeaderId, TotalPersonsOnBoardUponDeparture, " +
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, MessageHeaderId, TotalPersonsOnBoardUponDeparture, " +
|
||||
"TotalCrewMembersonBoardUponDeparture, TotalPassengersOnBoardUponDeparture, " +
|
||||
"TotalStowawaysOnBoardUponDeparture) VALUES (@P1, @P2, @P3, @P4, @P5)", this.Tablename);
|
||||
"TotalStowawaysOnBoardUponDeparture) VALUES (@ID, @P1, @P2, @P3, @P4, @P5)", this.Tablename);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -114,9 +114,11 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (MessageHeaderId, Tanker, TankerHullConfiguration, " +
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, MessageHeaderId, Tanker, TankerHullConfiguration, " +
|
||||
"ConditionCargoBallastTanks, NatureOfCargo, VolumeOfCargo, PlannedOperations, PlannedWorks, DateOfLastExpandedInspection, " +
|
||||
"PlannedPeriodOfStay_HUR, IsDueToInspection, PossibleAnchorage) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12 )",
|
||||
"PlannedPeriodOfStay_HUR, IsDueToInspection, PossibleAnchorage) VALUES ( @ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12 )",
|
||||
this.Tablename);
|
||||
}
|
||||
else
|
||||
|
||||
@ -50,8 +50,10 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
cmd.CommandText = string.Format("INSERT INTO {0} (PortOfCallLast30DaysId, PortOfCallLast30DaysCrewJoinedShipName, Identifier) " +
|
||||
"VALUES (@P1, @P2, @P3)" , this.Tablename);
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
cmd.CommandText = string.Format("INSERT INTO {0} (Id, PortOfCallLast30DaysId, PortOfCallLast30DaysCrewJoinedShipName, Identifier) " +
|
||||
"VALUES (@ID, @P1, @P2, @P3)" , this.Tablename);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -62,8 +62,10 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (BPOLId, PortOfItineraryName, PortOfItineraryETA, Identifier, " +
|
||||
"PortOfItineraryLocode) VALUES ( @P1, @P2, @P3, @P4, @P5 )", this.Tablename);
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, BPOLId, PortOfItineraryName, PortOfItineraryETA, Identifier, " +
|
||||
"PortOfItineraryLocode) VALUES ( @ID, @P1, @P2, @P3, @P4, @P5 )", this.Tablename);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -2,6 +2,6 @@
|
||||
|
||||
[assembly: AssemblyCompany("schick Informatik")]
|
||||
[assembly: AssemblyProduct("BSMD NSW interface")]
|
||||
[assembly: AssemblyInformationalVersion("3.8.11")]
|
||||
[assembly: AssemblyInformationalVersion("3.9.0")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014-2017 schick Informatik")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
@ -1,4 +1,4 @@
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("3.8.11.*")]
|
||||
[assembly: AssemblyVersion("3.9.0.*")]
|
||||
|
||||
|
||||
@ -192,9 +192,11 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (RPName, RPStreetAndNumber, RPPostalCode, RPCity, RPCountry, " +
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, RPName, RPStreetAndNumber, RPPostalCode, RPCity, RPCountry, " +
|
||||
"RPLastName, RPFirstName, RPPhone, RPFax, RPEMail, Logon, PasswordHash, Salt, Flags, EMail) VALUES " +
|
||||
"( @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P17 )", this.Tablename);
|
||||
"( @ID, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P17 )", this.Tablename);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -72,8 +72,10 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (MessageHeaderId, ServiceName, ServiceBeneficiary, " +
|
||||
"ServiceInvoiceRecipient, Identifier) VALUES ( @P1, @P2, @P3, @P4, @P5 )", this.Tablename);
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, MessageHeaderId, ServiceName, ServiceBeneficiary, " +
|
||||
"ServiceInvoiceRecipient, Identifier) VALUES ( @ID, @P1, @P2, @P3, @P4, @P5 )", this.Tablename);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -276,11 +276,13 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
cmd.CommandText = string.Format("INSERT INTO {0} (MessageHeaderId, ShipName, CallSign, MMSINumber, " +
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
cmd.CommandText = string.Format("INSERT INTO {0} (Id, MessageHeaderId, ShipName, CallSign, MMSINumber, " +
|
||||
"Flag, LengthOverall_MTR, Beam_MTR, GrossTonnage, PortOfRegistry, InmarsatCallNumber, ShipType, " +
|
||||
"ISMCompanyName, ISMCompanyId, ISMCompanyStreetAndNumber, ISMCompanyPostalCode, ISMCompanyCity, " +
|
||||
"ISMCompanyCountry, TransportMode, NetTonnage, RegistryDate, CertificateOfRegistryNumber) " +
|
||||
"VALUES (@P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, " +
|
||||
"VALUES (@ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, " +
|
||||
" @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20, @P21)", this.Tablename);
|
||||
}
|
||||
else
|
||||
|
||||
@ -129,8 +129,10 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (MessageHeaderId, Name, Quantity, " +
|
||||
"QuantityUnit, LocationOnBoard, OfficialUse, Identifier) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7 )", this.Tablename);
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, MessageHeaderId, Name, Quantity, " +
|
||||
"QuantityUnit, LocationOnBoard, OfficialUse, Identifier) VALUES ( @ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7 )", this.Tablename);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -96,10 +96,12 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (SEC_Id, ShipToShipActivityLocationName, ShipToShipActivityLocationLoCode, " +
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, SEC_Id, ShipToShipActivityLocationName, ShipToShipActivityLocationLoCode, " +
|
||||
"ShipToShipActivityLocationCoordinatesLatitude, ShipToShipActivityLocationCoordinatesLongitude, ShipToShipActivityDateFrom, ShipToShipActivityDateTo, " +
|
||||
"ShipToShipActivityType, ShipToShipActivitySecurityMattersToReport, Identifier, ShipToShipActivityTypeCode) VALUES ( " +
|
||||
"@P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11)",
|
||||
"@ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11)",
|
||||
this.Tablename);
|
||||
}
|
||||
else
|
||||
|
||||
@ -49,8 +49,10 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
cmd.CommandText = string.Format("INSERT INTO {0} (IMDGPositionId, SubsidiaryRisk, Identifier) " +
|
||||
"VALUES (@P1, @P2, @P3)", this.Tablename);
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
cmd.CommandText = string.Format("INSERT INTO {0} (Id, IMDGPositionId, SubsidiaryRisk, Identifier) " +
|
||||
"VALUES (@ID, @P1, @P2, @P3)", this.Tablename);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -135,8 +135,10 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (ErrorAt, MeldeType, ReferenceId, ProcessStatus, ImportFilename, ErrorCode, ErrorMessage, ErrorDescription, MessageCoreId, Status, MessageHeaderId) " +
|
||||
"VALUES (@EAT, @MT, @REFID, @PS, @IF, @EC, @EM, @ED, @MCID, @STATUS, @MHID)", this.Tablename);
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, ErrorAt, MeldeType, ReferenceId, ProcessStatus, ImportFilename, ErrorCode, ErrorMessage, ErrorDescription, MessageCoreId, Status, MessageHeaderId) " +
|
||||
"VALUES (@ID, @EAT, @MT, @REFID, @PS, @IF, @EC, @EM, @ED, @MCID, @STATUS, @MHID)", this.Tablename);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -24,7 +24,7 @@ namespace bsmd.database
|
||||
|
||||
#region Properties
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.DRAUGHT_IMPLAUSIBLE)]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[LookupName("TIEFA.DraughtUponArrival_DMT")]
|
||||
[ENI2Validation]
|
||||
public double? DraughtUponArrival_DMT { get; set; }
|
||||
@ -51,7 +51,9 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (MessageHeaderId, DraughtUponArrival_DMT) VALUES ( @P1, @P2 )",
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, MessageHeaderId, DraughtUponArrival_DMT) VALUES ( @ID, @P1, @P2 )",
|
||||
this.Tablename);
|
||||
}
|
||||
else
|
||||
|
||||
@ -25,7 +25,7 @@ namespace bsmd.database
|
||||
#region Properties
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.DRAUGHT_IMPLAUSIBLE)]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[LookupName("TIEFD.DraughtUponDeparture_DMT")]
|
||||
[ENI2Validation]
|
||||
public double? DraughtUponDeparture_DMT { get; set; }
|
||||
@ -52,7 +52,9 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (MessageHeaderId, DraughtUponDeparture_DMT) VALUES ( @P1, @P2 )",
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, MessageHeaderId, DraughtUponDeparture_DMT) VALUES ( @ID, @P1, @P2 )",
|
||||
this.Tablename);
|
||||
}
|
||||
else
|
||||
|
||||
@ -149,12 +149,14 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (MessageHeaderId, TowageOnArrivalName, TowageOnArrivalFlag, " +
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, MessageHeaderId, TowageOnArrivalName, TowageOnArrivalFlag, " +
|
||||
"TowageOnArrivalOperatorCompanyName, TowageOnArrivalOperatorStreetNameAndNumber, TowageOnArrivalOperatorPostalCode, " +
|
||||
"TowageOnArrivalOperatorCity, TowageOnArrivalOperatorCountry, TowageOnArrivalOperatorPhone, " +
|
||||
"TowageOnArrivalOperatorFax, TowageOnArrivalOperatorEmail, TowageOnArrivalGrossTonnage, " +
|
||||
"TowageOnArrivalLengthOverall_MTR, TowageOnArrivalBeam_MTR, TowageOnArrivalPurposeOfCall, " +
|
||||
"TowageOnArrivalDraught_DMT, TowageOnArrivalRemarks, Identifier) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, " +
|
||||
"TowageOnArrivalDraught_DMT, TowageOnArrivalRemarks, Identifier) VALUES ( @ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, " +
|
||||
"@P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18 )", this.Tablename);
|
||||
}
|
||||
else
|
||||
|
||||
@ -133,12 +133,14 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (MessageHeaderId, TowageOnDepartureName, TowageOnDepartureFlag, " +
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, MessageHeaderId, TowageOnDepartureName, TowageOnDepartureFlag, " +
|
||||
"TowageOnDepartureOperatorCompanyName, TowageOnDepartureOperatorStreetNameAndNumber, TowageOnDepartureOperatorPostalCode, " +
|
||||
"TowageOnDepartureOperatorCity, TowageOnDepartureOperatorCountry, TowageOnDepartureOperatorPhone, " +
|
||||
"TowageOnDepartureOperatorFax, TowageOnDepartureOperatorEmail, " +
|
||||
"TowageOnDepartureLengthOverall_MTR, TowageOnDepartureBeam_MTR, " +
|
||||
"TowageOnDepartureDraught_DMT, TowageOnDepartureRemarks, Identifier) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, " +
|
||||
"TowageOnDepartureDraught_DMT, TowageOnDepartureRemarks, Identifier) VALUES ( @ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, " +
|
||||
"@P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16 )", this.Tablename);
|
||||
}
|
||||
else
|
||||
|
||||
@ -138,8 +138,6 @@ namespace bsmd.database
|
||||
|
||||
foreach (Message.NotificationClass notificationClass in Enum.GetValues(typeof(Message.NotificationClass)))
|
||||
{
|
||||
if (messageDict.ContainsKey(notificationClass)) continue;
|
||||
|
||||
if(isDE)
|
||||
{
|
||||
if ((notificationClass == Message.NotificationClass.CREWD) ||
|
||||
@ -159,16 +157,27 @@ namespace bsmd.database
|
||||
if (core.IsTransit && (notificationClass == Message.NotificationClass.VISIT)) continue;
|
||||
if (!core.IsTransit && (notificationClass == Message.NotificationClass.TRANSIT)) continue;
|
||||
|
||||
Message message = new Message();
|
||||
Message message = null;
|
||||
|
||||
if (!messageDict.ContainsKey(notificationClass))
|
||||
{
|
||||
message = new Message();
|
||||
if (user != null)
|
||||
message.CreatedBy = string.Format("ENI-2: {0}", user.Logon);
|
||||
message.MessageCore = core;
|
||||
message.MessageCoreId = core.Id;
|
||||
message.MessageNotificationClass = notificationClass;
|
||||
DBManager.Instance.Save(message);
|
||||
result.Add(message);
|
||||
}
|
||||
else
|
||||
{
|
||||
message = messageDict[notificationClass];
|
||||
}
|
||||
|
||||
// abgesehen von "Listen" für die Nachrichtenklassen auch untergeordnete Elemente erzeugen
|
||||
// abgesehen von "Listen" für die Nachrichtenklassen auch untergeordnete Elemente erzeugen, falls nicht vorhanden!
|
||||
DatabaseEntity classElement = null;
|
||||
if (!Message.IsListClass(notificationClass))
|
||||
if (!Message.IsListClass(notificationClass) && (message.Elements.Count == 0))
|
||||
{
|
||||
classElement = DBManager.CreateMessage(notificationClass);
|
||||
|
||||
@ -177,17 +186,13 @@ namespace bsmd.database
|
||||
{
|
||||
((MDH)classElement).SetBoolsToFalse();
|
||||
}
|
||||
}
|
||||
|
||||
DBManager.Instance.Save(message);
|
||||
|
||||
if (classElement != null) // null für Visit/Transit/List
|
||||
if (classElement != null) // null für Visit/Transit
|
||||
{
|
||||
classElement.MessageHeader = message;
|
||||
DBManager.Instance.Save(classElement);
|
||||
message.Elements.Add(classElement);
|
||||
}
|
||||
result.Add(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
||||
@ -203,10 +203,10 @@ namespace bsmd.database
|
||||
switch (this.ConditionOperator)
|
||||
{
|
||||
case ConditionOperatorEnum.EQUAL:
|
||||
result = val.ToString().Equals(this.Value);
|
||||
result = (val ?? "").ToString().Equals(this.Value);
|
||||
break;
|
||||
case ConditionOperatorEnum.NOT_EQUAL:
|
||||
result = !val.ToString().Equals(this.Value);
|
||||
result = !(val ?? "").ToString().Equals(this.Value);
|
||||
break;
|
||||
case ConditionOperatorEnum.LESS:
|
||||
//result = val.ToString() < this.Value;
|
||||
|
||||
@ -340,6 +340,7 @@ namespace bsmd.database
|
||||
if (field.NotificationClass.HasValue)
|
||||
{
|
||||
// Feld gehört zu einer Liste auf "Top-Level" Ebene
|
||||
if(messageLookup.ContainsKey(field.NotificationClass.Value))
|
||||
_lookupListDict.Add(field, messageLookup[field.NotificationClass.Value].Elements.Cast<object>().ToList());
|
||||
}
|
||||
else
|
||||
|
||||
@ -144,10 +144,12 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (WASId, WasteType, WasteDescription, " +
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, WASId, WasteType, WasteDescription, " +
|
||||
"WasteDisposalAmount_MTQ, WasteCapacity_MTQ, WasteAmountRetained_MTQ, WasteDisposalPort, " +
|
||||
"WasteAmountGeneratedTillNextPort_MTQ, WasteDisposedAtLastPort_MTQ, Identifier) " +
|
||||
" VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10 )", this.Tablename);
|
||||
" VALUES ( @ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10 )", this.Tablename);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -54,8 +54,10 @@ namespace bsmd.database
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (WASId, WasteDisposalServiceProviderName, WasteDisposalDelivery, Identifier) " +
|
||||
"VALUES ( @P1, @P2, @P3, @P4 )", this.Tablename);
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, WASId, WasteDisposalServiceProviderName, WasteDisposalDelivery, Identifier) " +
|
||||
"VALUES ( @ID, @P1, @P2, @P3, @P4 )", this.Tablename);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -146,7 +146,7 @@ namespace bsmd.database
|
||||
}
|
||||
}
|
||||
|
||||
if (Message.IsListClass(message.MessageNotificationClass) && (message.Elements.Count == 0))
|
||||
if (Message.IsListClass(message.MessageNotificationClass) && (message.Elements.Count == 0) && (!message.Reset))
|
||||
{
|
||||
message.StatusInfo = "empty list message type";
|
||||
return false;
|
||||
|
||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user