Version 5.0.11, Monatsende Juli

This commit is contained in:
Daniel Schick 2018-06-30 08:54:12 +00:00
parent 4a2feba85a
commit c26f49dc92
18 changed files with 82 additions and 33 deletions

BIN
AIS/AIS.Bereinigung.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

View File

@ -35,6 +35,7 @@
<CheckBox Name="checkBoxCruiseShip" IsChecked="{Binding CruiseShip}" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center"/>
<Label Content="{x:Static p:Resources.textItineraryPort}" Grid.Column="0" Grid.Row="3" HorizontalContentAlignment="Left" Margin="0,0,10,0"/>
<Button Name="buttonImportFromSEC" Grid.Column="1" Grid.Row="3" Margin="2" HorizontalAlignment="Right" Content="{x:Static p:Resources.textImportFromSEC}" Width="120" VerticalAlignment="Center" Click="buttonImportFromSEC_Click" Background="Transparent" />
<enictrl:ENIDataGrid Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" x:Name="dataGridPortOfItinerary" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
AutoGenerateColumns="False" Margin="0,5,0,0">
<DataGrid.Columns>

View File

@ -27,7 +27,9 @@ namespace ENI2.DetailViewControls
private Message _crewdMessage;
private Message _pasMessage;
private Message _pasdMessage;
private Message _secMessage;
private BPOL _bpol;
private SEC _sec;
public BorderPoliceDetailControl()
{
@ -54,6 +56,13 @@ namespace ENI2.DetailViewControls
if (aMessage.MessageNotificationClass == Message.NotificationClass.PAS) { this._pasMessage = aMessage; this.ControlMessages.Add(aMessage); }
if (aMessage.MessageNotificationClass == Message.NotificationClass.CREWD) { this._crewdMessage = aMessage; this.ControlMessages.Add(aMessage); }
if (aMessage.MessageNotificationClass == Message.NotificationClass.PASD) { this._pasdMessage = aMessage; this.ControlMessages.Add(aMessage); }
if (aMessage.MessageNotificationClass == Message.NotificationClass.SEC)
{
this._secMessage = aMessage;
if (this._secMessage.Elements.Count > 0) this._sec = this._secMessage.Elements[0] as SEC;
}
}
#region init BPOL
@ -210,6 +219,39 @@ namespace ENI2.DetailViewControls
this.DataGridPortOfItinerary_CreateRequested();
}
private void buttonImportFromSEC_Click(object sender, RoutedEventArgs e)
{
if (this._bpol.PortOfItineraries.Count > 0)
{
MessageBox.Show(Properties.Resources.textOnlyIfGridIsEmpty, Properties.Resources.textCaptionError, MessageBoxButton.OK, MessageBoxImage.Warning);
}
else
{
if (this._sec != null)
{
foreach (LastTenPortFacilitiesCalled l10fc in _sec.LastTenPortFacilitesCalled)
{
if (l10fc.PortFacilityDateOfDeparture.HasValue &&
((DateTime.Now - l10fc.PortFacilityDateOfDeparture.Value).TotalDays < 31))
{
PortOfItinerary poi = new PortOfItinerary();
poi.Identifier = PortOfItinerary.GetNewIdentifier(this._bpol.PortOfItineraries);
poi.BPOL = this._bpol;
poi.PortOfItineraryETA = l10fc.PortFacilityDateOfArrival;
poi.PortOfItineraryLocode = l10fc.PortFacilityPortLoCode;
poi.PortOfItineraryName = l10fc.PortFacilityPortName;
this._bpol.PortOfItineraries.Add(poi);
}
}
if (this._bpol.PortOfItineraries.Count > 0)
{
this.dataGridPortOfItinerary.Items.Refresh();
this.SublistElementChanged(Message.NotificationClass.BPOL);
}
}
}
}
#endregion
#region passenger grid
@ -495,8 +537,8 @@ namespace ENI2.DetailViewControls
PAS pas = new PAS();
if (reader.IsDBNull(0) && reader.IsDBNull(1)) continue;
if (!reader.IsDBNull(0)) pas.PassengerLastName = reader.GetString(0);
if (!reader.IsDBNull(1)) pas.PassengerFirstName = reader.GetString(1);
if (!reader.IsDBNull(0)) pas.PassengerLastName = reader.GetValue(0).ToString();
if (!reader.IsDBNull(1)) pas.PassengerFirstName = reader.GetValue(1).ToString();
if (!reader.IsDBNull(2)) pas.PassengerGender = GlobalStructures.ParseGender(reader.GetString(2));
if (!reader.IsDBNull(3)) pas.PassengerNationality = reader.GetString(3).Substring(0, 2).ToUpper();
if (!reader.IsDBNull(4)) pas.PassengerPortOfEmbarkation = reader.GetString(4);

View File

@ -262,7 +262,11 @@ namespace ENI2.DetailViewControls
if (!reader.IsDBNull(1)) o = reader.GetValue(1); else o = null;
if (o != null) waste.WasteType = Convert.ToInt32(o);
if (o != null)
{
waste.WasteType = Convert.ToInt32(o);
if (waste.WasteType == 2313) waste.WasteType = 2600;
}
if (!reader.IsDBNull(3)) waste.WasteDescription = reader.GetString(3);

View File

@ -35,8 +35,8 @@
<MinimumRequiredVersion>3.5.1.0</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.html</WebPage>
<ApplicationRevision>2</ApplicationRevision>
<ApplicationVersion>5.0.10.%2a</ApplicationVersion>
<ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>5.0.11.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted>
@ -124,23 +124,23 @@
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="Xceed.Wpf.AvalonDock, Version=3.3.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>packages\Extended.Wpf.Toolkit.3.3.0\lib\net40\Xceed.Wpf.AvalonDock.dll</HintPath>
<Reference Include="Xceed.Wpf.AvalonDock, Version=3.2.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>packages\Extended.Wpf.Toolkit.3.2.0\lib\net40\Xceed.Wpf.AvalonDock.dll</HintPath>
</Reference>
<Reference Include="Xceed.Wpf.AvalonDock.Themes.Aero, Version=3.3.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>packages\Extended.Wpf.Toolkit.3.3.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll</HintPath>
<Reference Include="Xceed.Wpf.AvalonDock.Themes.Aero, Version=3.2.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>packages\Extended.Wpf.Toolkit.3.2.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll</HintPath>
</Reference>
<Reference Include="Xceed.Wpf.AvalonDock.Themes.Metro, Version=3.3.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>packages\Extended.Wpf.Toolkit.3.3.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll</HintPath>
<Reference Include="Xceed.Wpf.AvalonDock.Themes.Metro, Version=3.2.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>packages\Extended.Wpf.Toolkit.3.2.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll</HintPath>
</Reference>
<Reference Include="Xceed.Wpf.AvalonDock.Themes.VS2010, Version=3.3.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>packages\Extended.Wpf.Toolkit.3.3.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll</HintPath>
<Reference Include="Xceed.Wpf.AvalonDock.Themes.VS2010, Version=3.2.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>packages\Extended.Wpf.Toolkit.3.2.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll</HintPath>
</Reference>
<Reference Include="Xceed.Wpf.DataGrid, Version=3.3.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>packages\Extended.Wpf.Toolkit.3.3.0\lib\net40\Xceed.Wpf.DataGrid.dll</HintPath>
<Reference Include="Xceed.Wpf.DataGrid, Version=3.2.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>packages\Extended.Wpf.Toolkit.3.2.0\lib\net40\Xceed.Wpf.DataGrid.dll</HintPath>
</Reference>
<Reference Include="Xceed.Wpf.Toolkit, Version=3.3.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>packages\Extended.Wpf.Toolkit.3.3.0\lib\net40\Xceed.Wpf.Toolkit.dll</HintPath>
<Reference Include="Xceed.Wpf.Toolkit, Version=3.2.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>packages\Extended.Wpf.Toolkit.3.2.0\lib\net40\Xceed.Wpf.Toolkit.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>

View File

@ -64,10 +64,11 @@ namespace ENI2
public static bool PortAreaExists(string locode, string portArea)
{
if (locode.IsNullOrEmpty() || portArea.IsNullOrEmpty()) return false;
string query = string.Format("SELECT COUNT(*) FROM INFO_PortArea WHERE Locode = '{0}' AND Code = '{1}'", locode, portArea);
SQLiteCommand cmd = new SQLiteCommand(query, _con);
long numResults = (long) cmd.ExecuteScalar();
return (numResults > 0);
return numResults > 0;
}
public static Dictionary<string, string> getNationalities()

View File

@ -4,7 +4,7 @@ Sample license text.
-->
<packages>
<package id="ExcelDataReader" version="3.4.0" targetFramework="net452" />
<package id="Extended.Wpf.Toolkit" version="3.3.0" targetFramework="net452" />
<package id="Extended.Wpf.Toolkit" version="3.2.0" targetFramework="net452" />
<package id="log4net" version="2.0.8" targetFramework="net452" />
<package id="System.Data.SQLite.Core" version="1.0.108.0" targetFramework="net452" />
</packages>

Binary file not shown.

View File

@ -19,7 +19,7 @@ namespace bsmd.ExcelReadService
/// Locodes suchen (zu Orten), die DB ist aus einem github Projekt:
/// https://github.com/kabisa/un_locode
/// </summary>
public class LocodeDB
public static class LocodeDB
{
private static SQLiteConnection _con;
private const string _locode_DB_NAME = "db.sqlite";
@ -202,10 +202,10 @@ namespace bsmd.ExcelReadService
public string Locode { get; set; }
public string Name { get; set; }
public int CompareTo(object otherLocode)
public int CompareTo(object obj)
{
if (otherLocode is LocodeEntry)
return Locode.CompareTo(((LocodeEntry)otherLocode).Locode);
if (obj is LocodeEntry)
return Locode.CompareTo(((LocodeEntry)obj).Locode);
else
return 0;
}

View File

@ -196,7 +196,7 @@ namespace bsmd.database
public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
{
if ((PortArea != null) && (PortArea.Length >= 2) && (PortArea.Length <= 4))
if ((PortArea?.Length >= 2) && (PortArea.Length <= 4))
{
if ((RuleEngine.PortAreaChecker != null) && (this.MessageCore != null))
if (!RuleEngine.PortAreaChecker(this.MessageCore.PoC, this.PortArea))

View File

@ -98,14 +98,14 @@ namespace bsmd.database
[ShowReport]
[ReportDisplayName("Port of embarkation")]
[Validation(ValidationCode.NOT_NULL)]
[Validation(ValidationCode.LOCODE)]
[MaxLength(5)]
[ENI2Validation]
public string PassengerPortOfEmbarkation { get; set; }
[ShowReport]
[ReportDisplayName("Port of disembarkation")]
[Validation(ValidationCode.NOT_NULL)]
[Validation(ValidationCode.LOCODE)]
[MaxLength(5)]
[ENI2Validation]
public string PassengerPortOfDisembarkation { get; set; }

View File

@ -2,6 +2,6 @@
[assembly: AssemblyCompany("schick Informatik")]
[assembly: AssemblyProduct("BSMD NSW interface")]
[assembly: AssemblyInformationalVersion("5.0.9")]
[assembly: AssemblyInformationalVersion("5.0.11")]
[assembly: AssemblyCopyright("Copyright © 2014-2018 schick Informatik")]
[assembly: AssemblyTrademark("")]

View File

@ -1,4 +1,4 @@
using System.Reflection;
[assembly: AssemblyVersion("5.0.9.*")]
[assembly: AssemblyVersion("5.0.11.*")]

View File

@ -41,6 +41,7 @@ namespace bsmd.database
(message.MessageNotificationClass == Message.NotificationClass.SERV) ||
(message.MessageNotificationClass == Message.NotificationClass.WAS) ||
(message.MessageNotificationClass == Message.NotificationClass.TOWD) ||
(message.MessageNotificationClass == Message.NotificationClass.HAZD) || // hinzugefügt nach Trello Karte 26.6.18
(message.MessageNotificationClass == Message.NotificationClass.STO))
{
message.StatusInfo = "Meldeklasse bei Transitmeldung nicht versandt";

View File

@ -10,7 +10,7 @@ using System.Xml.Linq;
namespace bsmd.hisnord
{
public class Response
public static class Response
{
private static ILog _log = LogManager.GetLogger(typeof(Response));

Binary file not shown.