Compare commits
No commits in common. "develop" and "feature/eni_7.12" have entirely different histories.
develop
...
feature/en
@ -1,8 +1,20 @@
|
|||||||
// Copyright (c) 2017 Informatibüro Daniel Schick
|
// Copyright (c) 2017 Informatibüro Daniel Schick
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Navigation;
|
||||||
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
using bsmd.database;
|
using bsmd.database;
|
||||||
using System.Windows.Controls;
|
|
||||||
using System.Windows.Input;
|
|
||||||
|
|
||||||
namespace ENI2
|
namespace ENI2
|
||||||
{
|
{
|
||||||
@ -32,6 +44,7 @@ namespace ENI2
|
|||||||
DataGrid grid = sender as DataGrid;
|
DataGrid grid = sender as DataGrid;
|
||||||
if(grid?.SelectedItems?.Count == 1)
|
if(grid?.SelectedItems?.Count == 1)
|
||||||
{
|
{
|
||||||
|
DataGridRow dgr = grid.ItemContainerGenerator.ContainerFromItem(grid.SelectedItem) as DataGridRow;
|
||||||
MessageCore selectedCore = grid.SelectedItem as MessageCore;
|
MessageCore selectedCore = grid.SelectedItem as MessageCore;
|
||||||
this.DisplayCore(selectedCore);
|
this.DisplayCore(selectedCore);
|
||||||
}
|
}
|
||||||
@ -50,7 +63,7 @@ namespace ENI2
|
|||||||
{
|
{
|
||||||
if((this.MessageCoreSelected != null) && (aMessageCore != null))
|
if((this.MessageCoreSelected != null) && (aMessageCore != null))
|
||||||
{
|
{
|
||||||
this.MessageCoreSelected(aMessageCore, DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].ShipcallDisplayMode);
|
this.MessageCoreSelected(aMessageCore);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
(c) 2017-present Informatikbüro Daniel Schick
|
(c) 2017-present Informatikbüro Daniel Schick
|
||||||
-->
|
-->
|
||||||
@ -12,7 +12,7 @@
|
|||||||
</sectionGroup>
|
</sectionGroup>
|
||||||
</configSections>
|
</configSections>
|
||||||
<startup>
|
<startup>
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
|
||||||
</startup>
|
</startup>
|
||||||
<applicationSettings>
|
<applicationSettings>
|
||||||
<ENI2.Properties.Settings>
|
<ENI2.Properties.Settings>
|
||||||
@ -23,14 +23,11 @@
|
|||||||
<value>60</value>
|
<value>60</value>
|
||||||
</setting>
|
</setting>
|
||||||
<setting name="changeTimerTimeout" serializeAs="String">
|
<setting name="changeTimerTimeout" serializeAs="String">
|
||||||
<value>1000</value>
|
<value>5000</value>
|
||||||
</setting>
|
</setting>
|
||||||
<setting name="LockingServerAddress" serializeAs="String">
|
<setting name="LockingServerAddress" serializeAs="String">
|
||||||
<value>http://192.168.2.24/LockingService/LockingService.svc</value>
|
<value>http://192.168.2.24/LockingService/LockingService.svc</value>
|
||||||
</setting>
|
</setting>
|
||||||
<setting name="ReportAuthor" serializeAs="String">
|
|
||||||
<value>BSMD ReportGenerator</value>
|
|
||||||
</setting>
|
|
||||||
<setting name="ConnectionString" serializeAs="String">
|
<setting name="ConnectionString" serializeAs="String">
|
||||||
<value>Initial Catalog=nswtest;Data Source=192.168.2.24\SQLEXPRESS;Uid=dfuser;pwd=dfpasswd;Persist Security Info=False;Connection Reset=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>
|
</setting>
|
||||||
@ -41,30 +38,6 @@
|
|||||||
<setting name="MainWindowPlacement" serializeAs="String">
|
<setting name="MainWindowPlacement" serializeAs="String">
|
||||||
<value/>
|
<value/>
|
||||||
</setting>
|
</setting>
|
||||||
<setting name="Width" serializeAs="String">
|
|
||||||
<value>825</value>
|
|
||||||
</setting>
|
|
||||||
<setting name="Height" serializeAs="String">
|
|
||||||
<value>450</value>
|
|
||||||
</setting>
|
|
||||||
<setting name="W1Left" serializeAs="String">
|
|
||||||
<value>0</value>
|
|
||||||
</setting>
|
|
||||||
<setting name="W1Top" serializeAs="String">
|
|
||||||
<value>0</value>
|
|
||||||
</setting>
|
|
||||||
<setting name="W2Left" serializeAs="String">
|
|
||||||
<value>0</value>
|
|
||||||
</setting>
|
|
||||||
<setting name="W2Top" serializeAs="String">
|
|
||||||
<value>0</value>
|
|
||||||
</setting>
|
|
||||||
<setting name="W3Left" serializeAs="String">
|
|
||||||
<value>0</value>
|
|
||||||
</setting>
|
|
||||||
<setting name="W3Top" serializeAs="String">
|
|
||||||
<value>0</value>
|
|
||||||
</setting>
|
|
||||||
</ENI2.Properties.Settings>
|
</ENI2.Properties.Settings>
|
||||||
</userSettings>
|
</userSettings>
|
||||||
<system.serviceModel>
|
<system.serviceModel>
|
||||||
@ -77,52 +50,4 @@
|
|||||||
<endpoint address="http://localhost:11651/LockingService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService" contract="LockingServiceReference.IService" name="BasicHttpBinding_IService"/>
|
<endpoint address="http://localhost:11651/LockingService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService" contract="LockingServiceReference.IService" name="BasicHttpBinding_IService"/>
|
||||||
</client>
|
</client>
|
||||||
</system.serviceModel>
|
</system.serviceModel>
|
||||||
<runtime>
|
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-9.0.0.3" newVersion="9.0.0.3" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Microsoft.Extensions.Logging.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-9.0.0.9" newVersion="9.0.0.9" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-6.0.3.0" newVersion="6.0.3.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.2.4.0" newVersion="4.2.4.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Microsoft.Extensions.Options" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-6.0.0.1" newVersion="6.0.0.1" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-6.0.0.2" newVersion="6.0.0.2" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-9.0.0.3" newVersion="9.0.0.3" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Microsoft.Extensions.Primitives" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-9.0.0.3" newVersion="9.0.0.3" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Security.Cryptography.Pkcs" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-9.0.0.9" newVersion="9.0.0.9" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
|
||||||
</runtime>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|||||||
@ -6,8 +6,6 @@ using System.Windows;
|
|||||||
using System.Windows.Markup;
|
using System.Windows.Markup;
|
||||||
|
|
||||||
using bsmd.database;
|
using bsmd.database;
|
||||||
using log4net;
|
|
||||||
|
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using System;
|
using System;
|
||||||
@ -15,16 +13,13 @@ using System.Net;
|
|||||||
using ENI2.LockingServiceReference;
|
using ENI2.LockingServiceReference;
|
||||||
using ENI2.Util;
|
using ENI2.Util;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.Office.Interop.Excel;
|
|
||||||
using System.Drawing.Drawing2D;
|
|
||||||
|
|
||||||
namespace ENI2
|
namespace ENI2
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interaction logic for App.xaml
|
/// Interaction logic for App.xaml
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class App : System.Windows.Application
|
public partial class App : Application
|
||||||
{
|
{
|
||||||
// "global" statics, da gibt es sicher noch einen eleganteren Weg..
|
// "global" statics, da gibt es sicher noch einen eleganteren Weg..
|
||||||
private static ServiceClient _lockingServiceClient = null;
|
private static ServiceClient _lockingServiceClient = null;
|
||||||
@ -35,8 +30,6 @@ namespace ENI2
|
|||||||
private ManualResetEvent ResetSplashCreated;
|
private ManualResetEvent ResetSplashCreated;
|
||||||
private Thread _splashThread;
|
private Thread _splashThread;
|
||||||
|
|
||||||
private readonly ILog _log = LogManager.GetLogger(typeof(App).Name);
|
|
||||||
|
|
||||||
public App() : base()
|
public App() : base()
|
||||||
{
|
{
|
||||||
this.Dispatcher.UnhandledException += Dispatcher_UnhandledException;
|
this.Dispatcher.UnhandledException += Dispatcher_UnhandledException;
|
||||||
@ -75,10 +68,11 @@ namespace ENI2
|
|||||||
// initialize static / localized lookups from sqlite database
|
// initialize static / localized lookups from sqlite database
|
||||||
|
|
||||||
string langKey = CultureInfo.CurrentCulture.TwoLetterISOLanguageName;
|
string langKey = CultureInfo.CurrentCulture.TwoLetterISOLanguageName;
|
||||||
|
|
||||||
Dictionary<int, string> cargoHandlingDict = LocalizedLookup.getLADGCargoHandlingStrings(langKey);
|
Dictionary<int, string> cargoHandlingDict = LocalizedLookup.getLADGCargoHandlingStrings(langKey);
|
||||||
foreach (int key in cargoHandlingDict.Keys)
|
foreach (int key in cargoHandlingDict.Keys)
|
||||||
LADG.CargoHandlingDict.Add(key, cargoHandlingDict[key]);
|
LADG.CargoHandlingDict.Add(key, cargoHandlingDict[key]);
|
||||||
LADG.MVSHLocodes.AddRange(LocalizedLookup.getMVSHLocodes());
|
|
||||||
EventManager.RegisterClassHandler(typeof(DatePicker), DatePicker.PreviewKeyDownEvent, new KeyEventHandler(this.DatePicker_PreviewKeyDown));
|
EventManager.RegisterClassHandler(typeof(DatePicker), DatePicker.PreviewKeyDownEvent, new KeyEventHandler(this.DatePicker_PreviewKeyDown));
|
||||||
CREW.NationalityDict = LocalizedLookup.getNationalities();
|
CREW.NationalityDict = LocalizedLookup.getNationalities();
|
||||||
STAT.VesselTypeDict = LocalizedLookup.getVesselTypes();
|
STAT.VesselTypeDict = LocalizedLookup.getVesselTypes();
|
||||||
@ -89,7 +83,7 @@ namespace ENI2
|
|||||||
LADG.CargoCodesNST3 = LocalizedLookup.getCargoCodesNST3();
|
LADG.CargoCodesNST3 = LocalizedLookup.getCargoCodesNST3();
|
||||||
|
|
||||||
// Load import value mappings
|
// Load import value mappings
|
||||||
Task.Run(async () => await ValueMapping.LoadDicts());
|
ValueMapping.LoadDicts();
|
||||||
|
|
||||||
// Preload validation fields
|
// Preload validation fields
|
||||||
List<ValidationField> vFields = bsmd.database.ValidationRule.ValidationFields;
|
List<ValidationField> vFields = bsmd.database.ValidationRule.ValidationFields;
|
||||||
@ -159,9 +153,9 @@ namespace ENI2
|
|||||||
private void Dispatcher_UnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
|
private void Dispatcher_UnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
|
||||||
{
|
{
|
||||||
string errorMessage = string.Format("An unhandled exception occurred: {0}\r\n{1}", e.Exception.Message, e.Exception.StackTrace);
|
string errorMessage = string.Format("An unhandled exception occurred: {0}\r\n{1}", e.Exception.Message, e.Exception.StackTrace);
|
||||||
Xceed.Wpf.Toolkit.MessageBox.Show(errorMessage, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
MessageBox.Show(errorMessage, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
|
// TODO: Dieser Fehler muss irgendwohin gesendet / gespeichert werden
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
_log.Error(errorMessage);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DatePicker_PreviewKeyDown(object sender, KeyEventArgs e)
|
private void DatePicker_PreviewKeyDown(object sender, KeyEventArgs e)
|
||||||
|
|||||||
@ -56,33 +56,6 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Validation Error Template for a DataGrid Row -->
|
|
||||||
|
|
||||||
<Style TargetType="{x:Type DataGridRow}">
|
|
||||||
<Setter Property="ValidationErrorTemplate">
|
|
||||||
<Setter.Value>
|
|
||||||
<ControlTemplate>
|
|
||||||
<Grid Margin="0,-2,0,-2"
|
|
||||||
ToolTip="{Binding RelativeSource={RelativeSource
|
|
||||||
FindAncestor, AncestorType={x:Type DataGridRow}},
|
|
||||||
Path=(Validation.Errors)[0].ErrorContent}">
|
|
||||||
<Ellipse StrokeThickness="0" Fill="Red"
|
|
||||||
Width="{TemplateBinding FontSize}"
|
|
||||||
Height="{TemplateBinding FontSize}" />
|
|
||||||
<TextBlock Text="!" FontSize="{TemplateBinding FontSize}"
|
|
||||||
FontWeight="Bold" Foreground="White"
|
|
||||||
HorizontalAlignment="Center" />
|
|
||||||
</Grid>
|
|
||||||
</ControlTemplate>
|
|
||||||
</Setter.Value>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Style TargetType="{x:Type ToolTip}" >
|
<Style TargetType="{x:Type ToolTip}" >
|
||||||
|
|
||||||
<Setter Property="OverridesDefaultStyle" Value="true" />
|
<Setter Property="OverridesDefaultStyle" Value="true" />
|
||||||
|
|||||||
@ -8,7 +8,6 @@ using System.Windows;
|
|||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Media.Animation;
|
using System.Windows.Media.Animation;
|
||||||
using System.Windows.Threading;
|
|
||||||
|
|
||||||
namespace ENI2.Controls
|
namespace ENI2.Controls
|
||||||
{
|
{
|
||||||
@ -162,9 +161,8 @@ namespace ENI2.Controls
|
|||||||
}
|
}
|
||||||
if (!abort)
|
if (!abort)
|
||||||
{
|
{
|
||||||
var tabControl = Parent as TabControl;
|
var tabControl = Parent as ItemsControl;
|
||||||
tabControl.SelectedItem = null;
|
tabControl.Items.Remove(this);
|
||||||
_ = Dispatcher.BeginInvoke(new Action(() => tabControl.Items.Remove(this)), DispatcherPriority.Background);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
dockPanel.Children.Add(closeButton);
|
dockPanel.Children.Add(closeButton);
|
||||||
|
|||||||
@ -56,7 +56,6 @@ namespace ENI2.Controls
|
|||||||
// das hier bildet 1:1 das Kontext-Menü des ANSW ab
|
// das hier bildet 1:1 das Kontext-Menü des ANSW ab
|
||||||
|
|
||||||
public event Action<DatabaseEntity> EditRequested;
|
public event Action<DatabaseEntity> EditRequested;
|
||||||
public event Action<List<DatabaseEntity>> MultiEditRequested;
|
|
||||||
public event Action<DatabaseEntity> DeleteRequested;
|
public event Action<DatabaseEntity> DeleteRequested;
|
||||||
public event Action CreateRequested;
|
public event Action CreateRequested;
|
||||||
public event Action RefreshGrid;
|
public event Action RefreshGrid;
|
||||||
@ -207,14 +206,6 @@ namespace ENI2.Controls
|
|||||||
if (this.SelectedItems[0] is DatabaseEntity selectedEntity)
|
if (this.SelectedItems[0] is DatabaseEntity selectedEntity)
|
||||||
this.EditRequested?.Invoke(selectedEntity);
|
this.EditRequested?.Invoke(selectedEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
if((this.SelectedItems != null) && (this.SelectedItems.Count > 1) && !this.IsReadOnly)
|
|
||||||
{
|
|
||||||
List<DatabaseEntity> databaseEntities = new List<DatabaseEntity>();
|
|
||||||
foreach(DatabaseEntity databaseEntity in this.SelectedItems)
|
|
||||||
databaseEntities.Add(databaseEntity);
|
|
||||||
this.MultiEditRequested?.Invoke(databaseEntities);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void printItem(object sender, RoutedEventArgs e)
|
protected void printItem(object sender, RoutedEventArgs e)
|
||||||
|
|||||||
@ -1,113 +0,0 @@
|
|||||||
<UserControl x:Class="ENI2.Controls.EasyPeasyControl"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:local="clr-namespace:ENI2.Controls"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
d:DesignHeight="650" d:DesignWidth="1024" Loaded="UserControl_Loaded" Unloaded="UserControl_Unloaded">
|
|
||||||
|
|
||||||
|
|
||||||
<DockPanel>
|
|
||||||
<!-- Header with logo -->
|
|
||||||
<Border DockPanel.Dock="Top" Padding="10" Background="#FFFDF6">
|
|
||||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" >
|
|
||||||
<!-- Embed SVG via Image (optional): place your SVG as a DrawingImage in resources, or replace with PNG -->
|
|
||||||
<TextBlock Text="🍋 easy-peasy" FontSize="20" FontWeight="Bold" Margin="0,0,16,0"/>
|
|
||||||
<TextBlock Text="Edit • Paste • Export XML" VerticalAlignment="Center"/>
|
|
||||||
</StackPanel>
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
|
||||||
<StackPanel Margin="12" Orientation="Vertical" >
|
|
||||||
<!-- Top-level fields -->
|
|
||||||
<UniformGrid Columns="4" Rows="3" Margin="0,0,0,12" Height="84">
|
|
||||||
<TextBlock Text="Art der Identification (Vertreter)" Margin="0,0,4,0" VerticalAlignment="Center" TextAlignment="Right"/>
|
|
||||||
<TextBox Text="{Binding DelegateIdentificationType, UpdateSourceTrigger=PropertyChanged}" Margin="2" VerticalContentAlignment="Center"/>
|
|
||||||
<TextBlock Text="Art der Identifikation (Kunde)" VerticalAlignment="Center" Margin="0,0,4,0" TextAlignment="Right" />
|
|
||||||
<TextBox Text="{Binding TraderIdentificationType, UpdateSourceTrigger=PropertyChanged}" Margin="2" VerticalContentAlignment="Center"/>
|
|
||||||
|
|
||||||
<TextBlock Text="LRN" TextAlignment="Right" Margin="0,0,4,0" VerticalAlignment="Center"/>
|
|
||||||
<TextBox Text="{Binding LRN, UpdateSourceTrigger=PropertyChanged}" Margin="2" VerticalContentAlignment="Center"/>
|
|
||||||
<TextBlock Text="Identifikationsnummer (Kunde)" Margin="0,0,4,0" VerticalAlignment="Center" TextAlignment="Right" />
|
|
||||||
<TextBox Text="{Binding TraderIdentificationNumber, UpdateSourceTrigger=PropertyChanged}" Margin="2" VerticalContentAlignment="Center"/>
|
|
||||||
|
|
||||||
<TextBlock Text="Land" TextAlignment="Right" Margin="0,0,4,0" VerticalAlignment="Center"/>
|
|
||||||
<TextBox Text="{Binding Country, UpdateSourceTrigger=PropertyChanged}" Margin="2" VerticalContentAlignment="Center"/>
|
|
||||||
<TextBlock Text="Identifikationsnummer (Vertreter)" Margin="0,0,4,0" VerticalAlignment="Center" TextAlignment="Right"/>
|
|
||||||
<TextBox Text="{Binding DelegateIdentificationNumber, UpdateSourceTrigger=PropertyChanged}" Margin="2" VerticalContentAlignment="Center"/>
|
|
||||||
</UniformGrid>
|
|
||||||
|
|
||||||
<!-- ProofInformation -->
|
|
||||||
<GroupBox Header="Kennung des Antrags auf Nachweis TZ2L(F)">
|
|
||||||
<StackPanel Margin="8">
|
|
||||||
<UniformGrid Columns="4" Rows="4" Margin="0,0,0,12" >
|
|
||||||
<TextBlock Text="Zuständige Zollstelle" TextAlignment="Right" VerticalAlignment="Center" Margin="0,0,4,0"/>
|
|
||||||
<TextBox Text="{Binding ProofInformationT2LT2LF.CompetentCustomsOffice, UpdateSourceTrigger=PropertyChanged}" Margin="2" VerticalContentAlignment="Center"/>
|
|
||||||
<TextBlock Text="Art der Anmeldung" TextAlignment="Right" VerticalAlignment="Center" Margin="0,0,4,0"/>
|
|
||||||
<TextBox Text="{Binding ProofInformationT2LT2LF.DeclarationType, UpdateSourceTrigger=PropertyChanged}" Margin="2" VerticalContentAlignment="Center"/>
|
|
||||||
|
|
||||||
<TextBlock TextWrapping="Wrap" Text="Datum Anmeldung
|
|
||||||
(yyyy-MM-ddTHH:mm:ss)" TextAlignment="Right" VerticalAlignment="Center" Margin="0,0,4,0"/>
|
|
||||||
<TextBox Text="{Binding ProofInformationT2LT2LF.DeclarationDate, StringFormat={}{0:yyyy-MM-ddTHH:mm:ss}, UpdateSourceTrigger=PropertyChanged}" Margin="2" VerticalContentAlignment="Center" />
|
|
||||||
<TextBlock Text="Gesamtrohmasse (kg)" TextAlignment="Right" VerticalAlignment="Center" Margin="0,0,4,0"/>
|
|
||||||
<TextBox x:Name="textBoxTotalGrossMass" Text="{Binding ProofInformationT2LT2LF.TotalGrossMassKg, UpdateSourceTrigger=PropertyChanged}" Margin="2" VerticalContentAlignment="Center"/>
|
|
||||||
|
|
||||||
<TextBlock TextWrapping="Wrap" Text="Antrag auf Gültigkeitsdauer des Nachweises (in Tagen)" TextAlignment="Right" VerticalAlignment="Center" Margin="0,0,4,0"/>
|
|
||||||
<TextBox Text="{Binding ProofInformationT2LT2LF.RequestedValidityOfTheProof.NumberOfDays, UpdateSourceTrigger=PropertyChanged}" Margin="2" VerticalContentAlignment="Center"/>
|
|
||||||
<TextBlock Text="Art des Antrags" TextAlignment="Right" VerticalAlignment="Center" Margin="0,0,4,0"/>
|
|
||||||
<TextBox Text="{Binding ProofInformationT2LT2LF.RequestType, UpdateSourceTrigger=PropertyChanged}" Margin="2" VerticalContentAlignment="Center"/>
|
|
||||||
</UniformGrid>
|
|
||||||
|
|
||||||
<GroupBox Header="Warenort">
|
|
||||||
<UniformGrid Columns="6" Margin="8" Height="28">
|
|
||||||
<TextBlock Text="Art des Ortes" TextAlignment="Right" VerticalAlignment="Center" Margin="0,0,4,0"/>
|
|
||||||
<TextBox Text="{Binding ProofInformationT2LT2LF.GoodsShipmentForT2LT2LF.LocationOfGoods.TypeOfLocation}" Margin="2" VerticalContentAlignment="Center"/>
|
|
||||||
<TextBlock Text="Art der Ortsbestimmung" TextAlignment="Right" VerticalAlignment="Center" Margin="0,0,4,0"/>
|
|
||||||
<TextBox Text="{Binding ProofInformationT2LT2LF.GoodsShipmentForT2LT2LF.LocationOfGoods.QualifierOfIdentification}" Margin="2" VerticalContentAlignment="Center"/>
|
|
||||||
<TextBlock Text="UNLocode" TextAlignment="Right" VerticalAlignment="Center" Margin="0,0,4,0"/>
|
|
||||||
<TextBox Text="{Binding ProofInformationT2LT2LF.GoodsShipmentForT2LT2LF.LocationOfGoods.UNLocode}" Margin="2" VerticalContentAlignment="Center"/>
|
|
||||||
</UniformGrid>
|
|
||||||
</GroupBox>
|
|
||||||
|
|
||||||
<CheckBox Content="In Containern beförderte Waren" Margin="8"
|
|
||||||
IsChecked="{Binding ProofInformationT2LT2LF.GoodsShipmentForT2LT2LF.ContainerIndication}"/>
|
|
||||||
|
|
||||||
<!-- Goods Items grid (paste target) -->
|
|
||||||
<TextBlock Text="Warenpositionen (Paste tab/CSV with columns: HS, Item#, Description, Gross, Net, Pkgs, Type, Marks)" Margin="4,12,0,4"/>
|
|
||||||
<DataGrid ItemsSource="{Binding ProofInformationT2LT2LF.GoodsShipmentForT2LT2LF.GoodsItemsForT2LT2LF}"
|
|
||||||
AutoGenerateColumns="False" SelectionMode="Extended" x:Name="dataGridGoodsItems" CanUserAddRows="False"
|
|
||||||
PreviewKeyDown="DataGrid_PreviewKeyDown" Focusable="True" MinHeight="80" IsTabStop="True" MaxHeight="320">
|
|
||||||
<DataGrid.Columns>
|
|
||||||
<DataGridTextColumn Header="HS Code" Binding="{Binding Commodity.HarmonizedSystemSubHeadingCode}"/>
|
|
||||||
<DataGridTextColumn Header="Item #" Binding="{Binding GoodsItemNumber}"/>
|
|
||||||
<DataGridTextColumn Header="Description" Binding="{Binding DescriptionOfGoods}" Width="2*"/>
|
|
||||||
<DataGridTextColumn Header="Gross" Binding="{Binding GoodsMeasure.GrossMass}"/>
|
|
||||||
<DataGridTextColumn Header="Net" Binding="{Binding GoodsMeasure.NetMass}"/>
|
|
||||||
<DataGridTextColumn Header="Pkgs" Binding="{Binding Packaging.NumberOfPackages}"/>
|
|
||||||
<DataGridTextColumn Header="Type" Binding="{Binding Packaging.TypeOfPackages}"/>
|
|
||||||
<DataGridTextColumn Header="Marks" Binding="{Binding Packaging.ShippingMarks}" Width="*"/>
|
|
||||||
</DataGrid.Columns>
|
|
||||||
</DataGrid>
|
|
||||||
|
|
||||||
<GroupBox Header="Dokumente" Margin="0,12,0,0">
|
|
||||||
<UniformGrid Columns="4" Margin="8" Height="28">
|
|
||||||
<TextBlock Text="Art des Dokuments" Margin="0,0,4,0" VerticalAlignment="Center" TextAlignment="Right"/>
|
|
||||||
<TextBox Text="{Binding ProofInformationT2LT2LF.GoodsShipmentForT2LT2LF.TransportDocuments.Type}" Margin="2" VerticalContentAlignment="Center"/>
|
|
||||||
<TextBlock Text="Referenznummer" Margin="0,0,4,0" VerticalAlignment="Center" TextAlignment="Right"/>
|
|
||||||
<TextBox Text="{Binding ProofInformationT2LT2LF.GoodsShipmentForT2LT2LF.TransportDocuments.ReferenceNumber}" Margin="2" VerticalContentAlignment="Center" />
|
|
||||||
</UniformGrid>
|
|
||||||
</GroupBox>
|
|
||||||
</StackPanel>
|
|
||||||
</GroupBox>
|
|
||||||
|
|
||||||
<!-- Actions -->
|
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,16,0,0">
|
|
||||||
<Button x:Name="buttonImport" Content="Import" Width="100" Margin="0,0,8,0" Click="buttonImport_Click" />
|
|
||||||
<Button x:Name="buttonClear" Content="Clear" Width="100" Margin="0,0,8,0" Click="buttonClear_Click"/>
|
|
||||||
<Button x:Name="buttonExport" Content="Export" Width="120" Click="buttonExport_Click"/>
|
|
||||||
</StackPanel>
|
|
||||||
</StackPanel>
|
|
||||||
</ScrollViewer>
|
|
||||||
</DockPanel>
|
|
||||||
</UserControl>
|
|
||||||
@ -1,506 +0,0 @@
|
|||||||
// Copyright (c) 2017- schick Informatik
|
|
||||||
// Description: Display dialog for customs XML data upload app
|
|
||||||
//
|
|
||||||
|
|
||||||
using bsmd.database.EasyPeasy;
|
|
||||||
using ENI2.Util;
|
|
||||||
using Microsoft.Win32;
|
|
||||||
using System;
|
|
||||||
using System.Collections.ObjectModel;
|
|
||||||
using System.Collections.Specialized;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Globalization;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Windows;
|
|
||||||
using System.Windows.Controls;
|
|
||||||
using System.Windows.Data;
|
|
||||||
using System.Windows.Input;
|
|
||||||
using System.Windows.Media.Imaging;
|
|
||||||
using System.Xml;
|
|
||||||
using System.Xml.Serialization;
|
|
||||||
|
|
||||||
namespace ENI2.Controls
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interaction logic for EasyPeasyControl.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class EasyPeasyControl : UserControl
|
|
||||||
{
|
|
||||||
|
|
||||||
private ProofRequest _vm;
|
|
||||||
|
|
||||||
#region Construction
|
|
||||||
|
|
||||||
public EasyPeasyControl()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
|
|
||||||
this.dataGridGoodsItems.ContextMenu = new ContextMenu();
|
|
||||||
|
|
||||||
MenuItem addItem = new MenuItem();
|
|
||||||
addItem.Header = Properties.Resources.textAdd;
|
|
||||||
addItem.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/add.png")) };
|
|
||||||
addItem.Click += AddItem_Click;
|
|
||||||
this.dataGridGoodsItems.ContextMenu.Items.Add(addItem);
|
|
||||||
|
|
||||||
MenuItem deleteItem = new MenuItem();
|
|
||||||
deleteItem.Header = Properties.Resources.textDelete;
|
|
||||||
deleteItem.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/delete.png")) };
|
|
||||||
deleteItem.Click += DeleteItem_Click;
|
|
||||||
this.dataGridGoodsItems.ContextMenu.Items.Add(deleteItem);
|
|
||||||
|
|
||||||
// Add separator and paste option
|
|
||||||
this.dataGridGoodsItems.ContextMenu.Items.Add(new Separator());
|
|
||||||
|
|
||||||
MenuItem pasteItem = new MenuItem();
|
|
||||||
pasteItem.Header = "Paste";
|
|
||||||
pasteItem.Click += (s, e) => HandlePasteOperation();
|
|
||||||
this.dataGridGoodsItems.ContextMenu.Items.Add(pasteItem);
|
|
||||||
|
|
||||||
// Add command bindings for proper keyboard handling
|
|
||||||
this.dataGridGoodsItems.CommandBindings.Add(new CommandBinding(
|
|
||||||
ApplicationCommands.Paste,
|
|
||||||
(s, e) => HandlePasteOperation(),
|
|
||||||
(s, e) => e.CanExecute = Clipboard.ContainsText()));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
public void SaveState()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
EasyPeasyState.Save(_vm);
|
|
||||||
}
|
|
||||||
catch { }
|
|
||||||
}
|
|
||||||
|
|
||||||
#region context menu event handler
|
|
||||||
|
|
||||||
private void AddItem_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (_vm?.ProofInformationT2LT2LF?.GoodsShipmentForT2LT2LF?.GoodsItemsForT2LT2LF == null) return;
|
|
||||||
var list = _vm.ProofInformationT2LT2LF.GoodsShipmentForT2LT2LF.GoodsItemsForT2LT2LF;
|
|
||||||
int nextItemNo = list.Any() ? list.Max(x => x.GoodsItemNumber) + 1 : 1;
|
|
||||||
var item = new GoodsItemForT2LT2LF
|
|
||||||
{
|
|
||||||
GoodsItemNumber = nextItemNo
|
|
||||||
};
|
|
||||||
list.Add(item);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void DeleteItem_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
foreach(GoodsItemForT2LT2LF item in this.dataGridGoodsItems.SelectedItems.Cast<GoodsItemForT2LT2LF>().ToArray())
|
|
||||||
{
|
|
||||||
if (_vm?.ProofInformationT2LT2LF?.GoodsShipmentForT2LT2LF?.GoodsItemsForT2LT2LF == null) return;
|
|
||||||
var list = _vm.ProofInformationT2LT2LF.GoodsShipmentForT2LT2LF.GoodsItemsForT2LT2LF;
|
|
||||||
list.Remove(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region button event handler
|
|
||||||
|
|
||||||
private void buttonClear_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
CleanupAutoCalculation();
|
|
||||||
|
|
||||||
this._vm = EasyPeasyState.CreateDefault();
|
|
||||||
if (_vm.ProofInformationT2LT2LF?.GoodsShipmentForT2LT2LF?.GoodsItemsForT2LT2LF == null)
|
|
||||||
_vm.ProofInformationT2LT2LF.GoodsShipmentForT2LT2LF.GoodsItemsForT2LT2LF = new ObservableCollection<GoodsItemForT2LT2LF>();
|
|
||||||
|
|
||||||
_vm.ProofInformationT2LT2LF.DeclarationDate = DateTime.Now; // reset to today
|
|
||||||
_vm.ProofInformationT2LT2LF.RequestedValidityOfTheProof.NumberOfDays = 90; // default 90 days
|
|
||||||
|
|
||||||
this.DataContext = this._vm;
|
|
||||||
SetupAutoCalculation();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void buttonExport_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
var dlg = new SaveFileDialog
|
|
||||||
{
|
|
||||||
FileName = "proofRequest.xml",
|
|
||||||
Filter = "XML file|*.xml",
|
|
||||||
OverwritePrompt = true
|
|
||||||
};
|
|
||||||
if (dlg.ShowDialog() == true)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var ser = new XmlSerializer(typeof(ProofRequest));
|
|
||||||
|
|
||||||
// Namespaces (if needed)
|
|
||||||
// var ns = new XmlSerializerNamespaces();
|
|
||||||
// ns.Add("xsd", "http://www.w3.org/2001/XMLSchema");
|
|
||||||
// ns.Add("xsi", "http://www.w3.org/2001/XMLSchema-instance");
|
|
||||||
|
|
||||||
var settings = new XmlWriterSettings
|
|
||||||
{
|
|
||||||
Indent = true,
|
|
||||||
OmitXmlDeclaration = true
|
|
||||||
};
|
|
||||||
|
|
||||||
using (var fs = File.Create(dlg.FileName))
|
|
||||||
using (var xw = XmlWriter.Create(fs, settings))
|
|
||||||
{
|
|
||||||
ser.Serialize(xw, _vm); //, ns);
|
|
||||||
}
|
|
||||||
|
|
||||||
MessageBox.Show("Exported successfully.", "easy-peasy", MessageBoxButton.OK, MessageBoxImage.Information);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
MessageBox.Show("Export failed:\n" + ex.Message, "easy-peasy", MessageBoxButton.OK, MessageBoxImage.Error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void buttonImport_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
OpenFileDialog ofd = new OpenFileDialog();
|
|
||||||
ofd.Filter = "XML file|*.xml";
|
|
||||||
ofd.RestoreDirectory = true;
|
|
||||||
ofd.Multiselect = false;
|
|
||||||
|
|
||||||
if (ofd.ShowDialog() == true)
|
|
||||||
{
|
|
||||||
using (var fs = File.OpenRead(ofd.FileName))
|
|
||||||
{
|
|
||||||
CleanupAutoCalculation();
|
|
||||||
var ser = new XmlSerializer(typeof(ProofRequest));
|
|
||||||
_vm = (ProofRequest)ser.Deserialize(fs);
|
|
||||||
// after loading/creating _vm
|
|
||||||
if (_vm.ProofInformationT2LT2LF?.GoodsShipmentForT2LT2LF?.GoodsItemsForT2LT2LF == null)
|
|
||||||
_vm.ProofInformationT2LT2LF.GoodsShipmentForT2LT2LF.GoodsItemsForT2LT2LF = new ObservableCollection<GoodsItemForT2LT2LF>();
|
|
||||||
|
|
||||||
_vm.ProofInformationT2LT2LF.DeclarationDate = DateTime.Now; // reset to today
|
|
||||||
if(_vm.ProofInformationT2LT2LF.RequestedValidityOfTheProof.NumberOfDays == 9)
|
|
||||||
_vm.ProofInformationT2LT2LF.RequestedValidityOfTheProof.NumberOfDays = 90; // default 90 days
|
|
||||||
|
|
||||||
this.DataContext = _vm;
|
|
||||||
SetupAutoCalculation();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region loaded/unloaded event handler
|
|
||||||
|
|
||||||
private void UserControl_Loaded(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
_vm = EasyPeasyState.LoadOrCreate();
|
|
||||||
if (_vm.ProofInformationT2LT2LF == null)
|
|
||||||
_vm.ProofInformationT2LT2LF = new ProofInformationT2LT2LF();
|
|
||||||
if (_vm.ProofInformationT2LT2LF.GoodsShipmentForT2LT2LF == null)
|
|
||||||
_vm.ProofInformationT2LT2LF.GoodsShipmentForT2LT2LF = new GoodsShipmentForT2LT2LF
|
|
||||||
{
|
|
||||||
LocationOfGoods = new LocationOfGoods(),
|
|
||||||
TransportDocuments = new TransportDocuments()
|
|
||||||
};
|
|
||||||
_vm.ProofInformationT2LT2LF.DeclarationDate = DateTime.Now; // reset to today
|
|
||||||
this.DataContext = _vm;
|
|
||||||
|
|
||||||
SetupAutoCalculation();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UserControl_Unloaded(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
CleanupAutoCalculation();
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
EasyPeasyState.Save(_vm);
|
|
||||||
}
|
|
||||||
catch { }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region auto calculation total gross mass
|
|
||||||
|
|
||||||
private void SetupAutoCalculation()
|
|
||||||
{
|
|
||||||
if (_vm?.ProofInformationT2LT2LF?.GoodsShipmentForT2LT2LF?.GoodsItemsForT2LT2LF != null)
|
|
||||||
{
|
|
||||||
// Subscribe to collection changes (add/remove items)
|
|
||||||
_vm.ProofInformationT2LT2LF.GoodsShipmentForT2LT2LF.GoodsItemsForT2LT2LF.CollectionChanged += GoodsItems_CollectionChanged;
|
|
||||||
|
|
||||||
// Subscribe to DataGrid cell changes
|
|
||||||
dataGridGoodsItems.CellEditEnding += DataGridGoodsItems_CellEditEnding;
|
|
||||||
|
|
||||||
// Calculate initial total
|
|
||||||
CalculateTotalGrossMass();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CleanupAutoCalculation()
|
|
||||||
{
|
|
||||||
if (_vm?.ProofInformationT2LT2LF?.GoodsShipmentForT2LT2LF?.GoodsItemsForT2LT2LF != null)
|
|
||||||
{
|
|
||||||
// Unsubscribe from collection changes
|
|
||||||
_vm.ProofInformationT2LT2LF.GoodsShipmentForT2LT2LF.GoodsItemsForT2LT2LF.CollectionChanged -= GoodsItems_CollectionChanged;
|
|
||||||
dataGridGoodsItems.CellEditEnding -= DataGridGoodsItems_CellEditEnding;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void DataGridGoodsItems_CellEditEnding(object sender, DataGridCellEditEndingEventArgs e)
|
|
||||||
{
|
|
||||||
// Check if the edited column is GrossMass
|
|
||||||
if (e.Column.Header.ToString() == "Gross")
|
|
||||||
{
|
|
||||||
// Delay calculation to allow the binding to update
|
|
||||||
Dispatcher.BeginInvoke(new Action(() => {
|
|
||||||
CalculateTotalGrossMass();
|
|
||||||
}), System.Windows.Threading.DispatcherPriority.Background);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void GoodsItems_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
|
|
||||||
{
|
|
||||||
// Recalculate total after any collection change
|
|
||||||
CalculateTotalGrossMass();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CalculateTotalGrossMass()
|
|
||||||
{
|
|
||||||
if (_vm?.ProofInformationT2LT2LF?.GoodsShipmentForT2LT2LF?.GoodsItemsForT2LT2LF != null)
|
|
||||||
{
|
|
||||||
var total = _vm.ProofInformationT2LT2LF.GoodsShipmentForT2LT2LF.GoodsItemsForT2LT2LF
|
|
||||||
.Sum(item => item.GoodsMeasure?.GrossMass ?? 0m);
|
|
||||||
|
|
||||||
_vm.ProofInformationT2LT2LF.TotalGrossMassKg = total;
|
|
||||||
|
|
||||||
// Force UI update by refreshing the binding
|
|
||||||
var binding = BindingOperations.GetBindingExpression(
|
|
||||||
FindTotalGrossMassTextBox(), TextBox.TextProperty);
|
|
||||||
binding?.UpdateTarget();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Simple property changed notification helper
|
|
||||||
public event PropertyChangedEventHandler PropertyChanged;
|
|
||||||
protected virtual void OnPropertyChanged(string propertyName)
|
|
||||||
{
|
|
||||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
|
||||||
}
|
|
||||||
|
|
||||||
private TextBox FindTotalGrossMassTextBox()
|
|
||||||
{
|
|
||||||
// Find the TextBox that displays TotalGrossMassKg
|
|
||||||
return this.FindName("textBoxTotalGrossMass") as TextBox ??
|
|
||||||
this.GetTemplateChild("textBoxTotalGrossMass") as TextBox;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region cut & paste logic
|
|
||||||
|
|
||||||
private void HandlePasteOperation()
|
|
||||||
{
|
|
||||||
if (Clipboard.ContainsText())
|
|
||||||
{
|
|
||||||
var text = Clipboard.GetText();
|
|
||||||
if (!TryPaste_EspHsPkgsGross(text))
|
|
||||||
PasteGoodsItems(text);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void DataGrid_PreviewKeyDown(object sender, KeyEventArgs e)
|
|
||||||
{
|
|
||||||
if (e.Key == Key.V && (Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control)
|
|
||||||
{
|
|
||||||
if (Clipboard.ContainsText())
|
|
||||||
{
|
|
||||||
var text = Clipboard.GetText();
|
|
||||||
|
|
||||||
if(!TryPaste_EspHsPkgsGross(text))
|
|
||||||
PasteGoodsItems(text);
|
|
||||||
e.Handled = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void PasteGoodsItems(string text)
|
|
||||||
{
|
|
||||||
if (_vm?.ProofInformationT2LT2LF?.GoodsShipmentForT2LT2LF == null) return;
|
|
||||||
|
|
||||||
var lines = text.Replace("\r\n", "\n").Replace('\r', '\n')
|
|
||||||
.Split(new[] { '\n' }, StringSplitOptions.RemoveEmptyEntries);
|
|
||||||
|
|
||||||
foreach (var line in lines)
|
|
||||||
{
|
|
||||||
// Split by tab first; if only one column, try CSV
|
|
||||||
var cells = line.Split('\t');
|
|
||||||
if (cells.Length == 1) cells = SplitCsv(line);
|
|
||||||
|
|
||||||
// Expected order: HS, Item#, Description, Gross, Net, Pkgs, Type, Marks
|
|
||||||
var item = new GoodsItemForT2LT2LF();
|
|
||||||
|
|
||||||
if (cells.Length > 0) item.Commodity.HarmonizedSystemSubHeadingCode = cells[0].Trim();
|
|
||||||
if (cells.Length > 1 && int.TryParse(cells[1], out var n)) item.GoodsItemNumber = n;
|
|
||||||
if (cells.Length > 2) item.DescriptionOfGoods = cells[2].Trim();
|
|
||||||
if (cells.Length > 3 && decimal.TryParse(cells[3], out var gross)) item.GoodsMeasure.GrossMass = gross;
|
|
||||||
if (cells.Length > 4 && decimal.TryParse(cells[4], out var net)) item.GoodsMeasure.NetMass = net;
|
|
||||||
if (cells.Length > 5 && int.TryParse(cells[5], out var pkgs)) item.Packaging.NumberOfPackages = pkgs;
|
|
||||||
if (cells.Length > 6) item.Packaging.TypeOfPackages = cells[6].Trim();
|
|
||||||
if (cells.Length > 7) item.Packaging.ShippingMarks = cells[7].Trim();
|
|
||||||
|
|
||||||
_vm.ProofInformationT2LT2LF.GoodsShipmentForT2LT2LF.GoodsItemsForT2LT2LF.Add(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Very small CSV splitter (handles quotes)
|
|
||||||
private static string[] SplitCsv(string line)
|
|
||||||
{
|
|
||||||
var res = new System.Collections.Generic.List<string>();
|
|
||||||
var sb = new StringBuilder();
|
|
||||||
bool inQuotes = false;
|
|
||||||
for (int i = 0; i < line.Length; i++)
|
|
||||||
{
|
|
||||||
char c = line[i];
|
|
||||||
if (c == '\"')
|
|
||||||
{
|
|
||||||
if (inQuotes && i + 1 < line.Length && line[i + 1] == '\"')
|
|
||||||
{ sb.Append('\"'); i++; }
|
|
||||||
else { inQuotes = !inQuotes; }
|
|
||||||
}
|
|
||||||
else if (c == ',' && !inQuotes)
|
|
||||||
{ res.Add(sb.ToString()); sb.Clear(); }
|
|
||||||
else { sb.Append(c); }
|
|
||||||
}
|
|
||||||
res.Add(sb.ToString());
|
|
||||||
return res.ToArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool TryPaste_EspHsPkgsGross(string text)
|
|
||||||
{
|
|
||||||
if (_vm?.ProofInformationT2LT2LF?.GoodsShipmentForT2LT2LF == null) return false;
|
|
||||||
|
|
||||||
// Normalize and split lines
|
|
||||||
var lines = text.Replace("\r\n", "\n").Replace('\r', '\n')
|
|
||||||
.Split(new[] { '\n' }, StringSplitOptions.RemoveEmptyEntries);
|
|
||||||
if (lines.Length == 0) return false;
|
|
||||||
|
|
||||||
// Determine next item number
|
|
||||||
var list = _vm.ProofInformationT2LT2LF.GoodsShipmentForT2LT2LF.GoodsItemsForT2LT2LF;
|
|
||||||
int nextItemNo = list.Any() ? list.Max(x => x.GoodsItemNumber) + 1 : 1;
|
|
||||||
|
|
||||||
bool anyAdded = false;
|
|
||||||
bool countrySeen = false;
|
|
||||||
|
|
||||||
foreach (var raw in lines)
|
|
||||||
{
|
|
||||||
var line = raw; // do not Trim() entirely; keep leading tab as empty first cell
|
|
||||||
var cells = line.Split('\t'); // keeps empty entries
|
|
||||||
|
|
||||||
// Expected:
|
|
||||||
// - 4 cells: [ESP or ""], [HS], [Pkgs], [Gross]
|
|
||||||
// - 3 cells: [HS], [Pkgs], [Gross]
|
|
||||||
string hs = null, pkgs = null, gross = null;
|
|
||||||
|
|
||||||
if (cells.Length >= 4)
|
|
||||||
{
|
|
||||||
string c0 = cells[0]?.Trim();
|
|
||||||
// Optionally capture the first token like "ESP" (country tag),
|
|
||||||
// only once and only if alphabetic (won't throw if numeric)
|
|
||||||
if (!countrySeen && !string.IsNullOrWhiteSpace(c0) && c0.All(ch => char.IsLetter(ch)))
|
|
||||||
{
|
|
||||||
// If you decide later this should set a field, uncomment:
|
|
||||||
// if (string.IsNullOrWhiteSpace(_vm.Country)) _vm.Country = c0;
|
|
||||||
countrySeen = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
hs = (cells.Length > 1 ? cells[1] : null);
|
|
||||||
pkgs = (cells.Length > 2 ? cells[2] : null);
|
|
||||||
gross = (cells.Length > 3 ? cells[3] : null);
|
|
||||||
}
|
|
||||||
else if (cells.Length == 3)
|
|
||||||
{
|
|
||||||
hs = cells[0];
|
|
||||||
pkgs = cells[1];
|
|
||||||
gross = cells[2];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Not enough data for this format; skip the row
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(hs)) continue;
|
|
||||||
|
|
||||||
var item = new GoodsItemForT2LT2LF
|
|
||||||
{
|
|
||||||
GoodsItemNumber = nextItemNo++,
|
|
||||||
DescriptionOfGoods = "" // per spec
|
|
||||||
};
|
|
||||||
item.Commodity.HarmonizedSystemSubHeadingCode = hs.Trim();
|
|
||||||
|
|
||||||
if (TryParseIntFlexible(pkgs, out var pk))
|
|
||||||
item.Packaging.NumberOfPackages = pk;
|
|
||||||
|
|
||||||
if (TryParseDecimalFlexible(gross, out var g))
|
|
||||||
{
|
|
||||||
item.GoodsMeasure.GrossMass = g;
|
|
||||||
var net = g; // - 1m; // now net mass equals gross mass (no deduction)
|
|
||||||
if (net < 0m) net = 0m;
|
|
||||||
item.GoodsMeasure.NetMass = net;
|
|
||||||
}
|
|
||||||
|
|
||||||
item.DescriptionOfGoods = "Brand New Vehicles"; // per spec
|
|
||||||
item.Packaging.TypeOfPackages = "UN"; // per spec
|
|
||||||
item.Packaging.ShippingMarks = "-"; // per spec
|
|
||||||
|
|
||||||
list.Add(item);
|
|
||||||
anyAdded = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return anyAdded;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region static utils
|
|
||||||
|
|
||||||
// this will go somewhere else later
|
|
||||||
|
|
||||||
// Try parse decimal with current culture, invariant, and comma/dot flip
|
|
||||||
private static bool TryParseDecimalFlexible(string s, out decimal value)
|
|
||||||
{
|
|
||||||
s = (s ?? "").Trim();
|
|
||||||
// 1) current culture
|
|
||||||
if (decimal.TryParse(s, NumberStyles.Number, CultureInfo.CurrentCulture, out value)) return true;
|
|
||||||
// 2) invariant
|
|
||||||
if (decimal.TryParse(s, NumberStyles.Number, CultureInfo.InvariantCulture, out value)) return true;
|
|
||||||
// 3) flip comma/dot and retry (helps when clipboard mixes locales)
|
|
||||||
string flipped = s.Contains(",") ? s.Replace(",", ".") : s.Replace(".", ",");
|
|
||||||
if (decimal.TryParse(flipped, NumberStyles.Number, CultureInfo.CurrentCulture, out value)) return true;
|
|
||||||
if (decimal.TryParse(flipped, NumberStyles.Number, CultureInfo.InvariantCulture, out value)) return true;
|
|
||||||
value = 0m;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static bool TryParseIntFlexible(string s, out int value)
|
|
||||||
{
|
|
||||||
s = (s ?? "").Trim();
|
|
||||||
// Extract leading integer if something like "12 pcs"
|
|
||||||
var digits = new string(s.TakeWhile(ch => char.IsDigit(ch) || ch == '-' || ch == '+').ToArray());
|
|
||||||
if (string.IsNullOrEmpty(digits)) digits = s;
|
|
||||||
return int.TryParse(digits, NumberStyles.Integer, CultureInfo.CurrentCulture, out value)
|
|
||||||
|| int.TryParse(digits, NumberStyles.Integer, CultureInfo.InvariantCulture, out value);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@ -12,8 +12,6 @@ using Xceed.Wpf.Toolkit;
|
|||||||
|
|
||||||
using bsmd.database;
|
using bsmd.database;
|
||||||
using ENI2.Util;
|
using ENI2.Util;
|
||||||
using System.Windows.Data;
|
|
||||||
using System.Xml.Linq;
|
|
||||||
|
|
||||||
namespace ENI2.Controls
|
namespace ENI2.Controls
|
||||||
{
|
{
|
||||||
@ -49,12 +47,6 @@ namespace ENI2.Controls
|
|||||||
cancelButton.Click += (s, e) => { if (this.IsModal()) DialogResult = false; CancelClicked?.Invoke(); this.Close(); };
|
cancelButton.Click += (s, e) => { if (this.IsModal()) DialogResult = false; CancelClicked?.Invoke(); this.Close(); };
|
||||||
addButton.Click += (s, e) => AddClicked?.Invoke();
|
addButton.Click += (s, e) => AddClicked?.Invoke();
|
||||||
this.Closing += Window_Closing;
|
this.Closing += Window_Closing;
|
||||||
|
|
||||||
SettingBindingExtension stBinding = new SettingBindingExtension("W1Top");
|
|
||||||
BindingOperations.SetBinding(this, Window.TopProperty, stBinding);
|
|
||||||
|
|
||||||
SettingBindingExtension slBinding = new SettingBindingExtension("W1Left");
|
|
||||||
BindingOperations.SetBinding(this, Window.LeftProperty, slBinding);
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,19 +55,12 @@ namespace ENI2.Controls
|
|||||||
get { var addButton = (Button)Template.FindName("buttonAdd", this); return addButton.Visibility == Visibility.Visible; }
|
get { var addButton = (Button)Template.FindName("buttonAdd", this); return addButton.Visibility == Visibility.Visible; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
var addButton = (Button)Template.FindName("buttonAdd", this);
|
var addButton = (Button)Template.FindName("buttonAdd", this); addButton.Visibility = value ? Visibility.Visible : Visibility.Hidden;
|
||||||
if (addButton != null)
|
|
||||||
{
|
|
||||||
addButton.Visibility = value ? Visibility.Visible : Visibility.Hidden;
|
|
||||||
}
|
|
||||||
var okButton = (Button)Template.FindName("buttonOK", this);
|
var okButton = (Button)Template.FindName("buttonOK", this);
|
||||||
if (okButton != null)
|
|
||||||
{
|
|
||||||
if (okButton.Visibility == Visibility.Hidden)
|
if (okButton.Visibility == Visibility.Hidden)
|
||||||
okButton.Width = 1; // we are in a DockPanel, try to collapse okButton to place addButton more to the right
|
okButton.Width = 1; // we are in a DockPanel, try to collapse okButton to place addButton more to the right
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public bool OkVisible
|
public bool OkVisible
|
||||||
{
|
{
|
||||||
|
|||||||
@ -79,11 +79,6 @@ namespace ENI2.Controls
|
|||||||
portName = LocodeDB.PortNameFromLocode(value); break;
|
portName = LocodeDB.PortNameFromLocode(value); break;
|
||||||
case RuleEngine.LocodeMode.SSN:
|
case RuleEngine.LocodeMode.SSN:
|
||||||
portName = LocodeDB.SSNPortNameFromLocode(value); break;
|
portName = LocodeDB.SSNPortNameFromLocode(value); break;
|
||||||
case RuleEngine.LocodeMode.OLD:
|
|
||||||
portName = LocodeDB.PortNameFromLocode(value);
|
|
||||||
if ((portName == null) && value.Equals("DEWHV"))
|
|
||||||
portName = "Stadthafen Wilhelmshaven";
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
LocodeState locodeState = portName.IsNullOrEmpty() ? LocodeState.INVALID : LocodeState.OK;
|
LocodeState locodeState = portName.IsNullOrEmpty() ? LocodeState.INVALID : LocodeState.OK;
|
||||||
this.SetLocodeStateImage(this.imageLocodeState, locodeState);
|
this.SetLocodeStateImage(this.imageLocodeState, locodeState);
|
||||||
@ -169,18 +164,6 @@ namespace ENI2.Controls
|
|||||||
portname = LocodeDB.PortNameFromLocode(directLocode); break;
|
portname = LocodeDB.PortNameFromLocode(directLocode); break;
|
||||||
case RuleEngine.LocodeMode.SSN:
|
case RuleEngine.LocodeMode.SSN:
|
||||||
portname = LocodeDB.SSNPortNameFromLocode(directLocode); break;
|
portname = LocodeDB.SSNPortNameFromLocode(directLocode); break;
|
||||||
case RuleEngine.LocodeMode.OLD:
|
|
||||||
{
|
|
||||||
if (directLocode.Equals("DEWHV"))
|
|
||||||
{
|
|
||||||
portname = "Stadthafen Wilhelmshaven";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
portname = LocodeDB.PortNameFromLocode(directLocode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isLocode = !portname.IsNullOrEmpty();
|
bool isLocode = !portname.IsNullOrEmpty();
|
||||||
@ -208,8 +191,6 @@ namespace ENI2.Controls
|
|||||||
locodeEntries = LocodeDB.AllLocodesForCityNameAsEntries(lookupString); break;
|
locodeEntries = LocodeDB.AllLocodesForCityNameAsEntries(lookupString); break;
|
||||||
case RuleEngine.LocodeMode.SSN:
|
case RuleEngine.LocodeMode.SSN:
|
||||||
locodeEntries = LocalizedLookup.SSNAllLocodesForCityNameAsEntries(lookupString); break;
|
locodeEntries = LocalizedLookup.SSNAllLocodesForCityNameAsEntries(lookupString); break;
|
||||||
case RuleEngine.LocodeMode.OLD:
|
|
||||||
locodeEntries = LocodeDB.AllLocodesForCityNameAsEntries(lookupString); break;
|
|
||||||
}
|
}
|
||||||
locodeEntries.Sort();
|
locodeEntries.Sort();
|
||||||
|
|
||||||
|
|||||||
@ -290,11 +290,25 @@ namespace ENI2.Controls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.TimeFilterItemSource();
|
this.TimeFilterItemSource();
|
||||||
|
// this.SortItemSource();
|
||||||
this.dataGridPOCores.SelectedItem = null;
|
this.dataGridPOCores.SelectedItem = null;
|
||||||
busyControl.BusyState = Util.UIHelper.BusyStateEnum.NEUTRAL;
|
busyControl.BusyState = Util.UIHelper.BusyStateEnum.NEUTRAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string ReadFieldAsString(IExcelDataReader reader, int fieldNum)
|
||||||
|
{
|
||||||
|
if (fieldNum >= reader.FieldCount) return null;
|
||||||
|
if (reader.GetFieldType(fieldNum) == typeof(string))
|
||||||
|
return reader.GetString(fieldNum).Clean();
|
||||||
|
if (reader.GetFieldType(fieldNum) == typeof(DateTime))
|
||||||
|
return reader.GetDateTime(fieldNum).ToString();
|
||||||
|
if (reader.GetFieldType(fieldNum) == typeof(int))
|
||||||
|
return reader.GetInt32(fieldNum).ToString();
|
||||||
|
if (reader.GetFieldType(fieldNum) == typeof(double))
|
||||||
|
return ((int) reader.GetDouble(fieldNum)).ToString();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
private void TimeFilterItemSource()
|
private void TimeFilterItemSource()
|
||||||
{
|
{
|
||||||
List<MaerskData> removeList = new List<MaerskData>();
|
List<MaerskData> removeList = new List<MaerskData>();
|
||||||
@ -318,6 +332,15 @@ namespace ENI2.Controls
|
|||||||
this.maerskDataList.Remove(md);
|
this.maerskDataList.Remove(md);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void SortItemSource()
|
||||||
|
{
|
||||||
|
ObservableCollection<MaerskData> temp;
|
||||||
|
temp = new ObservableCollection<MaerskData>(this.maerskDataList.OrderBy(p => p.ColA));
|
||||||
|
this.maerskDataList.Clear();
|
||||||
|
foreach (MaerskData md in temp)
|
||||||
|
this.maerskDataList.Add(md);
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region button event handler
|
#region button event handler
|
||||||
@ -387,27 +410,27 @@ namespace ENI2.Controls
|
|||||||
md.ETA = aDateTime;
|
md.ETA = aDateTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!reader.IsDBNull(1)) md.ColB = reader.ReadAsString(1);
|
if (!reader.IsDBNull(1)) md.ColB = ReadFieldAsString(reader, 1);
|
||||||
if (!reader.IsDBNull(2)) md.ColC = reader.ReadAsString(2);
|
if (!reader.IsDBNull(2)) md.ColC = ReadFieldAsString(reader, 2);
|
||||||
if (!reader.IsDBNull(3)) md.ColD = reader.ReadAsString(3);
|
if (!reader.IsDBNull(3)) md.ColD = ReadFieldAsString(reader, 3);
|
||||||
if (!reader.IsDBNull(4)) md.ColE = reader.ReadAsString(4);
|
if (!reader.IsDBNull(4)) md.ColE = ReadFieldAsString(reader, 4);
|
||||||
if (!reader.IsDBNull(5)) md.ColF = reader.ReadAsString(5);
|
if (!reader.IsDBNull(5)) md.ColF = ReadFieldAsString(reader, 5);
|
||||||
if (!reader.IsDBNull(6)) md.ColG = reader.ReadAsString(6);
|
if (!reader.IsDBNull(6)) md.ColG = ReadFieldAsString(reader, 6);
|
||||||
if (!reader.IsDBNull(7)) md.ColH = reader.ReadAsString(7);
|
if (!reader.IsDBNull(7)) md.ColH = ReadFieldAsString(reader, 7);
|
||||||
if (!reader.IsDBNull(8)) md.ColI = reader.ReadAsString(8);
|
if (!reader.IsDBNull(8)) md.ColI = ReadFieldAsString(reader, 8);
|
||||||
if (md.ColI != null)
|
if (md.ColI != null)
|
||||||
{
|
{
|
||||||
if ((md.ColI.Contains("bremerhaven", StringComparison.OrdinalIgnoreCase) && this.PortLocode.Equals("DEWVN")) ||
|
if ((md.ColI.Contains("bremerhaven", StringComparison.OrdinalIgnoreCase) && this.PortLocode.Equals("DEWVN")) ||
|
||||||
(md.ColI.Contains("eurogate", StringComparison.OrdinalIgnoreCase) && this.PortLocode.Equals("DEBRV")))
|
(md.ColI.Contains("eurogate", StringComparison.OrdinalIgnoreCase) && this.PortLocode.Equals("DEBRV")))
|
||||||
throw new InvalidOperationException($"{md.ColI} found in import to {PortLocode}, this is probably an error. Aborting import");
|
throw new InvalidOperationException($"{md.ColI} found in import to {PortLocode}, this is probably an error. Aborting import");
|
||||||
}
|
}
|
||||||
if (!reader.IsDBNull(9)) md.ColJ = reader.ReadAsString(9);
|
if (!reader.IsDBNull(9)) md.ColJ = ReadFieldAsString(reader, 9);
|
||||||
if (md.ColJ == null) continue;
|
if (md.ColJ == null) continue;
|
||||||
if (!(md.ColJ.Equals("msk", StringComparison.OrdinalIgnoreCase) || md.ColJ.Equals("sgl", StringComparison.OrdinalIgnoreCase))) continue; // skip operator we are not interested in
|
if (!(md.ColJ.Equals("msk", StringComparison.OrdinalIgnoreCase) || md.ColJ.Equals("sgl", StringComparison.OrdinalIgnoreCase))) continue; // skip operator we are not interested in
|
||||||
if (!reader.IsDBNull(10)) md.ColK = reader.ReadAsString(10);
|
if (!reader.IsDBNull(10)) md.ColK = ReadFieldAsString(reader, 10);
|
||||||
if (!reader.IsDBNull(11)) md.ColL = reader.ReadAsString(11);
|
if (!reader.IsDBNull(11)) md.ColL = ReadFieldAsString(reader, 11);
|
||||||
if (!reader.IsDBNull(12)) md.ColM = reader.ReadAsString(12);
|
if (!reader.IsDBNull(12)) md.ColM = ReadFieldAsString(reader, 12);
|
||||||
if (!reader.IsDBNull(13)) md.Remark = reader.ReadAsString(13);
|
if (!reader.IsDBNull(13)) md.Remark = ReadFieldAsString(reader, 13);
|
||||||
|
|
||||||
if(!md.ColF.IsNullOrEmpty())
|
if(!md.ColF.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
@ -493,6 +516,7 @@ namespace ENI2.Controls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.TimeFilterItemSource();
|
this.TimeFilterItemSource();
|
||||||
|
// this.SortItemSource();
|
||||||
busyControl.BusyState = Util.UIHelper.BusyStateEnum.NEUTRAL;
|
busyControl.BusyState = Util.UIHelper.BusyStateEnum.NEUTRAL;
|
||||||
|
|
||||||
this.dataGridPOCores.Items.Refresh();
|
this.dataGridPOCores.Items.Refresh();
|
||||||
@ -607,7 +631,7 @@ namespace ENI2.Controls
|
|||||||
MaerskData md = grid.SelectedItem as MaerskData;
|
MaerskData md = grid.SelectedItem as MaerskData;
|
||||||
if(md.MessageCore != null) {
|
if(md.MessageCore != null) {
|
||||||
Util.UIHelper.SetBusyState();
|
Util.UIHelper.SetBusyState();
|
||||||
this.MessageCoreSelected?.Invoke(md.MessageCore, DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].ShipcallDisplayMode);
|
this.MessageCoreSelected?.Invoke(md.MessageCore);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,8 +16,12 @@
|
|||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel Grid.Row="0" Orientation="Horizontal">
|
<StackPanel Grid.Row="0" Orientation="Horizontal">
|
||||||
|
<Label Content="Excel:" />
|
||||||
|
<Label Name="labelStatusExcel" Content="?" FontWeight="Bold" />
|
||||||
<Label Content="Transmitter:" />
|
<Label Content="Transmitter:" />
|
||||||
<Label Name="labelStatusTransmitter" Content="?" FontWeight="Bold" />
|
<Label Name="labelStatusTransmitter" Content="?" FontWeight="Bold" />
|
||||||
|
<Label Content="Report:" />
|
||||||
|
<Label Name="labelStatusReport" Content="?" FontWeight="Bold" />
|
||||||
<Button Name="refreshButton" Content="{x:Static p:Resources.textRefresh}" Margin="4" Background="Transparent" Click="refreshButton_Click"/>
|
<Button Name="refreshButton" Content="{x:Static p:Resources.textRefresh}" Margin="4" Background="Transparent" Click="refreshButton_Click"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<local:ENIDataGrid Grid.Row="1"
|
<local:ENIDataGrid Grid.Row="1"
|
||||||
|
|||||||
@ -27,14 +27,13 @@ namespace ENI2.Controls
|
|||||||
private readonly static ILog _log = LogManager.GetLogger("ServerStatus");
|
private readonly static ILog _log = LogManager.GetLogger("ServerStatus");
|
||||||
private ProgressBar _updateProgressBar;
|
private ProgressBar _updateProgressBar;
|
||||||
private TextBlock _updateTextBlock;
|
private TextBlock _updateTextBlock;
|
||||||
private bool _isUpdating = false;
|
|
||||||
private readonly static Dictionary<Guid, string> coreIdVisitIdMap = new Dictionary<Guid, string>();
|
|
||||||
|
|
||||||
public ServerStatusControl()
|
public ServerStatusControl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
this.dataGridStatus.ItemsSource = this.entries;
|
this.dataGridStatus.ItemsSource = this.entries;
|
||||||
this.Loaded += ServerStatusControl_Loaded;
|
this.Loaded += ServerStatusControl_Loaded;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ServerStatusControl_Loaded(object sender, System.Windows.RoutedEventArgs e)
|
private void ServerStatusControl_Loaded(object sender, System.Windows.RoutedEventArgs e)
|
||||||
@ -44,8 +43,6 @@ namespace ENI2.Controls
|
|||||||
|
|
||||||
internal void Update(LockingServiceReference.ServerStatus serverStatus)
|
internal void Update(LockingServiceReference.ServerStatus serverStatus)
|
||||||
{
|
{
|
||||||
if (this._isUpdating) return;
|
|
||||||
_isUpdating = true;
|
|
||||||
int totalNum = serverStatus.IMPFiles.Length + serverStatus.READYFiles.Length + serverStatus.CORRUPTFiles.Length;
|
int totalNum = serverStatus.IMPFiles.Length + serverStatus.READYFiles.Length + serverStatus.CORRUPTFiles.Length;
|
||||||
entries.Clear();
|
entries.Clear();
|
||||||
BackgroundWorker bgWorker = new BackgroundWorker();
|
BackgroundWorker bgWorker = new BackgroundWorker();
|
||||||
@ -106,12 +103,16 @@ namespace ENI2.Controls
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Enumeration parsen und text ausgeben
|
// Enumeration parsen und text ausgeben
|
||||||
|
ServiceControllerStatus excel = (ServiceControllerStatus)serverStatus.Excel;
|
||||||
|
this.labelStatusExcel.Content = excel.ToString();
|
||||||
|
|
||||||
|
ServiceControllerStatus report = (ServiceControllerStatus)serverStatus.Report;
|
||||||
|
this.labelStatusReport.Content = report.ToString();
|
||||||
|
|
||||||
ServiceControllerStatus transmitter = (ServiceControllerStatus)serverStatus.Transmitter;
|
ServiceControllerStatus transmitter = (ServiceControllerStatus)serverStatus.Transmitter;
|
||||||
this.labelStatusTransmitter.Content = transmitter.ToString();
|
this.labelStatusTransmitter.Content = transmitter.ToString();
|
||||||
|
|
||||||
this.busyIndicator.IsBusy = false;
|
this.busyIndicator.IsBusy = false;
|
||||||
|
|
||||||
_isUpdating = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.busyIndicator.IsBusy = true;
|
this.busyIndicator.IsBusy = true;
|
||||||
@ -146,25 +147,17 @@ namespace ENI2.Controls
|
|||||||
|
|
||||||
string guidString = m.Groups[2].Value;
|
string guidString = m.Groups[2].Value;
|
||||||
|
|
||||||
string idString = "";
|
|
||||||
if (!guidIdDict.ContainsKey(guidString))
|
if (!guidIdDict.ContainsKey(guidString))
|
||||||
{
|
{
|
||||||
|
string idString = "";
|
||||||
if (Guid.TryParse(m.Groups[2].Value, out Guid coreId))
|
if (Guid.TryParse(m.Groups[2].Value, out Guid coreId))
|
||||||
{
|
|
||||||
if (!coreIdVisitIdMap.ContainsKey(coreId))
|
|
||||||
{
|
{
|
||||||
MessageCore aCore = DBManager.Instance.GetMessageCoreById(coreId);
|
MessageCore aCore = DBManager.Instance.GetMessageCoreById(coreId);
|
||||||
if (aCore != null)
|
if (aCore != null)
|
||||||
{
|
{
|
||||||
coreIdVisitIdMap[coreId] = aCore.DisplayId;
|
|
||||||
idString = aCore.DisplayId;
|
idString = aCore.DisplayId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
idString = coreIdVisitIdMap[coreId];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
guidIdDict[guidString] = idString;
|
guidIdDict[guidString] = idString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,6 @@ using System.Windows;
|
|||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using ENI2.Util;
|
using ENI2.Util;
|
||||||
using System.Windows.Data;
|
|
||||||
|
|
||||||
namespace ENI2.Controls
|
namespace ENI2.Controls
|
||||||
{
|
{
|
||||||
@ -36,20 +35,6 @@ namespace ENI2.Controls
|
|||||||
closeButton.Click += (s, e) => { if (this.IsModal()) DialogResult = true; CloseClicked?.Invoke(); this.Close(); };
|
closeButton.Click += (s, e) => { if (this.IsModal()) DialogResult = true; CloseClicked?.Invoke(); this.Close(); };
|
||||||
refreshButton.Click += (s, e) => { RefreshClicked?.Invoke(); };
|
refreshButton.Click += (s, e) => { RefreshClicked?.Invoke(); };
|
||||||
|
|
||||||
string topProperty = "W2Top";
|
|
||||||
string leftProperty = "W2Left";
|
|
||||||
if(this.GetType().Name == "ViolationListDialog")
|
|
||||||
{
|
|
||||||
topProperty = "W3Top";
|
|
||||||
leftProperty = "W3Left";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
SettingBindingExtension stBinding = new SettingBindingExtension(topProperty);
|
|
||||||
this.SetBinding(Window.TopProperty, stBinding);
|
|
||||||
|
|
||||||
SettingBindingExtension slBinding = new SettingBindingExtension(leftProperty);
|
|
||||||
this.SetBinding (Window.LeftProperty, slBinding);
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -69,15 +69,10 @@ namespace ENI2.Controls
|
|||||||
|
|
||||||
private async void DelItem_Click(object sender, RoutedEventArgs e)
|
private async void DelItem_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (this.dataGridValueMappings.SelectedItems.Count > 0)
|
if (this.dataGridValueMappings.SelectedItem is ValueMapping vm)
|
||||||
{
|
{
|
||||||
if (MessageBox.Show($"Are you sure to delete the selected values?", Properties.Resources.textConfirmation, MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) ==
|
if (MessageBox.Show($"Are you sure to delete {vm.Key} -> {vm.Value}?", Properties.Resources.textConfirmation, MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) ==
|
||||||
MessageBoxResult.Yes)
|
MessageBoxResult.Yes)
|
||||||
{
|
|
||||||
var selectedItems = new List<ValueMapping>();
|
|
||||||
foreach(ValueMapping vm in this.dataGridValueMappings.SelectedItems)
|
|
||||||
selectedItems.Add(vm);
|
|
||||||
foreach(ValueMapping vm in selectedItems)
|
|
||||||
{
|
{
|
||||||
int result = await DBManagerAsync.DeleteAsync(vm);
|
int result = await DBManagerAsync.DeleteAsync(vm);
|
||||||
if (result == 1)
|
if (result == 1)
|
||||||
@ -87,7 +82,6 @@ namespace ENI2.Controls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void AddItem_Click(object sender, RoutedEventArgs e)
|
private void AddItem_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -34,7 +34,8 @@ namespace ENI2
|
|||||||
if (parentObject == null) return null;
|
if (parentObject == null) return null;
|
||||||
|
|
||||||
//check if the parent matches the type we're looking for
|
//check if the parent matches the type we're looking for
|
||||||
if (parentObject is T parent)
|
T parent = parentObject as T;
|
||||||
|
if (parent != null)
|
||||||
return parent;
|
return parent;
|
||||||
else
|
else
|
||||||
return FindParent<T>(parentObject);
|
return FindParent<T>(parentObject);
|
||||||
|
|||||||
@ -33,7 +33,6 @@ namespace ENI2
|
|||||||
private DependencyPropertyDescriptor _dpComboboxValue;
|
private DependencyPropertyDescriptor _dpComboboxValue;
|
||||||
private DependencyPropertyDescriptor _dpNumericUpdown;
|
private DependencyPropertyDescriptor _dpNumericUpdown;
|
||||||
private DependencyPropertyDescriptor _dpIntUpdown;
|
private DependencyPropertyDescriptor _dpIntUpdown;
|
||||||
|
|
||||||
private readonly Dictionary<Object, Message.NotificationClass> _controlClassDict = new Dictionary<object, Message.NotificationClass>();
|
private readonly Dictionary<Object, Message.NotificationClass> _controlClassDict = new Dictionary<object, Message.NotificationClass>();
|
||||||
private readonly Dictionary<Message.NotificationClass, Message> _typeMessageDict = new Dictionary<Message.NotificationClass, Message>();
|
private readonly Dictionary<Message.NotificationClass, Message> _typeMessageDict = new Dictionary<Message.NotificationClass, Message>();
|
||||||
|
|
||||||
@ -70,7 +69,7 @@ namespace ENI2
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Damit kann ein Listenelement eine Validierung der gesamten Anmeldung auslösen (inkl. Highlighting) (auf Knopfdruck)
|
/// Damit kann ein Listenelement eine Validierung der gesamten Anmeldung auslösen (inkl. Highlighting) (auf Knopfdruck)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public event Action<bool> RequestValidate;
|
public event Action RequestValidate;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Alle Meldeklassen die auf "zu versenden" stehen werden validiert und falls die Validierung scheitert auf "SUSPEND" gestellt
|
/// Alle Meldeklassen die auf "zu versenden" stehen werden validiert und falls die Validierung scheitert auf "SUSPEND" gestellt
|
||||||
@ -90,7 +89,7 @@ namespace ENI2
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Eine in der Detailansicht enthaltene Meldeklasse hat sich geändert
|
/// Eine in der Detailansicht enthaltene Meldeklasse hat sich geändert
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public event Action<Message.NotificationClass?> NotificationClassChanged;
|
public event Action<Message.NotificationClass> NotificationClassChanged;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Eine Maske soll neu erzeugt werden weil sich dort "indirekt" etwas geändert hat durch eine Änderung in einer anderen Maske.
|
/// Eine Maske soll neu erzeugt werden weil sich dort "indirekt" etwas geändert hat durch eine Änderung in einer anderen Maske.
|
||||||
@ -135,6 +134,7 @@ namespace ENI2
|
|||||||
_dpNumericUpdown = DependencyPropertyDescriptor.FromProperty(Xceed.Wpf.Toolkit.DoubleUpDown.ValueProperty, typeof(Xceed.Wpf.Toolkit.DoubleUpDown));
|
_dpNumericUpdown = DependencyPropertyDescriptor.FromProperty(Xceed.Wpf.Toolkit.DoubleUpDown.ValueProperty, typeof(Xceed.Wpf.Toolkit.DoubleUpDown));
|
||||||
_dpIntUpdown = DependencyPropertyDescriptor.FromProperty(Xceed.Wpf.Toolkit.IntegerUpDown.ValueProperty, typeof(Xceed.Wpf.Toolkit.IntegerUpDown));
|
_dpIntUpdown = DependencyPropertyDescriptor.FromProperty(Xceed.Wpf.Toolkit.IntegerUpDown.ValueProperty, typeof(Xceed.Wpf.Toolkit.IntegerUpDown));
|
||||||
|
|
||||||
|
|
||||||
foreach(Message message in this.Messages)
|
foreach(Message message in this.Messages)
|
||||||
{
|
{
|
||||||
_typeMessageDict[message.MessageNotificationClass] = message;
|
_typeMessageDict[message.MessageNotificationClass] = message;
|
||||||
@ -160,9 +160,9 @@ namespace ENI2
|
|||||||
this.RequestReload?.Invoke(coreId);
|
this.RequestReload?.Invoke(coreId);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void OnRequestValidate(bool showDialog)
|
protected virtual void OnRequestValidate()
|
||||||
{
|
{
|
||||||
this.RequestValidate?.Invoke(showDialog);
|
this.RequestValidate?.Invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void OnRequestSendValidation()
|
protected virtual void OnRequestSendValidation()
|
||||||
@ -185,17 +185,6 @@ namespace ENI2
|
|||||||
this.ResetControlCache?.Invoke(messageGroupName);
|
this.ResetControlCache?.Invoke(messageGroupName);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void ScrollViewer_PreviewMouseWheel(object sender, System.Windows.Input.MouseWheelEventArgs e)
|
|
||||||
{
|
|
||||||
ScrollViewer scv = (ScrollViewer)sender;
|
|
||||||
scv.ScrollToVerticalOffset(scv.VerticalOffset - e.Delta);
|
|
||||||
e.Handled = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual int SelectedTabIndex { get; set; } = -1;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region event handling for control content changes (signal dirty etc)
|
#region event handling for control content changes (signal dirty etc)
|
||||||
|
|
||||||
protected void RegisterTextboxChange(TextBox textBox, Message.NotificationClass notificationClass)
|
protected void RegisterTextboxChange(TextBox textBox, Message.NotificationClass notificationClass)
|
||||||
@ -269,16 +258,11 @@ namespace ENI2
|
|||||||
{
|
{
|
||||||
_typeMessageDict[notificationClass].IsDirty = true;
|
_typeMessageDict[notificationClass].IsDirty = true;
|
||||||
// signal this notification class changed..
|
// signal this notification class changed..
|
||||||
this.OnNotificationClassChanged(notificationClass);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void OnNotificationClassChanged(Message.NotificationClass? notificationClass)
|
|
||||||
{
|
|
||||||
this.NotificationClassChanged?.Invoke(notificationClass);
|
this.NotificationClassChanged?.Invoke(notificationClass);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#region "BHV Spezial" Datetime Parsing..
|
#region "BHV Spezial" Datetime Parsing..
|
||||||
|
|
||||||
@ -351,6 +335,8 @@ namespace ENI2
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region IHighlightControlContainer implementation
|
#region IHighlightControlContainer implementation
|
||||||
|
|
||||||
public virtual void HighlightErrorMessageContainer()
|
public virtual void HighlightErrorMessageContainer()
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="220" x:Name="leftColumnDefinition"/>
|
<ColumnDefinition Width="220" />
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
@ -28,7 +28,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="0" >
|
<StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="0" >
|
||||||
<xctk:AutoSelectTextBox x:Name="displayIdLabel" Width="Auto" VerticalContentAlignment="Center" FontWeight="Bold" IsReadOnly="True" BorderThickness="0" AutoSelectBehavior="OnFocus" />
|
<xctk:AutoSelectTextBox x:Name="displayIdLabel" Width="Auto" VerticalContentAlignment="Center" FontWeight="Bold" IsReadOnly="True" BorderThickness="0" AutoSelectBehavior="OnFocus" />
|
||||||
<Label Margin="10,0,0,0" Content="{x:Static p:Resources.textShipEmail}" VerticalContentAlignment="Center" />
|
<Label Margin="10,0,0,0" Content="Ship e-mail:" VerticalContentAlignment="Center" />
|
||||||
<xctk:AutoSelectTextBox Width="400" x:Name="shipEMailLabel" VerticalContentAlignment="Center" FontWeight="Normal" IsReadOnly="True" BorderThickness="0" AutoSelectBehavior="OnFocus" />
|
<xctk:AutoSelectTextBox Width="400" x:Name="shipEMailLabel" VerticalContentAlignment="Center" FontWeight="Normal" IsReadOnly="True" BorderThickness="0" AutoSelectBehavior="OnFocus" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Button Name="buttonSave" Grid.Column="1" Grid.Row="0" Margin="2" Click="buttonSave_Click" BorderThickness="0" Background="Transparent" Visibility="Hidden">
|
<Button Name="buttonSave" Grid.Column="1" Grid.Row="0" Margin="2" Click="buttonSave_Click" BorderThickness="0" Background="Transparent" Visibility="Hidden">
|
||||||
|
|||||||
@ -15,8 +15,6 @@ using ENI2.Util;
|
|||||||
|
|
||||||
using ENI2.EditControls;
|
using ENI2.EditControls;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using System.Linq;
|
|
||||||
using ENI2.SheetDisplayControls;
|
|
||||||
|
|
||||||
namespace ENI2
|
namespace ENI2
|
||||||
{
|
{
|
||||||
@ -108,15 +106,12 @@ namespace ENI2
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool HasCriticalInfoMissing(out string messageText, string locode)
|
public bool HasCriticalInfoMissing(out string messageText)
|
||||||
{
|
{
|
||||||
messageText = "";
|
messageText = "";
|
||||||
// Hier haben wir Logik für Spezialfälle, z.B. dass für BRE und BRV bestimmte Meldeklassen gesendet werden *müssen*
|
// Hier haben wir Logik für Spezialfälle, z.B. dass für BRE und BRV bestimmte Meldeklassen gesendet werden *müssen*
|
||||||
|
|
||||||
switch (locode)
|
if(this.Core.PoC.Equals("DEBRV") || this.Core.PoC.Equals("DEBRE"))
|
||||||
{
|
|
||||||
case "DEBRV":
|
|
||||||
case "DEBRE":
|
|
||||||
{
|
{
|
||||||
foreach(Message aMessage in _messages)
|
foreach(Message aMessage in _messages)
|
||||||
{
|
{
|
||||||
@ -127,26 +122,15 @@ namespace ENI2
|
|||||||
if ((aMessage.MessageNotificationClass == Message.NotificationClass.TIEFA) && (aMessage.InternalStatus != Message.BSMDStatus.CONFIRMED)) { messageText = "TIEFA"; return true; }
|
if ((aMessage.MessageNotificationClass == Message.NotificationClass.TIEFA) && (aMessage.InternalStatus != Message.BSMDStatus.CONFIRMED)) { messageText = "TIEFA"; return true; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case "DEHAM":
|
|
||||||
foreach (Message aMessage in _messages)
|
|
||||||
{
|
|
||||||
if ((aMessage.MessageNotificationClass == Message.NotificationClass.SERV) && (aMessage.InternalStatus != Message.BSMDStatus.CONFIRMED)) { messageText = "SERV"; return true; }
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Construction
|
#region Construction
|
||||||
|
|
||||||
public DetailRootControl(MessageCore aCore, ReportingParty.ShipcallDisplayModeEnum displayMode)
|
public DetailRootControl(MessageCore aCore)
|
||||||
{
|
{
|
||||||
Core = aCore;
|
Core = aCore;
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@ -154,10 +138,8 @@ namespace ENI2
|
|||||||
shipEMailLabel.Text = aCore.HerbergEmailContactReportingVessel;
|
shipEMailLabel.Text = aCore.HerbergEmailContactReportingVessel;
|
||||||
displayIdLabel.Text = aCore.DisplayId;
|
displayIdLabel.Text = aCore.DisplayId;
|
||||||
|
|
||||||
// Unterscheidung in welchem Darstellungs-Mode der Anlauf dargestellt wird (Classic oder Formblatt)
|
|
||||||
|
|
||||||
if (displayMode == ReportingParty.ShipcallDisplayModeEnum.CLASSIC)
|
// Listbox befüllen
|
||||||
{
|
|
||||||
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textOverview, MessageGroupControlType = typeof(OverViewDetailControl), ImagePath = "Resources/documents.png" });
|
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textOverview, MessageGroupControlType = typeof(OverViewDetailControl), ImagePath = "Resources/documents.png" });
|
||||||
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textPortCall, MessageGroupControlType = typeof(PortCallDetailControl), ImagePath = "Resources/eye_blue.png" });
|
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textPortCall, MessageGroupControlType = typeof(PortCallDetailControl), ImagePath = "Resources/eye_blue.png" });
|
||||||
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textPortNotification, MessageGroupControlType = typeof(PortNotificationDetailControl), ImagePath = "Resources/anchor.png" });
|
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textPortNotification, MessageGroupControlType = typeof(PortNotificationDetailControl), ImagePath = "Resources/anchor.png" });
|
||||||
@ -172,25 +154,7 @@ namespace ENI2
|
|||||||
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textDGArrival, MessageGroupControlType = typeof(DangerousGoodsDetailControl), ImagePath = "Resources/sign_warning_radiation.png" });
|
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textDGArrival, MessageGroupControlType = typeof(DangerousGoodsDetailControl), ImagePath = "Resources/sign_warning_radiation.png" });
|
||||||
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textDGDeparture, MessageGroupControlType = typeof(DangerousGoodsDetailControl), ImagePath = "Resources/sign_warning_radiation.png" });
|
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textDGDeparture, MessageGroupControlType = typeof(DangerousGoodsDetailControl), ImagePath = "Resources/sign_warning_radiation.png" });
|
||||||
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textTowage, MessageGroupControlType = typeof(TowageDetailControl), ImagePath = "Resources/ship2.png" });
|
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textTowage, MessageGroupControlType = typeof(TowageDetailControl), ImagePath = "Resources/ship2.png" });
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textOverview, MessageGroupControlType = typeof(OverViewDetailControl), ImagePath = "Resources/documents.png" });
|
|
||||||
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.text1Voyage, MessageGroupControlType = typeof(VoyageControl), ImagePath = "Resources/ship2.png" });
|
|
||||||
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.text2PortCall, MessageGroupControlType = typeof(PortControl), ImagePath = "Resources/anchor.png" });
|
|
||||||
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.text3PreArrival, MessageGroupControlType = typeof(PreArrivalControl), ImagePath = "Resources/arrow_down_right_red.png" });
|
|
||||||
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.text4PreDeparture, MessageGroupControlType = typeof(PreDepartureControl), ImagePath = "Resources/arrow_up_right_green.png" });
|
|
||||||
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.text5ShipData, MessageGroupControlType = typeof(ShipDataControl), ImagePath = "Resources/containership.png" });
|
|
||||||
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.text6CrewDataOnArrival, MessageGroupControlType = typeof(CrewPreArrivalControl), ImagePath = "Resources/arrival_worker.png" });
|
|
||||||
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.text7CrewDeparture, MessageGroupControlType = typeof(CrewDepartureControl), ImagePath = "Resources/departure_worker.png" });
|
|
||||||
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.text8PassengerArrival, MessageGroupControlType = typeof(PassengerPreArrivalControl), ImagePath = "Resources/arrival_user.png" });
|
|
||||||
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.text9PassengerDeparture, MessageGroupControlType = typeof(PassengerDepartureControl), ImagePath = "Resources/departure_user.png" });
|
|
||||||
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.text10DangerousCargoArrival, MessageGroupControlType = typeof(DangerousCargoControl), ImagePath = "Resources/sign_warning_radiation.png" });
|
|
||||||
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.text11DangerousCargoDeparture, MessageGroupControlType = typeof(DangerousCargoControl), ImagePath = "Resources/sign_warning_radiation.png" });
|
|
||||||
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.text12ATAATD, MessageGroupControlType = typeof(ATAControl), ImagePath = "Resources/clock.png" });
|
|
||||||
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.text13WasteReceipts, MessageGroupControlType = typeof(WasteReceiptsControl), ImagePath = "Resources/garbage.png" });
|
|
||||||
this.leftColumnDefinition.Width = new GridLength(260);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.listBoxMessages.ItemsSource = this._listBoxList;
|
this.listBoxMessages.ItemsSource = this._listBoxList;
|
||||||
|
|
||||||
@ -199,7 +163,7 @@ namespace ENI2
|
|||||||
_messages.AddRange(missingMessages);
|
_messages.AddRange(missingMessages);
|
||||||
|
|
||||||
BindingOperations.EnableCollectionSynchronization(_messages, this.messageListLock);
|
BindingOperations.EnableCollectionSynchronization(_messages, this.messageListLock);
|
||||||
Dispatcher.BeginInvoke((System.Action)(() => this.listBoxMessages.SelectedIndex = 0));
|
Dispatcher.BeginInvoke((Action)(() => this.listBoxMessages.SelectedIndex = 0));
|
||||||
|
|
||||||
RoutedCommand saveCmd = new RoutedCommand();
|
RoutedCommand saveCmd = new RoutedCommand();
|
||||||
saveCmd.InputGestures.Add(new KeyGesture(Key.S, ModifierKeys.Control));
|
saveCmd.InputGestures.Add(new KeyGesture(Key.S, ModifierKeys.Control));
|
||||||
@ -226,8 +190,7 @@ namespace ENI2
|
|||||||
public void CoreChanged(MessageCore newCore)
|
public void CoreChanged(MessageCore newCore)
|
||||||
{
|
{
|
||||||
this.Core = newCore;
|
this.Core = newCore;
|
||||||
this.ReloadCore();
|
Application.Current.Dispatcher.Invoke(delegate
|
||||||
System.Windows.Application.Current.Dispatcher.Invoke(delegate
|
|
||||||
{
|
{
|
||||||
if(controlCache.ContainsKey(Properties.Resources.textOverview))
|
if(controlCache.ContainsKey(Properties.Resources.textOverview))
|
||||||
{
|
{
|
||||||
@ -273,8 +236,6 @@ namespace ENI2
|
|||||||
// Spezial-Balkon für die Wiederverwendung von HAZD / HAZA als ein Control (es tut mir leid :D)
|
// Spezial-Balkon für die Wiederverwendung von HAZD / HAZA als ein Control (es tut mir leid :D)
|
||||||
if (mg.MessageGroupName.Equals(Properties.Resources.textDGDeparture))
|
if (mg.MessageGroupName.Equals(Properties.Resources.textDGDeparture))
|
||||||
((DangerousGoodsDetailControl)detailControl).IsDeparture = true;
|
((DangerousGoodsDetailControl)detailControl).IsDeparture = true;
|
||||||
if (mg.MessageGroupName.Equals(Properties.Resources.text11DangerousCargoDeparture))
|
|
||||||
((DangerousCargoControl)detailControl).IsDeparture = true;
|
|
||||||
detailControl.Core = Core;
|
detailControl.Core = Core;
|
||||||
detailControl.Messages = _messages;
|
detailControl.Messages = _messages;
|
||||||
detailControl.LockedByOtherUser = this.LockedByOtherUser;
|
detailControl.LockedByOtherUser = this.LockedByOtherUser;
|
||||||
@ -453,7 +414,6 @@ namespace ENI2
|
|||||||
newMessage.SaveElements();
|
newMessage.SaveElements();
|
||||||
}
|
}
|
||||||
|
|
||||||
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).LoadXtraData(newCore); // reload data from DB and set all rel properites
|
|
||||||
this.OnOpenNewCoreRequested(newCore);
|
this.OnOpenNewCoreRequested(newCore);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -469,7 +429,7 @@ namespace ENI2
|
|||||||
this.controlCache.Clear();
|
this.controlCache.Clear();
|
||||||
|
|
||||||
// return to "new" overview
|
// return to "new" overview
|
||||||
Dispatcher.BeginInvoke((System.Action)(() => this.listBoxMessages_SelectionChanged(this, null)));
|
Dispatcher.BeginInvoke((Action)(() => this.listBoxMessages_SelectionChanged(this, null)));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DetailControl_ResetControlCache(string messageGroupName)
|
private void DetailControl_ResetControlCache(string messageGroupName)
|
||||||
@ -487,7 +447,6 @@ namespace ENI2
|
|||||||
{
|
{
|
||||||
|
|
||||||
Util.UIHelper.SetBusyState();
|
Util.UIHelper.SetBusyState();
|
||||||
int currentMainTabIndex = -1;
|
|
||||||
|
|
||||||
if (this.detailView.Children[0] is DetailBaseControl currentControl)
|
if (this.detailView.Children[0] is DetailBaseControl currentControl)
|
||||||
{
|
{
|
||||||
@ -502,24 +461,10 @@ namespace ENI2
|
|||||||
// ggf. hat sich die Ticketnr geändert..
|
// ggf. hat sich die Ticketnr geändert..
|
||||||
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(currentControl.Core);
|
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(currentControl.Core);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
currentMainTabIndex = currentControl.SelectedTabIndex;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.DetailControl_RequestReload(this.Core.Id.Value);
|
this.DetailControl_RequestReload(this.Core.Id.Value);
|
||||||
|
|
||||||
System.Action<int> SetTabAction = x =>
|
|
||||||
{
|
|
||||||
// this hopefully happens *after* the view was completely reloaded
|
|
||||||
if (this.detailView.Children[0] is DetailBaseControl currentNewControl)
|
|
||||||
{
|
|
||||||
currentNewControl.SelectedTabIndex = x;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
if (currentMainTabIndex >= 0)
|
|
||||||
Dispatcher.BeginInvoke(SetTabAction, currentMainTabIndex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SaveMessage(Message message)
|
private void SaveMessage(Message message)
|
||||||
@ -528,14 +473,9 @@ namespace ENI2
|
|||||||
{
|
{
|
||||||
if ((message.Status == Message.MessageStatus.ACCEPTED) &&
|
if ((message.Status == Message.MessageStatus.ACCEPTED) &&
|
||||||
((message.InternalStatus == Message.BSMDStatus.CONFIRMED) || (message.InternalStatus == Message.BSMDStatus.VIOLATION)))
|
((message.InternalStatus == Message.BSMDStatus.CONFIRMED) || (message.InternalStatus == Message.BSMDStatus.VIOLATION)))
|
||||||
{
|
|
||||||
message.InternalStatus = Message.BSMDStatus.UPDATED;
|
message.InternalStatus = Message.BSMDStatus.UPDATED;
|
||||||
message.Status = null; // reset send status
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
message.InternalStatus = Message.BSMDStatus.SAVED;
|
message.InternalStatus = Message.BSMDStatus.SAVED;
|
||||||
}
|
|
||||||
|
|
||||||
string userName = "?";
|
string userName = "?";
|
||||||
if(App.UserId.HasValue && DBManager.Instance.GetReportingPartyDict().ContainsKey(App.UserId.Value))
|
if(App.UserId.HasValue && DBManager.Instance.GetReportingPartyDict().ContainsKey(App.UserId.Value))
|
||||||
@ -575,7 +515,6 @@ namespace ENI2
|
|||||||
{
|
{
|
||||||
|
|
||||||
Util.UIHelper.SetBusyState();
|
Util.UIHelper.SetBusyState();
|
||||||
int currentMainTabIndex = -1;
|
|
||||||
|
|
||||||
foreach (Message message in this._messages)
|
foreach (Message message in this._messages)
|
||||||
{
|
{
|
||||||
@ -589,30 +528,13 @@ namespace ENI2
|
|||||||
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(currentControl.Core);
|
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(currentControl.Core);
|
||||||
}
|
}
|
||||||
|
|
||||||
currentMainTabIndex = currentControl.SelectedTabIndex;
|
|
||||||
Trace.WriteLine($"Last selected tab index: {currentMainTabIndex}");
|
|
||||||
|
|
||||||
this.buttonSaveAll.Visibility = Visibility.Hidden;
|
this.buttonSaveAll.Visibility = Visibility.Hidden;
|
||||||
this.buttonSave.Visibility = Visibility.Hidden;
|
this.buttonSave.Visibility = Visibility.Hidden;
|
||||||
|
}
|
||||||
this.DetailControl_RequestReload(this.Core.Id.Value);
|
this.DetailControl_RequestReload(this.Core.Id.Value);
|
||||||
|
|
||||||
Action<int> SetTabAction = x =>
|
|
||||||
{
|
|
||||||
// this hopefully happens *after* the view was completely reloaded
|
|
||||||
if (this.detailView.Children[0] is DetailBaseControl currentNewControl)
|
|
||||||
{
|
|
||||||
currentNewControl.SelectedTabIndex = x;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
if(currentMainTabIndex >= 0)
|
|
||||||
Dispatcher.BeginInvoke(SetTabAction, currentMainTabIndex);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
private void DetailControl_NotificationClassChanged(Message.NotificationClass notificationClass)
|
||||||
|
|
||||||
private void DetailControl_NotificationClassChanged(Message.NotificationClass? notificationClass)
|
|
||||||
{
|
{
|
||||||
// in der Übersicht die Meldeklasse als geändert markieren..?
|
// in der Übersicht die Meldeklasse als geändert markieren..?
|
||||||
this.buttonSaveAll.Visibility = Visibility.Visible;
|
this.buttonSaveAll.Visibility = Visibility.Visible;
|
||||||
@ -664,7 +586,7 @@ namespace ENI2
|
|||||||
|
|
||||||
private void ShortCutValidate(object sender, ExecutedRoutedEventArgs e)
|
private void ShortCutValidate(object sender, ExecutedRoutedEventArgs e)
|
||||||
{
|
{
|
||||||
this.DetailControl_RequestValidate(true);
|
this.DetailControl_RequestValidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DetailControl_RequestReload(Guid id)
|
private void DetailControl_RequestReload(Guid id)
|
||||||
@ -684,15 +606,12 @@ namespace ENI2
|
|||||||
this.detailView.Children.Clear();
|
this.detailView.Children.Clear();
|
||||||
this.controlCache.Clear();
|
this.controlCache.Clear();
|
||||||
|
|
||||||
int currentIndex = this.listBoxMessages.SelectedIndex;
|
// return to "new" overviewdan
|
||||||
|
Dispatcher.BeginInvoke((Action)(() =>
|
||||||
// return to "new" overview
|
|
||||||
Dispatcher.BeginInvoke((System.Action)(() =>
|
|
||||||
{
|
{
|
||||||
this.listBoxMessages_SelectionChanged(this, null);
|
this.listBoxMessages_SelectionChanged(this, null);
|
||||||
shipNameLabel.Text = this.Core.Shipname;
|
shipNameLabel.Text = this.Core.Shipname;
|
||||||
shipEMailLabel.Text = this.Core.HerbergEmailContactReportingVessel;
|
shipEMailLabel.Text = this.Core.HerbergEmailContactReportingVessel;
|
||||||
this.listBoxMessages.SelectedIndex = currentIndex;
|
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
|
|
||||||
@ -777,9 +696,9 @@ namespace ENI2
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DetailControl_RequestValidate(bool showDialog)
|
private void DetailControl_RequestValidate()
|
||||||
{
|
{
|
||||||
this.Validate(showDialog, out _, out _);
|
this.Validate(true, out _, out _);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Validate(bool showMessages, out List<MessageViolation> vViolations, out List<MessageError> vErrors)
|
private void Validate(bool showMessages, out List<MessageViolation> vViolations, out List<MessageError> vErrors)
|
||||||
@ -794,27 +713,17 @@ namespace ENI2
|
|||||||
RuleEngine ruleEngine = new RuleEngine();
|
RuleEngine ruleEngine = new RuleEngine();
|
||||||
foreach (Message aMessage in _messages)
|
foreach (Message aMessage in _messages)
|
||||||
{
|
{
|
||||||
|
// XXX : TODO wegmachen wenn CREWD/PASD kommt
|
||||||
|
if ((aMessage.MessageNotificationClass == Message.NotificationClass.PASD) ||
|
||||||
|
(aMessage.MessageNotificationClass == Message.NotificationClass.CREWD))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (!aMessage.EvaluateForValidation(this.Core.IsTransit)) continue;
|
if (!aMessage.EvaluateForValidation(this.Core.IsTransit)) continue;
|
||||||
|
|
||||||
List<MessageError> errors = new List<MessageError>();
|
List<MessageError> errors = new List<MessageError>();
|
||||||
List<MessageViolation> violations = new List<MessageViolation>();
|
List<MessageViolation> violations = new List<MessageViolation>();
|
||||||
ruleEngine.ValidateMessage(aMessage, out errors, out violations);
|
ruleEngine.ValidateMessage(aMessage, out errors, out violations);
|
||||||
|
|
||||||
if (errors.Count > 0)
|
|
||||||
aMessage.ErrorCount = errors.Count;
|
|
||||||
else
|
|
||||||
aMessage.ErrorCount = null;
|
|
||||||
if (violations.Count > 0)
|
|
||||||
{
|
|
||||||
aMessage.ViolationCount = violations.Count;
|
|
||||||
aMessage.PositionViolationCount = violations.Count(v => !v.Identifier.IsNullOrEmpty());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
aMessage.ViolationCount = null;
|
|
||||||
aMessage.PositionViolationCount = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
string messageGroup = this.MessageGroupForMessage(aMessage);
|
string messageGroup = this.MessageGroupForMessage(aMessage);
|
||||||
|
|
||||||
if (messageGroup != null)
|
if (messageGroup != null)
|
||||||
@ -829,22 +738,17 @@ namespace ENI2
|
|||||||
vViolations.AddRange(violations);
|
vViolations.AddRange(violations);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 12.11.18 / 6.3.21 / 23.5.22 / 26.10.24: globale Plausi-Prüfungen
|
#region 12.11.18 / 6.3.21 / 23.5.22: globale Plausi-Prüfungen
|
||||||
|
Message crewaMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.CREW);
|
||||||
Message crewaMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.CREWA);
|
|
||||||
Message crewdMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.CREWD);
|
Message crewdMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.CREWD);
|
||||||
Message pasaMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.PASA);
|
Message pasaMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.PAS);
|
||||||
Message pasdMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.PASD);
|
Message pasdMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.PASD);
|
||||||
Message pobaMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.POBA);
|
Message pobaMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.POBA);
|
||||||
Message pobdMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.POBD);
|
|
||||||
Message secMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.SEC);
|
Message secMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.SEC);
|
||||||
Message noanodMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.NOA_NOD);
|
Message noanodMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.NOA_NOD);
|
||||||
Message mdhMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.MDH);
|
Message mdhMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.MDH);
|
||||||
Message was_rcptMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.WAS_RCPT);
|
Message was_rcptMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.WAS_RCPT);
|
||||||
Message wasMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.WAS);
|
Message wasMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.WAS);
|
||||||
Message servMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.SERV);
|
|
||||||
Message statMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.STAT);
|
|
||||||
Message pre72hMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.PRE72H);
|
|
||||||
|
|
||||||
#region CREW / PAS Count Plausibility
|
#region CREW / PAS Count Plausibility
|
||||||
|
|
||||||
@ -852,36 +756,19 @@ namespace ENI2
|
|||||||
{
|
{
|
||||||
POBA poba = pobaMessage.Elements[0] as POBA;
|
POBA poba = pobaMessage.Elements[0] as POBA;
|
||||||
|
|
||||||
if (crewaMessage.Elements.Count != (poba.TotalCrewMembersOnBoardUponArrival ?? 0))
|
if (crewaMessage.Elements.Count != poba.TotalCrewMembersOnBoardUponArrival)
|
||||||
{
|
{
|
||||||
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "POBA crew member count different from CREW count!", null, "Crew count mismatch", null, "CREWA");
|
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "POBA crew member count different from CREW count!", null, "Crew count mismatch", null, "CREW");
|
||||||
mv.MessageGroupName = Properties.Resources.textOverview;
|
mv.MessageGroupName = Properties.Resources.textOverview;
|
||||||
vViolations.Add(mv);
|
vViolations.Add(mv);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pasaMessage.Elements.Count != (poba.TotalPassengersOnBoardUponArrival ?? 0))
|
if(pasaMessage.Elements.Count != poba.TotalPassengersOnBoardUponArrival)
|
||||||
{
|
{
|
||||||
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "POBA passenger count different from PAS count!", null, "Passenger count mismatch", null, "PASA");
|
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "POBA passenger count different from PAS count!", null, "Passenger count mismatch", null, "PAS");
|
||||||
mv.MessageGroupName = Properties.Resources.textOverview;
|
mv.MessageGroupName = Properties.Resources.textOverview;
|
||||||
vViolations.Add(mv);
|
vViolations.Add(mv);
|
||||||
}
|
}
|
||||||
|
|
||||||
POBD pobd = pobdMessage.Elements[0] as POBD;
|
|
||||||
|
|
||||||
if (crewdMessage.Elements.Count != (pobd.TotalCrewMembersOnBoardUponDeparture ?? 0))
|
|
||||||
{
|
|
||||||
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "POBD crew member count different from CREW count!", null, "Crew count mismatch", null, "CREWD");
|
|
||||||
mv.MessageGroupName = Properties.Resources.textOverview;
|
|
||||||
vViolations.Add(mv);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pasdMessage.Elements.Count != (pobd.TotalPassengersOnBoardUponDeparture ?? 0))
|
|
||||||
{
|
|
||||||
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "POBD passenger count different from PAS count!", null, "Passenger count mismatch", null, "PASD");
|
|
||||||
mv.MessageGroupName = Properties.Resources.textOverview;
|
|
||||||
vViolations.Add(mv);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@ -890,13 +777,28 @@ namespace ENI2
|
|||||||
|
|
||||||
// Wir können davon ausgehen, dass bei allen Unterelementen die Flags gleich gesetzt sind. Das wird im Import und BorderPoliceDetailControl sichergestellt.
|
// Wir können davon ausgehen, dass bei allen Unterelementen die Flags gleich gesetzt sind. Das wird im Import und BorderPoliceDetailControl sichergestellt.
|
||||||
|
|
||||||
|
// XXX : TODO auskommentiert bis CREWD/PASD kommt
|
||||||
|
/*
|
||||||
|
|
||||||
if(crewaMessage.Elements.Count > 0)
|
if(crewaMessage.Elements.Count > 0)
|
||||||
{
|
{
|
||||||
CREW crewaFirst = crewaMessage.Elements[0] as CREW;
|
CREW crewaFirst = crewaMessage.Elements[0] as CREW;
|
||||||
bool crewaIsSchengen = crewaFirst.NotificationSchengen ?? false;
|
bool crewaIsSchengen = crewaFirst.NotificationSchengen ?? false;
|
||||||
if (!((crewaFirst.NotificationPAX ?? false) || crewaIsSchengen)) // mindestens eins der beiden
|
if (!((crewaFirst.NotificationPAX ?? false) || crewaIsSchengen)) // mindestens eins der beiden
|
||||||
{
|
{
|
||||||
vErrors.Add(RuleEngine.CreateError(ValidationCode.V181, "Pax / Schengen: one must be set", null, Properties.Resources.textOverview, null, "CREWA")); ;
|
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V181, "Wrong selection", null, "CREWA", null, "CREWA");
|
||||||
|
mv.MessageGroupName = Properties.Resources.textOverview;
|
||||||
|
vViolations.Add(mv);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach(CREW crewa in crewaMessage.Elements)
|
||||||
|
{
|
||||||
|
if(crewaIsSchengen && !crewa.HasSchengenDetails)
|
||||||
|
{
|
||||||
|
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V182, "No Schengen details", null, "CREWA", crewa.Identifier, "CREWA");
|
||||||
|
mv.MessageGroupName = Properties.Resources.textOverview;
|
||||||
|
vViolations.Add(mv);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -908,7 +810,19 @@ namespace ENI2
|
|||||||
bool crewdIsSchengen = crewdFirst.NotificationSchengen ?? false;
|
bool crewdIsSchengen = crewdFirst.NotificationSchengen ?? false;
|
||||||
if (!((crewdFirst.NotificationPAX ?? false) || crewdIsSchengen)) // mindestens eins der beiden
|
if (!((crewdFirst.NotificationPAX ?? false) || crewdIsSchengen)) // mindestens eins der beiden
|
||||||
{
|
{
|
||||||
vErrors.Add(RuleEngine.CreateError(ValidationCode.V181, "Pax / Schengen: one must be set", null, Properties.Resources.textOverview, null, "CREWD")); ;
|
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V181, "Wrong selection", null, "CREWD", null, "CREWD");
|
||||||
|
mv.MessageGroupName = Properties.Resources.textOverview;
|
||||||
|
vViolations.Add(mv);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (CREWD crewd in crewdMessage.Elements)
|
||||||
|
{
|
||||||
|
if (crewdIsSchengen && !crewd.HasSchengenDetails)
|
||||||
|
{
|
||||||
|
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V182, "No Schengen details", null, "CREWD", crewd.Identifier, "CREWD");
|
||||||
|
mv.MessageGroupName = Properties.Resources.textOverview;
|
||||||
|
vViolations.Add(mv);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -920,7 +834,25 @@ namespace ENI2
|
|||||||
bool pasIsPAX = pasFirst.NotificationPAX ?? false;
|
bool pasIsPAX = pasFirst.NotificationPAX ?? false;
|
||||||
if (!(pasIsPAX || pasIsSchengen)) // mindestens eins der beiden
|
if (!(pasIsPAX || pasIsSchengen)) // mindestens eins der beiden
|
||||||
{
|
{
|
||||||
vErrors.Add(RuleEngine.CreateError (ValidationCode.V201, "Pax / Schengen: one must be set", null, Properties.Resources.textOverview, null, "PASA"));
|
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V201, "Wrong selection", null, "PASA", null, "PASA");
|
||||||
|
mv.MessageGroupName = Properties.Resources.textOverview;
|
||||||
|
vViolations.Add(mv);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (PAS pasa in pasaMessage.Elements)
|
||||||
|
{
|
||||||
|
if (pasIsSchengen && !pasa.HasSchengenDetails)
|
||||||
|
{
|
||||||
|
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V202, "No Schengen details", null, "PASA", pasa.Identifier, "PASA");
|
||||||
|
mv.MessageGroupName = Properties.Resources.textOverview;
|
||||||
|
vViolations.Add(mv);
|
||||||
|
}
|
||||||
|
if(pasIsPAX && !pasa.HasPAXDetails)
|
||||||
|
{
|
||||||
|
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V203, "No PAX details", null, "PASA", pasa.Identifier, "PASA");
|
||||||
|
mv.MessageGroupName = Properties.Resources.textOverview;
|
||||||
|
vViolations.Add(mv);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -933,54 +865,30 @@ namespace ENI2
|
|||||||
bool pasdIsPAX = pasdFirst.NotificationPAX ?? false;
|
bool pasdIsPAX = pasdFirst.NotificationPAX ?? false;
|
||||||
if (!(pasdIsPAX || pasdIsSchengen)) // mindestens eins der beiden
|
if (!(pasdIsPAX || pasdIsSchengen)) // mindestens eins der beiden
|
||||||
{
|
{
|
||||||
vErrors.Add(RuleEngine.CreateError(ValidationCode.V201, "Pax / Schengen: one must be set", null, Properties.Resources.textOverview, null, "PASD"));
|
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V201, "Wrong selection", null, "PASD", null, "PASD");
|
||||||
}
|
mv.MessageGroupName = Properties.Resources.textOverview;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 7.11.23 > 12 Passagiere in PASA oder PASD -> CREW* und PAS* muss NotificationPAX gesetzt haben
|
|
||||||
|
|
||||||
if ((pasaMessage != null) && (pasaMessage.Elements.Count > 12))
|
|
||||||
{
|
|
||||||
PAS firstPASA = pasaMessage.Elements[0] as PAS;
|
|
||||||
if(!(firstPASA.NotificationPAX ?? false))
|
|
||||||
{
|
|
||||||
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.NO_PAX, "No PAX set (PASA > 12)", null, Properties.Resources.textOverview, null, "PASA");
|
|
||||||
vViolations.Add(mv);
|
vViolations.Add(mv);
|
||||||
}
|
}
|
||||||
|
|
||||||
if((crewaMessage != null) && (crewaMessage.Elements.Count > 0))
|
foreach (PASD pasd in pasdMessage.Elements)
|
||||||
{
|
{
|
||||||
CREW firstCREW = crewaMessage.Elements[0] as CREW;
|
if (pasdIsSchengen && !pasd.HasSchengenDetails)
|
||||||
if(!(firstCREW.NotificationPAX ?? false))
|
|
||||||
{
|
{
|
||||||
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.NO_PAX, "No PAX set (PASA > 12)", null, Properties.Resources.textOverview, null, "CREWA");
|
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V202, "No Schengen details", null, "PASD", pasd.Identifier, "PASD");
|
||||||
|
mv.MessageGroupName = Properties.Resources.textOverview;
|
||||||
|
vViolations.Add(mv);
|
||||||
|
}
|
||||||
|
if (pasdIsPAX && !pasd.HasPAXDetails)
|
||||||
|
{
|
||||||
|
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V203, "No PAX details", null, "PASD", pasd.Identifier, "PASD");
|
||||||
|
mv.MessageGroupName = Properties.Resources.textOverview;
|
||||||
vViolations.Add(mv);
|
vViolations.Add(mv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if((pasdMessage != null) && (pasdMessage.Elements.Count > 12))
|
|
||||||
{
|
|
||||||
PASD firstPASD = pasdMessage.Elements[0] as PASD;
|
|
||||||
if(!(firstPASD.NotificationPAX ?? false))
|
|
||||||
{
|
|
||||||
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.NO_PAX, "No PAX set (PASD > 12)", null, Properties.Resources.textOverview, null, "PASD");
|
|
||||||
vViolations.Add(mv);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((crewdMessage != null) && (crewdMessage.Elements.Count > 0))
|
*/
|
||||||
{
|
|
||||||
CREWD firstCREW = crewdMessage.Elements[0] as CREWD;
|
|
||||||
if(!(firstCREW.NotificationPAX ?? false))
|
|
||||||
{
|
|
||||||
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.NO_PAX, "No PAX set (PASD > 12)", null, Properties.Resources.textOverview, null, "CREWD");
|
|
||||||
vViolations.Add(mv);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -1004,7 +912,7 @@ namespace ENI2
|
|||||||
|
|
||||||
Dictionary<string, string> identDict = new Dictionary<string, string>();
|
Dictionary<string, string> identDict = new Dictionary<string, string>();
|
||||||
|
|
||||||
foreach (WAS_RCPT was_rcpt in was_rcptMessage.Elements.Cast<WAS_RCPT>())
|
foreach (WAS_RCPT was_rcpt in was_rcptMessage.Elements)
|
||||||
{
|
{
|
||||||
if (!was_rcpt.IdentificationNumber.IsNullOrEmpty())
|
if (!was_rcpt.IdentificationNumber.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
@ -1182,36 +1090,6 @@ namespace ENI2
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region SERV existence for DEHAM / DEBRE / DEBRV
|
|
||||||
|
|
||||||
if ((!this.Core.DisplayId.IsNullOrEmpty() && this.Core.DisplayId.StartsWith("DEHAM")) || this.Core.PoC.Equals("DEHAM") ||
|
|
||||||
(!this.Core.DisplayId.IsNullOrEmpty() && this.Core.DisplayId.StartsWith("DEBRE")) || this.Core.PoC.Equals("DEBRE") ||
|
|
||||||
(!this.Core.DisplayId.IsNullOrEmpty() && this.Core.DisplayId.StartsWith("DEBRV")) || this.Core.PoC.Equals("DEBRV"))
|
|
||||||
{
|
|
||||||
if (servMessage.Elements.Count == 0)
|
|
||||||
{
|
|
||||||
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.LIST_EMPTY, "No entry for SERV found", null, "SERV service provider", null, "SERV");
|
|
||||||
mv.MessageGroupName = Properties.Resources.textPortNotification;
|
|
||||||
vViolations.Add(mv);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Tanker validation STAT/PRE72H
|
|
||||||
|
|
||||||
if ((statMessage.Elements[0] is STAT stat) && (pre72hMessage.Elements[0] is PRE72H pre72h))
|
|
||||||
{
|
|
||||||
if((pre72h.Tanker ?? false) != (stat.IsTanker ?? false))
|
|
||||||
{
|
|
||||||
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.LIST_EMPTY, "Tanker: Please check PRE72H / STAT", null, "PRE72H / STAT", null, "STAT");
|
|
||||||
mv.MessageGroupName = Properties.Resources.textPortNotification;
|
|
||||||
vViolations.Add(mv);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
foreach (MessageError me in vErrors)
|
foreach (MessageError me in vErrors)
|
||||||
@ -1300,7 +1178,7 @@ namespace ENI2
|
|||||||
|
|
||||||
private void _errorListDialog_RefreshClicked()
|
private void _errorListDialog_RefreshClicked()
|
||||||
{
|
{
|
||||||
DetailControl_RequestValidate(true);
|
DetailControl_RequestValidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _errorListDialog_ErrorSelected(DatabaseEntity obj)
|
private void _errorListDialog_ErrorSelected(DatabaseEntity obj)
|
||||||
@ -1365,9 +1243,9 @@ namespace ENI2
|
|||||||
case Message.NotificationClass.BKRA:
|
case Message.NotificationClass.BKRA:
|
||||||
return Properties.Resources.textArrivalNotification;
|
return Properties.Resources.textArrivalNotification;
|
||||||
case Message.NotificationClass.BPOL:
|
case Message.NotificationClass.BPOL:
|
||||||
case Message.NotificationClass.CREWA:
|
case Message.NotificationClass.CREW:
|
||||||
case Message.NotificationClass.CREWD:
|
case Message.NotificationClass.CREWD:
|
||||||
case Message.NotificationClass.PASA:
|
case Message.NotificationClass.PAS:
|
||||||
case Message.NotificationClass.PASD:
|
case Message.NotificationClass.PASD:
|
||||||
return Properties.Resources.textBorderPolice;
|
return Properties.Resources.textBorderPolice;
|
||||||
case Message.NotificationClass.HAZA:
|
case Message.NotificationClass.HAZA:
|
||||||
|
|||||||
@ -71,24 +71,8 @@
|
|||||||
AutoGenerateColumns="False" Margin="0,5,0,0">
|
AutoGenerateColumns="False" Margin="0,5,0,0">
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTextColumn Header="" Binding="{Binding Identifier}" IsReadOnly="True" />
|
<DataGridTextColumn Header="" Binding="{Binding Identifier}" IsReadOnly="True" />
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textBunkerType}" Width="0.2*">
|
<DataGridTextColumn Header="{x:Static p:Resources.textBunkerType}" Binding="{Binding BunkerFuelType}" IsReadOnly="True" Width="0.2*" />
|
||||||
<DataGridTextColumn.Binding>
|
<DataGridTextColumn Header="{x:Static p:Resources.textBunkerQuantity}" Binding="{Binding BunkerFuelQuantity_TNE, Mode=TwoWay}" IsReadOnly="True" Width="0.8*" />
|
||||||
<Binding Path="BunkerFuelType" Mode="TwoWay">
|
|
||||||
<Binding.ValidationRules>
|
|
||||||
<util:StringValidationRule MaxLength="25" />
|
|
||||||
</Binding.ValidationRules>
|
|
||||||
</Binding>
|
|
||||||
</DataGridTextColumn.Binding>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textBunkerQuantity}" IsReadOnly="False" Width="0.8*">
|
|
||||||
<DataGridTextColumn.Binding>
|
|
||||||
<Binding Path="BunkerFuelQuantity_TNE" Mode="TwoWay">
|
|
||||||
<Binding.ValidationRules>
|
|
||||||
<util:NumberValidationRule MaxValue="10000"/>
|
|
||||||
</Binding.ValidationRules>
|
|
||||||
</Binding>
|
|
||||||
</DataGridTextColumn.Binding>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</enictrl:ENIDataGrid>
|
</enictrl:ENIDataGrid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|||||||
@ -39,7 +39,6 @@ namespace ENI2.DetailViewControls
|
|||||||
this.RegisterIntegerUpDownChange(this.integerUpDownPassengersOnBoard, Message.NotificationClass.POBA);
|
this.RegisterIntegerUpDownChange(this.integerUpDownPassengersOnBoard, Message.NotificationClass.POBA);
|
||||||
this.RegisterIntegerUpDownChange(this.integerUpDownPersonsOnBoard, Message.NotificationClass.POBA);
|
this.RegisterIntegerUpDownChange(this.integerUpDownPersonsOnBoard, Message.NotificationClass.POBA);
|
||||||
this.RegisterIntegerUpDownChange(this.integerUpDownStowawaysOnBoard, Message.NotificationClass.POBA);
|
this.RegisterIntegerUpDownChange(this.integerUpDownStowawaysOnBoard, Message.NotificationClass.POBA);
|
||||||
this.dataGridBKRA.CellEditEnding += (obj, ev) => { this.SublistElementChanged(Message.NotificationClass.BKRA); };
|
|
||||||
startupComplete = true;
|
startupComplete = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -184,8 +183,6 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
private void DataGridBKRA_CreateRequested()
|
private void DataGridBKRA_CreateRequested()
|
||||||
{
|
{
|
||||||
this.dataGridBKRA.CancelEdit();
|
|
||||||
this.dataGridBKRA.CancelEdit();
|
|
||||||
EditBKRDialog ebd = new EditBKRDialog();
|
EditBKRDialog ebd = new EditBKRDialog();
|
||||||
ebd.BRKA = new BRKA();
|
ebd.BRKA = new BRKA();
|
||||||
ebd.BRKA.Identifier = BRKA.GetNewIdentifier(this._bkraMessage.Elements);
|
ebd.BRKA.Identifier = BRKA.GetNewIdentifier(this._bkraMessage.Elements);
|
||||||
@ -218,8 +215,6 @@ namespace ENI2.DetailViewControls
|
|||||||
{
|
{
|
||||||
if (obj is BRKA brka)
|
if (obj is BRKA brka)
|
||||||
{
|
{
|
||||||
this.dataGridBKRA.CancelEdit();
|
|
||||||
this.dataGridBKRA.CancelEdit();
|
|
||||||
// are you sure dialog is in base class
|
// are you sure dialog is in base class
|
||||||
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Delete(brka);
|
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Delete(brka);
|
||||||
this._bkraMessage.Elements.Remove(brka);
|
this._bkraMessage.Elements.Remove(brka);
|
||||||
@ -231,10 +226,6 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
private void DataGridBKRA_EditRequested(DatabaseEntity obj)
|
private void DataGridBKRA_EditRequested(DatabaseEntity obj)
|
||||||
{
|
{
|
||||||
// I am not shitting you: this has to be called TWICE(!) in a row in order to work
|
|
||||||
// see: https://stackoverflow.com/questions/20204592/wpf-datagrid-refresh-is-not-allowed-during-an-addnew-or-edititem-transaction-m
|
|
||||||
this.dataGridBKRA.CancelEdit(DataGridEditingUnit.Row);
|
|
||||||
this.dataGridBKRA.CommitEdit(DataGridEditingUnit.Row, true);
|
|
||||||
|
|
||||||
EditBKRDialog eld = new EditBKRDialog();
|
EditBKRDialog eld = new EditBKRDialog();
|
||||||
eld.IsDeparture = false;
|
eld.IsDeparture = false;
|
||||||
@ -245,8 +236,7 @@ namespace ENI2.DetailViewControls
|
|||||||
eld.CopyValuesToEntity();
|
eld.CopyValuesToEntity();
|
||||||
if(!_bkraMessage.Elements.Contains(eld.BRKA))
|
if(!_bkraMessage.Elements.Contains(eld.BRKA))
|
||||||
_bkraMessage.Elements.Add(eld.BRKA);
|
_bkraMessage.Elements.Add(eld.BRKA);
|
||||||
this.dataGridBKRA.ItemsSource = null;
|
this.dataGridBKRA.Items.Refresh();
|
||||||
this.dataGridBKRA.ItemsSource = this._bkraMessage.Elements;
|
|
||||||
eld.BRKA = new BRKA();
|
eld.BRKA = new BRKA();
|
||||||
eld.BRKA.Identifier = BRKA.GetNewIdentifier(this._bkraMessage.Elements);
|
eld.BRKA.Identifier = BRKA.GetNewIdentifier(this._bkraMessage.Elements);
|
||||||
eld.BRKA.MessageHeader = _bkraMessage;
|
eld.BRKA.MessageHeader = _bkraMessage;
|
||||||
@ -257,8 +247,7 @@ namespace ENI2.DetailViewControls
|
|||||||
{
|
{
|
||||||
if (!_bkraMessage.Elements.Contains(eld.BRKA))
|
if (!_bkraMessage.Elements.Contains(eld.BRKA))
|
||||||
_bkraMessage.Elements.Add(eld.BRKA);
|
_bkraMessage.Elements.Add(eld.BRKA);
|
||||||
this.dataGridBKRA.ItemsSource = null;
|
this.dataGridBKRA.Items.Refresh();
|
||||||
this.dataGridBKRA.ItemsSource = this._bkraMessage.Elements;
|
|
||||||
this.SublistElementChanged(Message.NotificationClass.BKRA);
|
this.SublistElementChanged(Message.NotificationClass.BKRA);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -290,6 +279,17 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region mouse wheel
|
||||||
|
|
||||||
|
private void ScrollViewer_PreviewMouseWheel(object sender, System.Windows.Input.MouseWheelEventArgs e)
|
||||||
|
{
|
||||||
|
ScrollViewer scv = (ScrollViewer)sender;
|
||||||
|
scv.ScrollToVerticalOffset(scv.VerticalOffset - e.Delta);
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region special datetimepicker validation popup (OMG)
|
#region special datetimepicker validation popup (OMG)
|
||||||
|
|
||||||
private void dateTimePickerATA_ValueChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
|
private void dateTimePickerATA_ValueChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
|
||||||
|
|||||||
@ -49,7 +49,7 @@
|
|||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="{x:Static p:Resources.textCrewArrival}" Name="tabCrewArrival">
|
<TabItem Header="{x:Static p:Resources.textCrew}" Name="tabCrewArrival">
|
||||||
<GroupBox Name="groupBoxCrewList" Header="{x:Static p:Resources.textTabCrewList}">
|
<GroupBox Name="groupBoxCrewList" Header="{x:Static p:Resources.textTabCrewList}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
@ -60,14 +60,13 @@
|
|||||||
<Button Name="buttonImportExcelCrew" Content="{x:Static p:Resources.textImportFromExcel}" Margin="2" Width="120" HorizontalAlignment="Left" VerticalAlignment="Center" Background="Transparent" Click="buttonImportExcelCrew_Click" />
|
<Button Name="buttonImportExcelCrew" Content="{x:Static p:Resources.textImportFromExcel}" Margin="2" Width="120" HorizontalAlignment="Left" VerticalAlignment="Center" Background="Transparent" Click="buttonImportExcelCrew_Click" />
|
||||||
<TextBlock Margin="20, 0, 0, 0" Name="textBlockNumCrewEntries" FontWeight="Bold" Text="{Binding Elements.Count}" VerticalAlignment="Center"/>
|
<TextBlock Margin="20, 0, 0, 0" Name="textBlockNumCrewEntries" FontWeight="Bold" Text="{Binding Elements.Count}" VerticalAlignment="Center"/>
|
||||||
<Label Name="labelCrewEntryCount" Content="{x:Static p:Resources.textEntries}" />
|
<Label Name="labelCrewEntryCount" Content="{x:Static p:Resources.textEntries}" />
|
||||||
|
<!--
|
||||||
<CheckBox Name="checkBoxCrewNotificationSchengen" IsThreeState="False" VerticalAlignment="Center" Margin="10,0,0,0" Click="checkBoxCrewNotificationSchengen_Click"/>
|
<CheckBox Name="checkBoxCrewNotificationSchengen" IsThreeState="False" VerticalAlignment="Center" Margin="10,0,0,0" Click="checkBoxCrewNotificationSchengen_Click"/>
|
||||||
<Label Name="labelCrewNotificationSchengen" Content="{x:Static p:Resources.textNotificationSchengen}" />
|
<Label Name="labelCrewNotificationSchengen" Content="{x:Static p:Resources.textNotificationSchengen}" />
|
||||||
<CheckBox Name="checkBoxCrewNotificationPAX" IsThreeState="False" VerticalAlignment="Center" Margin="10,0,0,0" Click="checkBoxCrewNotificationPAX_Click"/>
|
<CheckBox Name="checkBoxCrewNotificationPAX" IsThreeState="False" VerticalAlignment="Center" Margin="10,0,0,0" Click="checkBoxCrewNotificationPAX_Click"/>
|
||||||
<Label Name="labelCrewNotificationPAX" Content="{x:Static p:Resources.textNotificationPAX}" />
|
<Label Name="labelCrewNotificationPAX" Content="{x:Static p:Resources.textNotificationPAX}" />
|
||||||
<Button Name="buttonDeleteAllCrewA" Margin="2" Content="{x:Static p:Resources.textDeleteAllEntries}" Background="Transparent" Click="buttonDeleteAllCrewA_Click"/>
|
|
||||||
<TextBlock Margin="30,0,0,0" FontWeight="Bold" FontSize="16" Text="CREWA" VerticalAlignment="Center" />
|
<TextBlock Margin="30,0,0,0" FontWeight="Bold" FontSize="16" Text="CREWA" VerticalAlignment="Center" />
|
||||||
|
-->
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<enictrl:ENIDataGrid Grid.Row="1" Grid.Column="0" x:Name="dataGridCrewList" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
<enictrl:ENIDataGrid Grid.Row="1" Grid.Column="0" x:Name="dataGridCrewList" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||||
AutoGenerateColumns="False" Margin="0,5,0,0">
|
AutoGenerateColumns="False" Margin="0,5,0,0">
|
||||||
@ -79,7 +78,7 @@
|
|||||||
<DataGridTextColumn Header="{x:Static p:Resources.textCrewFunctionOnBoard}" Binding="{Binding CrewMemberDuty, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
<DataGridTextColumn Header="{x:Static p:Resources.textCrewFunctionOnBoard}" Binding="{Binding CrewMemberDuty, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textNationality}" Binding="{Binding CrewMemberNationality, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
<DataGridTextColumn Header="{x:Static p:Resources.textNationality}" Binding="{Binding CrewMemberNationality, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textPlaceOfBirth}" Binding="{Binding CrewMemberPlaceOfBirth, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
<DataGridTextColumn Header="{x:Static p:Resources.textPlaceOfBirth}" Binding="{Binding CrewMemberPlaceOfBirth, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textCountryOfBirth}" Binding="{Binding CrewMemberCountryOfBirth, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
<!--<DataGridTextColumn Header="{x:Static p:Resources.textCountryOfBirth}" Binding="{Binding CrewMemberCountryOfBirth, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />--> <!-- XXX: TODO -->
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textDateOfBirth}" Binding="{Binding CrewMemberDateOfBirth, Mode=TwoWay, StringFormat=\{0:dd.MM.yyyy\}}" IsReadOnly="True" Width="0.1*" />
|
<DataGridTextColumn Header="{x:Static p:Resources.textDateOfBirth}" Binding="{Binding CrewMemberDateOfBirth, Mode=TwoWay, StringFormat=\{0:dd.MM.yyyy\}}" IsReadOnly="True" Width="0.1*" />
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textIdDocType}" Binding="{Binding CrewMemberIdentityDocumentTypeDisplay}" IsReadOnly="True" Width="0.1*" />
|
<DataGridTextColumn Header="{x:Static p:Resources.textIdDocType}" Binding="{Binding CrewMemberIdentityDocumentTypeDisplay}" IsReadOnly="True" Width="0.1*" />
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textIdDocNumber}" Binding="{Binding CrewMemberIdentityDocumentId, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
<DataGridTextColumn Header="{x:Static p:Resources.textIdDocNumber}" Binding="{Binding CrewMemberIdentityDocumentId, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
||||||
@ -92,7 +91,7 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
<!-- XXX : TODO
|
||||||
<TabItem Header="{x:Static p:Resources.textCrewDeparture}" Name="tabCrewDeparture">
|
<TabItem Header="{x:Static p:Resources.textCrewDeparture}" Name="tabCrewDeparture">
|
||||||
<GroupBox Name="groupBoxCrewListDeparture" Header="{x:Static p:Resources.textTabCrewList}">
|
<GroupBox Name="groupBoxCrewListDeparture" Header="{x:Static p:Resources.textTabCrewList}">
|
||||||
<Grid>
|
<Grid>
|
||||||
@ -108,7 +107,6 @@
|
|||||||
<Label Name="labelCrewNotificationSchengenDeparture" Content="{x:Static p:Resources.textNotificationSchengen}" />
|
<Label Name="labelCrewNotificationSchengenDeparture" Content="{x:Static p:Resources.textNotificationSchengen}" />
|
||||||
<CheckBox Name="checkBoxCrewNotificationPAXDeparture" IsThreeState="False" VerticalAlignment="Center" Margin="10,0,0,0" Click="checkBoxCrewNotificationPAXDeparture_Click"/>
|
<CheckBox Name="checkBoxCrewNotificationPAXDeparture" IsThreeState="False" VerticalAlignment="Center" Margin="10,0,0,0" Click="checkBoxCrewNotificationPAXDeparture_Click"/>
|
||||||
<Label Name="labelCrewNotificationPAXDeparture" Content="{x:Static p:Resources.textNotificationPAX}" />
|
<Label Name="labelCrewNotificationPAXDeparture" Content="{x:Static p:Resources.textNotificationPAX}" />
|
||||||
<Button Name="buttonDeleteAllCrewD" Margin="2" Content="{x:Static p:Resources.textDeleteAllEntries}" Background="Transparent" Click="buttonDeleteAllCrewD_Click"/>
|
|
||||||
<TextBlock Margin="30,0,0,0" FontWeight="Bold" FontSize="16" Text="CREWD" VerticalAlignment="Center" />
|
<TextBlock Margin="30,0,0,0" FontWeight="Bold" FontSize="16" Text="CREWD" VerticalAlignment="Center" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<enictrl:ENIDataGrid Grid.Row="1" Grid.Column="0" x:Name="dataGridCrewListDeparture" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
<enictrl:ENIDataGrid Grid.Row="1" Grid.Column="0" x:Name="dataGridCrewListDeparture" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||||
@ -133,8 +131,8 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
-->
|
||||||
<TabItem Header="{x:Static p:Resources.textPasArrival}" Name="tabPassengerList">
|
<TabItem Header="{x:Static p:Resources.textPas}" Name="tabPassengerList">
|
||||||
<GroupBox Name="groupBoxPassengerList" Header="{x:Static p:Resources.textTabPassengerList}">
|
<GroupBox Name="groupBoxPassengerList" Header="{x:Static p:Resources.textTabPassengerList}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
@ -145,12 +143,13 @@
|
|||||||
<Button Name="buttonImportExcelPassenger" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textImportFromExcel}" Margin="2" Width="120" HorizontalAlignment="Left" VerticalAlignment="Center" Background="Transparent" Click="buttonImportExcelPassenger_Click" />
|
<Button Name="buttonImportExcelPassenger" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textImportFromExcel}" Margin="2" Width="120" HorizontalAlignment="Left" VerticalAlignment="Center" Background="Transparent" Click="buttonImportExcelPassenger_Click" />
|
||||||
<TextBlock Margin="20, 0, 0, 0" Name="textBlockNumPasEntries" FontWeight="Bold" Text="{Binding Elements.Count}" VerticalAlignment="Center"/>
|
<TextBlock Margin="20, 0, 0, 0" Name="textBlockNumPasEntries" FontWeight="Bold" Text="{Binding Elements.Count}" VerticalAlignment="Center"/>
|
||||||
<Label Name="labelPasEntryCount" Content="{x:Static p:Resources.textEntries}" />
|
<Label Name="labelPasEntryCount" Content="{x:Static p:Resources.textEntries}" />
|
||||||
|
<!--
|
||||||
<CheckBox Name="checkBoxPasNotificationSchengen" IsThreeState="False" VerticalAlignment="Center" Margin="10,0,0,0" Click="checkBoxPasNotificationSchengen_Click"/>
|
<CheckBox Name="checkBoxPasNotificationSchengen" IsThreeState="False" VerticalAlignment="Center" Margin="10,0,0,0" Click="checkBoxPasNotificationSchengen_Click"/>
|
||||||
<Label Name="labelPasNotificationSchengen" Content="{x:Static p:Resources.textNotificationSchengen}" />
|
<Label Name="labelPasNotificationSchengen" Content="{x:Static p:Resources.textNotificationSchengen}" />
|
||||||
<CheckBox Name="checkBoxPasNotificationPAX" IsThreeState="False" VerticalAlignment="Center" Margin="10,0,0,0" Click="checkBoxPasNotificationPAX_Click"/>
|
<CheckBox Name="checkBoxPasNotificationPAX" IsThreeState="False" VerticalAlignment="Center" Margin="10,0,0,0" Click="checkBoxPasNotificationPAX_Click"/>
|
||||||
<Label Name="labelPasNotificationPAX" Content="{x:Static p:Resources.textNotificationPAX}" />
|
<Label Name="labelPasNotificationPAX" Content="{x:Static p:Resources.textNotificationPAX}" />
|
||||||
<Button Name="buttonDeleteAllPasA" Margin="2" Content="{x:Static p:Resources.textDeleteAllEntries}" Background="Transparent" Click="buttonDeleteAllPasA_Click"/>
|
|
||||||
<TextBlock Margin="30,0,0,0" FontWeight="Bold" FontSize="16" Text="PASA" VerticalAlignment="Center" />
|
<TextBlock Margin="30,0,0,0" FontWeight="Bold" FontSize="16" Text="PASA" VerticalAlignment="Center" />
|
||||||
|
-->
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<enictrl:ENIDataGrid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" x:Name="dataGridPassengerList" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
<enictrl:ENIDataGrid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" x:Name="dataGridPassengerList" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||||
AutoGenerateColumns="False" Margin="0,5,0,0">
|
AutoGenerateColumns="False" Margin="0,5,0,0">
|
||||||
@ -164,22 +163,22 @@
|
|||||||
<DataGridCheckBoxColumn Header="{x:Static p:Resources.textTransitPassenger}" Binding="{Binding PassengerInTransit}" IsReadOnly="True" Width="0.1*" />
|
<DataGridCheckBoxColumn Header="{x:Static p:Resources.textTransitPassenger}" Binding="{Binding PassengerInTransit}" IsReadOnly="True" Width="0.1*" />
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textNationality}" Binding="{Binding PassengerNationality}" IsReadOnly="True" Width="0.1*" />
|
<DataGridTextColumn Header="{x:Static p:Resources.textNationality}" Binding="{Binding PassengerNationality}" IsReadOnly="True" Width="0.1*" />
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textPlaceOfBirth}" Binding="{Binding PassengerPlaceOfBirth}" IsReadOnly="True" Width="0.1*" />
|
<DataGridTextColumn Header="{x:Static p:Resources.textPlaceOfBirth}" Binding="{Binding PassengerPlaceOfBirth}" IsReadOnly="True" Width="0.1*" />
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textCountryOfBirth}" Binding="{Binding PassengerCountryOfBirth, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
<!--<DataGridTextColumn Header="{x:Static p:Resources.textCountryOfBirth}" Binding="{Binding PassengerCountryOfBirth, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />-->
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textDateOfBirth}" Binding="{Binding PassengerDateOfBirth, StringFormat=\{0:dd.MM.yyyy\}}" IsReadOnly="True" Width="0.1*" />
|
<DataGridTextColumn Header="{x:Static p:Resources.textDateOfBirth}" Binding="{Binding PassengerDateOfBirth, StringFormat=\{0:dd.MM.yyyy\}}" IsReadOnly="True" Width="0.1*" />
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textIdDocType}" Binding="{Binding PassengerIdentityDocumentTypeDisplay}" IsReadOnly="True" Width="0.1*" />
|
<DataGridTextColumn Header="{x:Static p:Resources.textIdDocType}" Binding="{Binding PassengerIdentityDocumentTypeDisplay}" IsReadOnly="True" Width="0.1*" />
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textIdDocNumber}" Binding="{Binding PassengerIdentityDocumentId}" IsReadOnly="True" Width="0.1*" />
|
<DataGridTextColumn Header="{x:Static p:Resources.textIdDocNumber}" Binding="{Binding PassengerIdentityDocumentId}" IsReadOnly="True" Width="0.1*" />
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textDocumentIssuingState}" Binding="{Binding PassengerIdentityDocumentIssuingState}" IsReadOnly="True" Width="0.1*" />
|
<DataGridTextColumn Header="{x:Static p:Resources.textDocumentIssuingState}" Binding="{Binding PassengerIdentityDocumentIssuingState}" IsReadOnly="True" Width="0.1*" />
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textDocumentExpiryDate}" Binding="{Binding PassengerIdentityDocumentExpiryDate, StringFormat=\{0:dd.MM.yyyy\}}" IsReadOnly="True" Width="0.1*" />
|
<DataGridTextColumn Header="{x:Static p:Resources.textDocumentExpiryDate}" Binding="{Binding PassengerIdentityDocumentExpiryDate, StringFormat=\{0:dd.MM.yyyy\}}" IsReadOnly="True" Width="0.1*" />
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textVisaNumber}" Binding="{Binding PassengerVisaNumber}" IsReadOnly="True" Width="0.1*" />
|
<DataGridTextColumn Header="{x:Static p:Resources.textVisaNumber}" Binding="{Binding PassengerVisaNumber}" IsReadOnly="True" Width="0.1*" />
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textEmergencyCare}" Binding="{Binding EmergencyCare, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
<!--<DataGridTextColumn Header="{x:Static p:Resources.textEmergencyCare}" Binding="{Binding EmergencyCare, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />--> <!-- XXX : TODO -->
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textEmergencyContactNumber}" Binding="{Binding EmergencyContactNumber, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
<!-- <DataGridTextColumn Header="{x:Static p:Resources.textEmergencyContactNumber}" Binding="{Binding EmergencyContactNumber, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" /> -->
|
||||||
|
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</enictrl:ENIDataGrid>
|
</enictrl:ENIDataGrid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
<!-- XXX : TODO
|
||||||
<TabItem Header="{x:Static p:Resources.textPasDeparture}" Name="tabPassengerListDeparture">
|
<TabItem Header="{x:Static p:Resources.textPasDeparture}" Name="tabPassengerListDeparture">
|
||||||
<GroupBox Name="groupBoxPassengerListDeparture" Header="{x:Static p:Resources.textTabPassengerList}">
|
<GroupBox Name="groupBoxPassengerListDeparture" Header="{x:Static p:Resources.textTabPassengerList}">
|
||||||
<Grid>
|
<Grid>
|
||||||
@ -195,7 +194,6 @@
|
|||||||
<Label Name="labelPasNotificationSchengenDeparture" Content="{x:Static p:Resources.textNotificationSchengen}" />
|
<Label Name="labelPasNotificationSchengenDeparture" Content="{x:Static p:Resources.textNotificationSchengen}" />
|
||||||
<CheckBox Name="checkBoxPasNotificationPAXDeparture" IsThreeState="False" VerticalAlignment="Center" Margin="10,0,0,0" Click="checkBoxPasNotificationPAXDeparture_Click"/>
|
<CheckBox Name="checkBoxPasNotificationPAXDeparture" IsThreeState="False" VerticalAlignment="Center" Margin="10,0,0,0" Click="checkBoxPasNotificationPAXDeparture_Click"/>
|
||||||
<Label Name="labelPasNotificationPAXDeparture" Content="{x:Static p:Resources.textNotificationPAX}" />
|
<Label Name="labelPasNotificationPAXDeparture" Content="{x:Static p:Resources.textNotificationPAX}" />
|
||||||
<Button Name="buttonDeleteAllPasD" Margin="2" Content="{x:Static p:Resources.textDeleteAllEntries}" Background="Transparent" Click="buttonDeleteAllPasD_Click"/>
|
|
||||||
<TextBlock Margin="30,0,0,0" FontWeight="Bold" FontSize="16" Text="PASD" VerticalAlignment="Center" />
|
<TextBlock Margin="30,0,0,0" FontWeight="Bold" FontSize="16" Text="PASD" VerticalAlignment="Center" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<enictrl:ENIDataGrid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" x:Name="dataGridPassengerListDeparture" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
<enictrl:ENIDataGrid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" x:Name="dataGridPassengerListDeparture" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||||
@ -224,7 +222,7 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
-->
|
||||||
</TabControl>
|
</TabControl>
|
||||||
|
|
||||||
</src:DetailBaseControl>
|
</src:DetailBaseControl>
|
||||||
|
|||||||
@ -13,8 +13,6 @@ using ENI2.Util;
|
|||||||
using ENI2.Locode;
|
using ENI2.Locode;
|
||||||
using ExcelDataReader;
|
using ExcelDataReader;
|
||||||
using bsmd.database;
|
using bsmd.database;
|
||||||
using System.Windows.Media.Imaging;
|
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
namespace ENI2.DetailViewControls
|
namespace ENI2.DetailViewControls
|
||||||
{
|
{
|
||||||
@ -52,8 +50,8 @@ namespace ENI2.DetailViewControls
|
|||||||
foreach (Message aMessage in this.Messages)
|
foreach (Message aMessage in this.Messages)
|
||||||
{
|
{
|
||||||
if (aMessage.MessageNotificationClass == Message.NotificationClass.BPOL) { this._bpolMessage = aMessage; this.ControlMessages.Add(aMessage); }
|
if (aMessage.MessageNotificationClass == Message.NotificationClass.BPOL) { this._bpolMessage = aMessage; this.ControlMessages.Add(aMessage); }
|
||||||
if (aMessage.MessageNotificationClass == Message.NotificationClass.CREWA) { this._crewMessage = aMessage; this.ControlMessages.Add(aMessage); }
|
if (aMessage.MessageNotificationClass == Message.NotificationClass.CREW) { this._crewMessage = aMessage; this.ControlMessages.Add(aMessage); }
|
||||||
if (aMessage.MessageNotificationClass == Message.NotificationClass.PASA) { this._pasMessage = aMessage; this.ControlMessages.Add(aMessage); }
|
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.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.PASD) { this._pasdMessage = aMessage; this.ControlMessages.Add(aMessage); }
|
||||||
|
|
||||||
@ -101,7 +99,7 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
if (this._crewMessage == null)
|
if (this._crewMessage == null)
|
||||||
{
|
{
|
||||||
this._crewMessage = this.Core.CreateMessage(Message.NotificationClass.CREWA);
|
this._crewMessage = this.Core.CreateMessage(Message.NotificationClass.CREW);
|
||||||
this.Messages.Add(this._crewMessage);
|
this.Messages.Add(this._crewMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,28 +112,20 @@ namespace ENI2.DetailViewControls
|
|||||||
this.dataGridCrewList.DeleteRequested += DataGridCrewList_DeleteRequested;
|
this.dataGridCrewList.DeleteRequested += DataGridCrewList_DeleteRequested;
|
||||||
this.dataGridCrewList.CreateRequested += DataGridCrewList_CreateRequested;
|
this.dataGridCrewList.CreateRequested += DataGridCrewList_CreateRequested;
|
||||||
this.dataGridCrewList.RefreshGrid += DataGridCrewList_RefreshGrid;
|
this.dataGridCrewList.RefreshGrid += DataGridCrewList_RefreshGrid;
|
||||||
this.dataGridCrewList.MultiEditRequested += DataGridCrewList_MultiEditRequested;
|
/* XXX : TODO
|
||||||
|
|
||||||
if(this._crewMessage.Elements.Count > 0)
|
if(this._crewMessage.Elements.Count > 0)
|
||||||
{
|
{
|
||||||
this.checkBoxCrewNotificationSchengen.IsChecked = ((CREW)this._crewMessage.Elements[0]).NotificationSchengen;
|
this.checkBoxCrewNotificationSchengen.IsChecked = ((CREW)this._crewMessage.Elements[0]).NotificationSchengen;
|
||||||
this.checkBoxCrewNotificationPAX.IsChecked = ((CREW)this._crewMessage.Elements[0]).NotificationPAX;
|
this.checkBoxCrewNotificationPAX.IsChecked = ((CREW)this._crewMessage.Elements[0]).NotificationPAX;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
// extra menu copy to CREWD
|
|
||||||
{
|
|
||||||
this.dataGridCrewList.ContextMenu.Items.Add(new Separator());
|
|
||||||
MenuItem copyCREWAItem = new MenuItem();
|
|
||||||
copyCREWAItem.Header = Properties.Resources.textCopyToCREWD;
|
|
||||||
copyCREWAItem.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/documents.png")) };
|
|
||||||
copyCREWAItem.Click += CopyCREWAItem_Click;
|
|
||||||
this.dataGridCrewList.ContextMenu.Items.Add(copyCREWAItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region init CREWD
|
#region init CREWD
|
||||||
|
|
||||||
|
/* XXX : TODO
|
||||||
|
|
||||||
if (this._crewdMessage == null)
|
if (this._crewdMessage == null)
|
||||||
{
|
{
|
||||||
this._crewdMessage = this.Core.CreateMessage(Message.NotificationClass.CREWD);
|
this._crewdMessage = this.Core.CreateMessage(Message.NotificationClass.CREWD);
|
||||||
@ -151,7 +141,6 @@ namespace ENI2.DetailViewControls
|
|||||||
this.dataGridCrewListDeparture.DeleteRequested += DataGridCrewListDeparture_DeleteRequested;
|
this.dataGridCrewListDeparture.DeleteRequested += DataGridCrewListDeparture_DeleteRequested;
|
||||||
this.dataGridCrewListDeparture.CreateRequested += DataGridCrewListDeparture_CreateRequested;
|
this.dataGridCrewListDeparture.CreateRequested += DataGridCrewListDeparture_CreateRequested;
|
||||||
this.dataGridCrewListDeparture.RefreshGrid += DataGridCrewListDeparture_RefreshGrid;
|
this.dataGridCrewListDeparture.RefreshGrid += DataGridCrewListDeparture_RefreshGrid;
|
||||||
this.dataGridCrewListDeparture.MultiEditRequested += DataGridCrewListDeparture_MultiEditRequested;
|
|
||||||
|
|
||||||
if (this._crewdMessage.Elements.Count > 0)
|
if (this._crewdMessage.Elements.Count > 0)
|
||||||
{
|
{
|
||||||
@ -159,15 +148,7 @@ namespace ENI2.DetailViewControls
|
|||||||
this.checkBoxCrewNotificationPAXDeparture.IsChecked = ((CREWD)this._crewdMessage.Elements[0]).NotificationPAX;
|
this.checkBoxCrewNotificationPAXDeparture.IsChecked = ((CREWD)this._crewdMessage.Elements[0]).NotificationPAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
// extra menu copy to CREWA
|
*/
|
||||||
{
|
|
||||||
this.dataGridCrewListDeparture.ContextMenu.Items.Add(new Separator());
|
|
||||||
MenuItem copyCREWDItem = new MenuItem();
|
|
||||||
copyCREWDItem.Header = Properties.Resources.textCopyToCREWA;
|
|
||||||
copyCREWDItem.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/documents.png")) };
|
|
||||||
copyCREWDItem.Click += CopyCREWDItem_Click;
|
|
||||||
this.dataGridCrewListDeparture.ContextMenu.Items.Add(copyCREWDItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -175,7 +156,7 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
if (this._pasMessage == null)
|
if (this._pasMessage == null)
|
||||||
{
|
{
|
||||||
this._pasMessage = this.Core.CreateMessage(Message.NotificationClass.PASA);
|
this._pasMessage = this.Core.CreateMessage(Message.NotificationClass.PAS);
|
||||||
this.Messages.Add(this._pasMessage);
|
this.Messages.Add(this._pasMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,7 +169,8 @@ namespace ENI2.DetailViewControls
|
|||||||
this.dataGridPassengerList.DeleteRequested += DataGridPassengerList_DeleteRequested;
|
this.dataGridPassengerList.DeleteRequested += DataGridPassengerList_DeleteRequested;
|
||||||
this.dataGridPassengerList.CreateRequested += DataGridPassengerList_CreateRequested;
|
this.dataGridPassengerList.CreateRequested += DataGridPassengerList_CreateRequested;
|
||||||
this.dataGridPassengerList.RefreshGrid += DataGridPassengerList_RefreshGrid;
|
this.dataGridPassengerList.RefreshGrid += DataGridPassengerList_RefreshGrid;
|
||||||
this.dataGridPassengerList.MultiEditRequested += DataGridPassengerList_MultiEditRequested;
|
|
||||||
|
/* XXX : TODO
|
||||||
|
|
||||||
if (this._pasMessage.Elements.Count > 0)
|
if (this._pasMessage.Elements.Count > 0)
|
||||||
{
|
{
|
||||||
@ -196,20 +178,14 @@ namespace ENI2.DetailViewControls
|
|||||||
this.checkBoxPasNotificationPAX.IsChecked = ((PAS)this._pasMessage.Elements[0]).NotificationPAX;
|
this.checkBoxPasNotificationPAX.IsChecked = ((PAS)this._pasMessage.Elements[0]).NotificationPAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
// extra menu copy to PASD
|
*/
|
||||||
{
|
|
||||||
this.dataGridPassengerList.ContextMenu.Items.Add(new Separator());
|
|
||||||
MenuItem copyPASAItem = new MenuItem();
|
|
||||||
copyPASAItem.Header = Properties.Resources.textCopyToPASD;
|
|
||||||
copyPASAItem.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/documents.png")) };
|
|
||||||
copyPASAItem.Click += CopyPASAItem_Click;
|
|
||||||
this.dataGridPassengerList.ContextMenu.Items.Add(copyPASAItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region init PASD
|
#region init PASD
|
||||||
|
|
||||||
|
/* XXX : TODO
|
||||||
|
|
||||||
if (this._pasdMessage == null)
|
if (this._pasdMessage == null)
|
||||||
{
|
{
|
||||||
this._pasdMessage = this.Core.CreateMessage(Message.NotificationClass.PASD);
|
this._pasdMessage = this.Core.CreateMessage(Message.NotificationClass.PASD);
|
||||||
@ -225,7 +201,6 @@ namespace ENI2.DetailViewControls
|
|||||||
this.dataGridPassengerListDeparture.DeleteRequested += DataGridPassengerListDeparture_DeleteRequested;
|
this.dataGridPassengerListDeparture.DeleteRequested += DataGridPassengerListDeparture_DeleteRequested;
|
||||||
this.dataGridPassengerListDeparture.CreateRequested += DataGridPassengerListDeparture_CreateRequested;
|
this.dataGridPassengerListDeparture.CreateRequested += DataGridPassengerListDeparture_CreateRequested;
|
||||||
this.dataGridPassengerListDeparture.RefreshGrid += DataGridPassengerListDeparture_RefreshGrid;
|
this.dataGridPassengerListDeparture.RefreshGrid += DataGridPassengerListDeparture_RefreshGrid;
|
||||||
this.dataGridPassengerListDeparture.MultiEditRequested += DataGridPassengerListDeparture_MultiEditRequested;
|
|
||||||
|
|
||||||
if (this._pasdMessage.Elements.Count > 0)
|
if (this._pasdMessage.Elements.Count > 0)
|
||||||
{
|
{
|
||||||
@ -233,177 +208,11 @@ namespace ENI2.DetailViewControls
|
|||||||
this.checkBoxPasNotificationPAXDeparture.IsChecked = ((PASD)this._pasdMessage.Elements[0]).NotificationPAX;
|
this.checkBoxPasNotificationPAXDeparture.IsChecked = ((PASD)this._pasdMessage.Elements[0]).NotificationPAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
// extra menu copy to PASA
|
*/
|
||||||
{
|
|
||||||
this.dataGridPassengerListDeparture.ContextMenu.Items.Add(new Separator());
|
|
||||||
MenuItem copyPASDItem = new MenuItem();
|
|
||||||
copyPASDItem.Header = Properties.Resources.textCopyToPASA;
|
|
||||||
copyPASDItem.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/documents.png")) };
|
|
||||||
copyPASDItem.Click += CopyPASDItem_Click;
|
|
||||||
this.dataGridPassengerListDeparture.ContextMenu.Items.Add(copyPASDItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int SelectedTabIndex
|
|
||||||
{
|
|
||||||
get { return this.mainFrame.SelectedIndex; }
|
|
||||||
set { this.mainFrame.SelectedIndex = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Grid copy handlers
|
|
||||||
|
|
||||||
private void CopyPASDItem_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (this.dataGridPassengerListDeparture.SelectedItems != null)
|
|
||||||
{
|
|
||||||
foreach (PASD pasd in this.dataGridPassengerListDeparture.SelectedItems)
|
|
||||||
{
|
|
||||||
PAS pasa = new PAS();
|
|
||||||
pasa.MessageHeader = this._pasMessage;
|
|
||||||
pasa.CopyFromPAS(pasd);
|
|
||||||
pasa.IsDeparture = false;
|
|
||||||
pasa.Identifier = DatabaseEntity.GetNewIdentifier(this._pasMessage.Elements);
|
|
||||||
this._pasMessage.Elements.Add(pasa);
|
|
||||||
this.SublistElementChanged(Message.NotificationClass.PASA);
|
|
||||||
}
|
|
||||||
this.CheckPASA();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CopyPASAItem_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (this.dataGridPassengerList.SelectedItems != null)
|
|
||||||
{
|
|
||||||
foreach (PAS pasa in this.dataGridPassengerList.SelectedItems)
|
|
||||||
{
|
|
||||||
PASD pasd = new PASD();
|
|
||||||
pasd.MessageHeader = this._pasdMessage;
|
|
||||||
pasd.CopyFromPAS(pasa);
|
|
||||||
pasd.IsDeparture = true;
|
|
||||||
pasd.Identifier = DatabaseEntity.GetNewIdentifier(this._pasdMessage.Elements);
|
|
||||||
this._pasdMessage.Elements.Add(pasd);
|
|
||||||
this.SublistElementChanged(Message.NotificationClass.PASD);
|
|
||||||
}
|
|
||||||
this.CheckPASD();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CopyCREWDItem_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (this.dataGridCrewListDeparture.SelectedItems != null)
|
|
||||||
{
|
|
||||||
foreach (CREWD crewd in this.dataGridCrewListDeparture.SelectedItems)
|
|
||||||
{
|
|
||||||
CREW crewa = new CREW();
|
|
||||||
crewa.MessageHeader = this._crewMessage;
|
|
||||||
crewa.CopyFromCREW(crewd);
|
|
||||||
crewa.IsDeparture = false;
|
|
||||||
crewa.Identifier = DatabaseEntity.GetNewIdentifier(this._crewMessage.Elements);
|
|
||||||
this._crewMessage.Elements.Add(crewa);
|
|
||||||
this.SublistElementChanged(Message.NotificationClass.CREWA);
|
|
||||||
}
|
|
||||||
this.CheckCREWA();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CopyCREWAItem_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if(this.dataGridCrewList.SelectedItems != null)
|
|
||||||
{
|
|
||||||
foreach(CREW crewa in this.dataGridCrewList.SelectedItems)
|
|
||||||
{
|
|
||||||
CREWD crewd = new CREWD();
|
|
||||||
crewd.MessageHeader = this._crewdMessage;
|
|
||||||
crewd.CopyFromCREW(crewa);
|
|
||||||
crewd.IsDeparture = true;
|
|
||||||
crewd.Identifier = DatabaseEntity.GetNewIdentifier(this._crewdMessage.Elements);
|
|
||||||
this._crewdMessage.Elements.Add(crewd);
|
|
||||||
this.SublistElementChanged(Message.NotificationClass.CREWD);
|
|
||||||
}
|
|
||||||
this.CheckCREWD();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Check Schengen / PAX flags and sync
|
|
||||||
|
|
||||||
private void CheckCREWA()
|
|
||||||
{
|
|
||||||
if (this._crewMessage.Elements.Count == 0) return;
|
|
||||||
CREW firstCREW = this._crewMessage.Elements[0] as CREW;
|
|
||||||
if (this._crewMessage.Elements.Count == 1)
|
|
||||||
{
|
|
||||||
firstCREW.NotificationSchengen = true;
|
|
||||||
this.checkBoxCrewNotificationSchengen.IsChecked = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (int i = 1; i < this._crewMessage.Elements.Count; i++)
|
|
||||||
{
|
|
||||||
((CREW)this._crewMessage.Elements[i]).NotificationSchengen = firstCREW.NotificationSchengen;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CheckCREWD()
|
|
||||||
{
|
|
||||||
if (this._crewdMessage.Elements.Count == 0) return;
|
|
||||||
CREWD firstCREW = this._crewdMessage.Elements[0] as CREWD;
|
|
||||||
if (this._crewdMessage.Elements.Count == 1)
|
|
||||||
{
|
|
||||||
firstCREW.NotificationSchengen = true;
|
|
||||||
this.checkBoxCrewNotificationSchengenDeparture.IsChecked = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (int i = 1; i < this._crewdMessage.Elements.Count; i++)
|
|
||||||
{
|
|
||||||
((CREWD)this._crewdMessage.Elements[i]).NotificationSchengen = firstCREW.NotificationSchengen;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CheckPASA()
|
|
||||||
{
|
|
||||||
if(this._pasMessage.Elements.Count == 0) return;
|
|
||||||
PAS firstPAS = this._pasMessage.Elements[0] as PAS;
|
|
||||||
if(this._pasMessage.Elements.Count == 1)
|
|
||||||
{
|
|
||||||
firstPAS.NotificationSchengen = true;
|
|
||||||
this.checkBoxPasNotificationSchengen.IsChecked = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (int i = 1; i < this._pasMessage.Elements.Count; i++)
|
|
||||||
{
|
|
||||||
((PAS)this._pasMessage.Elements[i]).NotificationSchengen = firstPAS.NotificationSchengen;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CheckPASD()
|
|
||||||
{
|
|
||||||
if(this._pasdMessage.Elements.Count == 0) return;
|
|
||||||
PASD firstPAS = this._pasdMessage.Elements[0] as PASD;
|
|
||||||
if (this._pasdMessage.Elements.Count == 1)
|
|
||||||
{
|
|
||||||
firstPAS.NotificationSchengen = true;
|
|
||||||
this.checkBoxPasNotificationSchengenDeparture.IsChecked = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (int i = 1; i < this._pasdMessage.Elements.Count; i++)
|
|
||||||
{
|
|
||||||
((PASD)this._pasdMessage.Elements[i]).NotificationSchengen = firstPAS.NotificationSchengen;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region SetEnabled
|
#region SetEnabled
|
||||||
|
|
||||||
public override void SetEnabled(bool enabled)
|
public override void SetEnabled(bool enabled)
|
||||||
@ -556,28 +365,22 @@ namespace ENI2.DetailViewControls
|
|||||||
{
|
{
|
||||||
epd.CopyValuesToEntity();
|
epd.CopyValuesToEntity();
|
||||||
if(!this._pasMessage.Elements.Contains(epd.PAS))
|
if(!this._pasMessage.Elements.Contains(epd.PAS))
|
||||||
{
|
|
||||||
this._pasMessage.Elements.Add(epd.PAS);
|
this._pasMessage.Elements.Add(epd.PAS);
|
||||||
this.CheckPASA();
|
|
||||||
}
|
|
||||||
this.dataGridPassengerList.Items.Refresh();
|
this.dataGridPassengerList.Items.Refresh();
|
||||||
epd.PAS = new PAS
|
epd.PAS = new PAS
|
||||||
{
|
{
|
||||||
MessageHeader = this._pasMessage,
|
MessageHeader = this._pasMessage,
|
||||||
Identifier = PAS.GetNewIdentifier(_pasMessage.Elements)
|
Identifier = PAS.GetNewIdentifier(_pasMessage.Elements)
|
||||||
};
|
};
|
||||||
this.SublistElementChanged(Message.NotificationClass.PASA);
|
this.SublistElementChanged(Message.NotificationClass.PAS);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (epd.ShowDialog() ?? false)
|
if (epd.ShowDialog() ?? false)
|
||||||
{
|
{
|
||||||
if(!this._pasMessage.Elements.Contains(epd.PAS))
|
if(!this._pasMessage.Elements.Contains(epd.PAS))
|
||||||
{
|
|
||||||
_pasMessage.Elements.Add(epd.PAS);
|
_pasMessage.Elements.Add(epd.PAS);
|
||||||
this.CheckPASA();
|
|
||||||
}
|
|
||||||
this.dataGridPassengerList.Items.Refresh();
|
this.dataGridPassengerList.Items.Refresh();
|
||||||
this.SublistElementChanged(Message.NotificationClass.PASA);
|
this.SublistElementChanged(Message.NotificationClass.PAS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -594,7 +397,7 @@ namespace ENI2.DetailViewControls
|
|||||||
private void DataGridPassengerList_RefreshGrid()
|
private void DataGridPassengerList_RefreshGrid()
|
||||||
{
|
{
|
||||||
DatabaseEntity.ResetIdentifiers(_pasMessage.Elements);
|
DatabaseEntity.ResetIdentifiers(_pasMessage.Elements);
|
||||||
this.SublistElementChanged(Message.NotificationClass.PASA);
|
this.SublistElementChanged(Message.NotificationClass.PAS);
|
||||||
this.dataGridPassengerList.Items.Refresh();
|
this.dataGridPassengerList.Items.Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -609,29 +412,23 @@ namespace ENI2.DetailViewControls
|
|||||||
{
|
{
|
||||||
epd.CopyValuesToEntity();
|
epd.CopyValuesToEntity();
|
||||||
if(!_pasMessage.Elements.Contains(epd.PAS))
|
if(!_pasMessage.Elements.Contains(epd.PAS))
|
||||||
{
|
|
||||||
_pasMessage.Elements.Add(epd.PAS);
|
_pasMessage.Elements.Add(epd.PAS);
|
||||||
this.CheckPASA();
|
|
||||||
}
|
|
||||||
this.dataGridPassengerList.Items.Refresh();
|
this.dataGridPassengerList.Items.Refresh();
|
||||||
epd.PAS = new PAS
|
epd.PAS = new PAS
|
||||||
{
|
{
|
||||||
Identifier = PAS.GetNewIdentifier(_pasMessage.Elements),
|
Identifier = PAS.GetNewIdentifier(_pasMessage.Elements),
|
||||||
MessageHeader = _pasMessage
|
MessageHeader = _pasMessage
|
||||||
};
|
};
|
||||||
this.SublistElementChanged(Message.NotificationClass.PASA);
|
this.SublistElementChanged(Message.NotificationClass.PAS);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (epd.ShowDialog() ?? false)
|
if (epd.ShowDialog() ?? false)
|
||||||
{
|
{
|
||||||
if (!_pasMessage.Elements.Contains(epd.PAS))
|
if (!_pasMessage.Elements.Contains(epd.PAS))
|
||||||
{
|
|
||||||
_pasMessage.Elements.Add(epd.PAS);
|
_pasMessage.Elements.Add(epd.PAS);
|
||||||
this.CheckPASA();
|
|
||||||
}
|
|
||||||
epd.PAS.IsDirty = true;
|
epd.PAS.IsDirty = true;
|
||||||
this.dataGridPassengerList.Items.Refresh();
|
this.dataGridPassengerList.Items.Refresh();
|
||||||
this.SublistElementChanged(Message.NotificationClass.PASA);
|
this.SublistElementChanged(Message.NotificationClass.PAS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -640,30 +437,10 @@ namespace ENI2.DetailViewControls
|
|||||||
this.DataGridPassengerList_CreateRequested();
|
this.DataGridPassengerList_CreateRequested();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DataGridPassengerList_MultiEditRequested(List<DatabaseEntity> databaseEntities)
|
|
||||||
{
|
|
||||||
List<PAS> pasList = new List<PAS>();
|
|
||||||
foreach (PAS apas in databaseEntities.Cast<PAS>())
|
|
||||||
pasList.Add(apas);
|
|
||||||
|
|
||||||
// write common values of all PAS entities to template entity
|
|
||||||
PAS pas = PAS.CreateCommon(pasList);
|
|
||||||
|
|
||||||
EditPASDialog dialog = new EditPASDialog();
|
|
||||||
dialog.PAS = pas;
|
|
||||||
dialog.AddVisible = false;
|
|
||||||
if (dialog.ShowDialog() ?? false)
|
|
||||||
{
|
|
||||||
// write back changed values from pas to all entities and mark them as changed
|
|
||||||
PAS.WriteTemplateToList(pas, pasList);
|
|
||||||
|
|
||||||
this.SublistElementChanged(Message.NotificationClass.PASA);
|
|
||||||
this.dataGridPassengerList.Items.Refresh();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
/* XXX : TODO
|
||||||
|
|
||||||
#region passenger grid departure
|
#region passenger grid departure
|
||||||
|
|
||||||
private void DataGridPassengerListDeparture_CreateRequested()
|
private void DataGridPassengerListDeparture_CreateRequested()
|
||||||
@ -680,11 +457,8 @@ namespace ENI2.DetailViewControls
|
|||||||
{
|
{
|
||||||
epd.CopyValuesToEntity();
|
epd.CopyValuesToEntity();
|
||||||
if (!this._pasdMessage.Elements.Contains(epd.PAS))
|
if (!this._pasdMessage.Elements.Contains(epd.PAS))
|
||||||
{
|
|
||||||
this._pasdMessage.Elements.Add(epd.PAS);
|
this._pasdMessage.Elements.Add(epd.PAS);
|
||||||
this.CheckPASD();
|
this.dataGridPassengerList.Items.Refresh();
|
||||||
}
|
|
||||||
this.dataGridPassengerListDeparture.Items.Refresh();
|
|
||||||
epd.PAS = new PASD
|
epd.PAS = new PASD
|
||||||
{
|
{
|
||||||
IsDeparture = true,
|
IsDeparture = true,
|
||||||
@ -697,10 +471,7 @@ namespace ENI2.DetailViewControls
|
|||||||
if (epd.ShowDialog() ?? false)
|
if (epd.ShowDialog() ?? false)
|
||||||
{
|
{
|
||||||
if (!this._pasdMessage.Elements.Contains(epd.PAS))
|
if (!this._pasdMessage.Elements.Contains(epd.PAS))
|
||||||
{
|
|
||||||
_pasdMessage.Elements.Add(epd.PAS);
|
_pasdMessage.Elements.Add(epd.PAS);
|
||||||
this.CheckPASD();
|
|
||||||
}
|
|
||||||
this.dataGridPassengerListDeparture.Items.Refresh();
|
this.dataGridPassengerListDeparture.Items.Refresh();
|
||||||
this.SublistElementChanged(Message.NotificationClass.PASD);
|
this.SublistElementChanged(Message.NotificationClass.PASD);
|
||||||
}
|
}
|
||||||
@ -734,11 +505,8 @@ namespace ENI2.DetailViewControls
|
|||||||
{
|
{
|
||||||
epd.CopyValuesToEntity();
|
epd.CopyValuesToEntity();
|
||||||
if (!_pasMessage.Elements.Contains(epd.PAS))
|
if (!_pasMessage.Elements.Contains(epd.PAS))
|
||||||
{
|
|
||||||
_pasMessage.Elements.Add(epd.PAS);
|
_pasMessage.Elements.Add(epd.PAS);
|
||||||
this.CheckPASD();
|
this.dataGridPassengerList.Items.Refresh();
|
||||||
}
|
|
||||||
this.dataGridPassengerListDeparture.Items.Refresh();
|
|
||||||
epd.PAS = new PASD
|
epd.PAS = new PASD
|
||||||
{
|
{
|
||||||
IsDeparture = true,
|
IsDeparture = true,
|
||||||
@ -751,10 +519,7 @@ namespace ENI2.DetailViewControls
|
|||||||
if (epd.ShowDialog() ?? false)
|
if (epd.ShowDialog() ?? false)
|
||||||
{
|
{
|
||||||
if (!_pasdMessage.Elements.Contains(epd.PAS))
|
if (!_pasdMessage.Elements.Contains(epd.PAS))
|
||||||
{
|
|
||||||
_pasdMessage.Elements.Add(epd.PAS);
|
_pasdMessage.Elements.Add(epd.PAS);
|
||||||
this.CheckPASD();
|
|
||||||
}
|
|
||||||
epd.PAS.IsDirty = true;
|
epd.PAS.IsDirty = true;
|
||||||
this.dataGridPassengerListDeparture.Items.Refresh();
|
this.dataGridPassengerListDeparture.Items.Refresh();
|
||||||
this.SublistElementChanged(Message.NotificationClass.PASD);
|
this.SublistElementChanged(Message.NotificationClass.PASD);
|
||||||
@ -766,30 +531,10 @@ namespace ENI2.DetailViewControls
|
|||||||
this.DataGridPassengerListDeparture_CreateRequested();
|
this.DataGridPassengerListDeparture_CreateRequested();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DataGridPassengerListDeparture_MultiEditRequested(List<DatabaseEntity> databaseEntities)
|
|
||||||
{
|
|
||||||
List<PAS> pasList = new List<PAS>();
|
|
||||||
foreach (PAS apas in databaseEntities.Cast<PAS>())
|
|
||||||
pasList.Add(apas);
|
|
||||||
|
|
||||||
// write common values of all PAS entities to template entity
|
|
||||||
PAS pas = PAS.CreateCommon(pasList);
|
|
||||||
|
|
||||||
EditPASDialog dialog = new EditPASDialog();
|
|
||||||
dialog.PAS = pas;
|
|
||||||
dialog.AddVisible = false;
|
|
||||||
if (dialog.ShowDialog() ?? false)
|
|
||||||
{
|
|
||||||
// write back changed values from pas to all entities and mark them as changed
|
|
||||||
PAS.WriteTemplateToList(pas, pasList);
|
|
||||||
|
|
||||||
this.SublistElementChanged(Message.NotificationClass.PASD);
|
|
||||||
this.dataGridPassengerListDeparture.Items.Refresh();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
#region crew grid arrival
|
#region crew grid arrival
|
||||||
|
|
||||||
private void DataGridCrewList_CreateRequested()
|
private void DataGridCrewList_CreateRequested()
|
||||||
@ -805,28 +550,22 @@ namespace ENI2.DetailViewControls
|
|||||||
{
|
{
|
||||||
ecd.CopyValuesToEntity();
|
ecd.CopyValuesToEntity();
|
||||||
if(!this._crewMessage.Elements.Contains(ecd.CREW))
|
if(!this._crewMessage.Elements.Contains(ecd.CREW))
|
||||||
{
|
|
||||||
this._crewMessage.Elements.Add(ecd.CREW);
|
this._crewMessage.Elements.Add(ecd.CREW);
|
||||||
this.CheckCREWA();
|
|
||||||
}
|
|
||||||
this.dataGridCrewList.Items.Refresh();
|
this.dataGridCrewList.Items.Refresh();
|
||||||
ecd.CREW = new CREW
|
ecd.CREW = new CREW
|
||||||
{
|
{
|
||||||
MessageHeader = this._crewMessage,
|
MessageHeader = this._crewMessage,
|
||||||
Identifier = CREW.GetNewIdentifier(_crewMessage.Elements)
|
Identifier = CREW.GetNewIdentifier(_crewMessage.Elements)
|
||||||
};
|
};
|
||||||
this.SublistElementChanged(Message.NotificationClass.CREWA);
|
this.SublistElementChanged(Message.NotificationClass.CREW);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (ecd.ShowDialog() ?? false)
|
if (ecd.ShowDialog() ?? false)
|
||||||
{
|
{
|
||||||
if(!this._crewMessage.Elements.Contains(ecd.CREW))
|
if(!this._crewMessage.Elements.Contains(ecd.CREW))
|
||||||
{
|
|
||||||
_crewMessage.Elements.Add(ecd.CREW);
|
_crewMessage.Elements.Add(ecd.CREW);
|
||||||
this.CheckCREWA();
|
|
||||||
}
|
|
||||||
this.dataGridCrewList.Items.Refresh();
|
this.dataGridCrewList.Items.Refresh();
|
||||||
this.SublistElementChanged(Message.NotificationClass.CREWA);
|
this.SublistElementChanged(Message.NotificationClass.CREW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -843,7 +582,7 @@ namespace ENI2.DetailViewControls
|
|||||||
private void DataGridCrewList_RefreshGrid()
|
private void DataGridCrewList_RefreshGrid()
|
||||||
{
|
{
|
||||||
DatabaseEntity.ResetIdentifiers(_crewMessage.Elements);
|
DatabaseEntity.ResetIdentifiers(_crewMessage.Elements);
|
||||||
this.SublistElementChanged(Message.NotificationClass.CREWA);
|
this.SublistElementChanged(Message.NotificationClass.CREW);
|
||||||
this.dataGridCrewList.Items.Refresh();
|
this.dataGridCrewList.Items.Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -858,29 +597,23 @@ namespace ENI2.DetailViewControls
|
|||||||
{
|
{
|
||||||
ecd.CopyValuesToEntity();
|
ecd.CopyValuesToEntity();
|
||||||
if(!_crewMessage.Elements.Contains(ecd.CREW))
|
if(!_crewMessage.Elements.Contains(ecd.CREW))
|
||||||
{
|
|
||||||
_crewMessage.Elements.Add(ecd.CREW);
|
_crewMessage.Elements.Add(ecd.CREW);
|
||||||
this.CheckCREWA();
|
|
||||||
}
|
|
||||||
this.dataGridCrewList.Items.Refresh();
|
this.dataGridCrewList.Items.Refresh();
|
||||||
ecd.CREW = new CREW
|
ecd.CREW = new CREW
|
||||||
{
|
{
|
||||||
Identifier = CREW.GetNewIdentifier(_crewMessage.Elements),
|
Identifier = CREW.GetNewIdentifier(_crewMessage.Elements),
|
||||||
MessageHeader = _crewMessage
|
MessageHeader = _crewMessage
|
||||||
};
|
};
|
||||||
this.SublistElementChanged(Message.NotificationClass.CREWA);
|
this.SublistElementChanged(Message.NotificationClass.CREW);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (ecd.ShowDialog() ?? false)
|
if (ecd.ShowDialog() ?? false)
|
||||||
{
|
{
|
||||||
if (!_crewMessage.Elements.Contains(ecd.CREW))
|
if (!_crewMessage.Elements.Contains(ecd.CREW))
|
||||||
{
|
|
||||||
_crewMessage.Elements.Add(ecd.CREW);
|
_crewMessage.Elements.Add(ecd.CREW);
|
||||||
this.CheckCREWA();
|
|
||||||
}
|
|
||||||
ecd.CREW.IsDirty = true;
|
ecd.CREW.IsDirty = true;
|
||||||
this.dataGridCrewList.Items.Refresh();
|
this.dataGridCrewList.Items.Refresh();
|
||||||
this.SublistElementChanged(Message.NotificationClass.CREWA);
|
this.SublistElementChanged(Message.NotificationClass.CREW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -889,30 +622,10 @@ namespace ENI2.DetailViewControls
|
|||||||
this.DataGridCrewList_CreateRequested();
|
this.DataGridCrewList_CreateRequested();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DataGridCrewList_MultiEditRequested(List<DatabaseEntity> databaseEntities)
|
|
||||||
{
|
|
||||||
List<CREW> crewList = new List<CREW>();
|
|
||||||
foreach (CREW acrew in databaseEntities.Cast<CREW>())
|
|
||||||
crewList.Add(acrew);
|
|
||||||
|
|
||||||
// write common values of all CREW entities to template entity
|
|
||||||
CREW crew = CREW.CreateCommon(crewList);
|
|
||||||
|
|
||||||
EditCREWDialog dialog = new EditCREWDialog();
|
|
||||||
dialog.CREW = crew;
|
|
||||||
dialog.AddVisible = false;
|
|
||||||
if(dialog.ShowDialog() ?? false)
|
|
||||||
{
|
|
||||||
// write back changed values from crew to all entities and mark them as changed
|
|
||||||
CREW.WriteTemplateToList(crew, crewList);
|
|
||||||
|
|
||||||
this.SublistElementChanged(Message.NotificationClass.CREWA);
|
|
||||||
this.dataGridCrewList.Items.Refresh();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
/* XXX : TODO
|
||||||
|
|
||||||
#region crew grid departure
|
#region crew grid departure
|
||||||
|
|
||||||
private void DataGridCrewListDeparture_CreateRequested()
|
private void DataGridCrewListDeparture_CreateRequested()
|
||||||
@ -929,10 +642,7 @@ namespace ENI2.DetailViewControls
|
|||||||
{
|
{
|
||||||
ecd.CopyValuesToEntity();
|
ecd.CopyValuesToEntity();
|
||||||
if (!this._crewdMessage.Elements.Contains(ecd.CREW))
|
if (!this._crewdMessage.Elements.Contains(ecd.CREW))
|
||||||
{
|
|
||||||
this._crewdMessage.Elements.Add(ecd.CREW);
|
this._crewdMessage.Elements.Add(ecd.CREW);
|
||||||
this.CheckCREWD();
|
|
||||||
}
|
|
||||||
this.dataGridCrewListDeparture.Items.Refresh();
|
this.dataGridCrewListDeparture.Items.Refresh();
|
||||||
ecd.CREW = new CREWD
|
ecd.CREW = new CREWD
|
||||||
{
|
{
|
||||||
@ -946,10 +656,7 @@ namespace ENI2.DetailViewControls
|
|||||||
if (ecd.ShowDialog() ?? false)
|
if (ecd.ShowDialog() ?? false)
|
||||||
{
|
{
|
||||||
if (!this._crewdMessage.Elements.Contains(ecd.CREW))
|
if (!this._crewdMessage.Elements.Contains(ecd.CREW))
|
||||||
{
|
|
||||||
_crewdMessage.Elements.Add(ecd.CREW);
|
_crewdMessage.Elements.Add(ecd.CREW);
|
||||||
this.CheckCREWD();
|
|
||||||
}
|
|
||||||
this.dataGridCrewListDeparture.Items.Refresh();
|
this.dataGridCrewListDeparture.Items.Refresh();
|
||||||
this.SublistElementChanged(Message.NotificationClass.CREWD);
|
this.SublistElementChanged(Message.NotificationClass.CREWD);
|
||||||
}
|
}
|
||||||
@ -960,7 +667,7 @@ namespace ENI2.DetailViewControls
|
|||||||
if (obj is CREWD crewd)
|
if (obj is CREWD crewd)
|
||||||
{
|
{
|
||||||
// are you sure dialog is in base class
|
// are you sure dialog is in base class
|
||||||
_crewdMessage.Elements.Remove(crewd);
|
_crewMessage.Elements.Remove(crewd);
|
||||||
DBManager.Instance.Delete(crewd);
|
DBManager.Instance.Delete(crewd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -983,10 +690,7 @@ namespace ENI2.DetailViewControls
|
|||||||
{
|
{
|
||||||
ecd.CopyValuesToEntity();
|
ecd.CopyValuesToEntity();
|
||||||
if (!_crewdMessage.Elements.Contains(ecd.CREW))
|
if (!_crewdMessage.Elements.Contains(ecd.CREW))
|
||||||
{
|
|
||||||
_crewdMessage.Elements.Add(ecd.CREW);
|
_crewdMessage.Elements.Add(ecd.CREW);
|
||||||
this.CheckCREWD();
|
|
||||||
}
|
|
||||||
this.dataGridCrewListDeparture.Items.Refresh();
|
this.dataGridCrewListDeparture.Items.Refresh();
|
||||||
ecd.CREW = new CREWD
|
ecd.CREW = new CREWD
|
||||||
{
|
{
|
||||||
@ -1000,10 +704,7 @@ namespace ENI2.DetailViewControls
|
|||||||
if (ecd.ShowDialog() ?? false)
|
if (ecd.ShowDialog() ?? false)
|
||||||
{
|
{
|
||||||
if (!_crewdMessage.Elements.Contains(ecd.CREW))
|
if (!_crewdMessage.Elements.Contains(ecd.CREW))
|
||||||
{
|
|
||||||
_crewdMessage.Elements.Add(ecd.CREW);
|
_crewdMessage.Elements.Add(ecd.CREW);
|
||||||
this.CheckCREWD();
|
|
||||||
}
|
|
||||||
ecd.CREW.IsDirty = true;
|
ecd.CREW.IsDirty = true;
|
||||||
this.dataGridCrewListDeparture.Items.Refresh();
|
this.dataGridCrewListDeparture.Items.Refresh();
|
||||||
this.SublistElementChanged(Message.NotificationClass.CREWD);
|
this.SublistElementChanged(Message.NotificationClass.CREWD);
|
||||||
@ -1015,32 +716,23 @@ namespace ENI2.DetailViewControls
|
|||||||
this.DataGridCrewListDeparture_CreateRequested();
|
this.DataGridCrewListDeparture_CreateRequested();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DataGridCrewListDeparture_MultiEditRequested(List<DatabaseEntity> databaseEntities)
|
|
||||||
{
|
|
||||||
List<CREW> crewList = new List<CREW>();
|
|
||||||
foreach (CREW acrew in databaseEntities.Cast<CREW>())
|
|
||||||
crewList.Add(acrew);
|
|
||||||
|
|
||||||
// write common values of all CREW entities to template entity
|
|
||||||
CREW crew = CREW.CreateCommon(crewList);
|
|
||||||
|
|
||||||
EditCREWDialog dialog = new EditCREWDialog();
|
|
||||||
dialog.CREW = crew;
|
|
||||||
dialog.AddVisible = false;
|
|
||||||
if (dialog.ShowDialog() ?? false)
|
|
||||||
{
|
|
||||||
// write back changed values from crew to all entities and mark them as changed
|
|
||||||
CREW.WriteTemplateToList(crew, crewList);
|
|
||||||
|
|
||||||
this.SublistElementChanged(Message.NotificationClass.CREWD);
|
|
||||||
this.dataGridCrewListDeparture.Items.Refresh();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
#region Excel import
|
#region Excel import
|
||||||
|
|
||||||
|
private string getValueAsString(IExcelDataReader reader, int index)
|
||||||
|
{
|
||||||
|
Type fieldType = reader.GetFieldType(index);
|
||||||
|
if (fieldType == null) return null;
|
||||||
|
if (fieldType == typeof(double))
|
||||||
|
return reader.GetDouble(index).ToString();
|
||||||
|
if (fieldType == typeof(int))
|
||||||
|
return reader.GetInt32(index).ToString();
|
||||||
|
return reader.GetString(index);
|
||||||
|
}
|
||||||
|
|
||||||
private void buttonImportExcelCrew_Click(object sender, RoutedEventArgs e)
|
private void buttonImportExcelCrew_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
OpenFileDialog ofd = new OpenFileDialog
|
OpenFileDialog ofd = new OpenFileDialog
|
||||||
@ -1086,10 +778,10 @@ namespace ENI2.DetailViewControls
|
|||||||
if (!reader.IsDBNull(6)) crew.CrewMemberCountryOfBirth = reader.GetString(6).Substring(0, 2).ToUpper();
|
if (!reader.IsDBNull(6)) crew.CrewMemberCountryOfBirth = reader.GetString(6).Substring(0, 2).ToUpper();
|
||||||
if (!reader.IsDBNull(7)) crew.CrewMemberDateOfBirth = reader.GetDateTime(7);
|
if (!reader.IsDBNull(7)) crew.CrewMemberDateOfBirth = reader.GetDateTime(7);
|
||||||
if (!reader.IsDBNull(8)) crew.CrewMemberIdentityDocumentType = GlobalStructures.ReadIdentityDocumentType(reader.GetString(8));
|
if (!reader.IsDBNull(8)) crew.CrewMemberIdentityDocumentType = GlobalStructures.ReadIdentityDocumentType(reader.GetString(8));
|
||||||
if (!reader.IsDBNull(9)) crew.CrewMemberIdentityDocumentId = reader.ReadAsString(9).Clean();
|
if (!reader.IsDBNull(9)) crew.CrewMemberIdentityDocumentId = this.getValueAsString(reader, 9).Clean();
|
||||||
if (!reader.IsDBNull(10)) crew.CrewMemberIdentityDocumentIssuingState = reader.GetString(10).Substring(0, 2).ToUpper();
|
if (!reader.IsDBNull(10)) crew.CrewMemberIdentityDocumentIssuingState = reader.GetString(10).Substring(0, 2).ToUpper();
|
||||||
if (!reader.IsDBNull(11)) crew.CrewMemberIdentityDocumentExpiryDate = reader.GetDateTime(11);
|
if (!reader.IsDBNull(11)) crew.CrewMemberIdentityDocumentExpiryDate = reader.GetDateTime(11);
|
||||||
if (!reader.IsDBNull(12)) crew.CrewMemberVisaNumber = reader.ReadAsString(12).Clean();
|
if (!reader.IsDBNull(12)) crew.CrewMemberVisaNumber = this.getValueAsString(reader, 12).Clean();
|
||||||
|
|
||||||
crew.MessageHeader = this._crewMessage;
|
crew.MessageHeader = this._crewMessage;
|
||||||
crew.IsDirty = true;
|
crew.IsDirty = true;
|
||||||
@ -1107,7 +799,7 @@ namespace ENI2.DetailViewControls
|
|||||||
if (importCrew.Count > 0)
|
if (importCrew.Count > 0)
|
||||||
{
|
{
|
||||||
this.dataGridCrewList.Items.Refresh();
|
this.dataGridCrewList.Items.Refresh();
|
||||||
this.SublistElementChanged(Message.NotificationClass.CREWA);
|
this.SublistElementChanged(Message.NotificationClass.CREW);
|
||||||
MessageBox.Show(String.Format(Properties.Resources.textCrewImported, importCrew.Count), Properties.Resources.textCaptionInformation, MessageBoxButton.OK, MessageBoxImage.Information);
|
MessageBox.Show(String.Format(Properties.Resources.textCrewImported, importCrew.Count), Properties.Resources.textCaptionInformation, MessageBoxButton.OK, MessageBoxImage.Information);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1116,6 +808,8 @@ namespace ENI2.DetailViewControls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* XXX : TODO
|
||||||
|
|
||||||
private void buttonImportExcelCrewDeparture_Click(object sender, RoutedEventArgs e)
|
private void buttonImportExcelCrewDeparture_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
OpenFileDialog ofd = new OpenFileDialog
|
OpenFileDialog ofd = new OpenFileDialog
|
||||||
@ -1157,18 +851,18 @@ namespace ENI2.DetailViewControls
|
|||||||
if (crew.CrewMemberLastName.Equals("Family Name") || (crew.CrewMemberLastName.Trim().Length == 0)) continue;
|
if (crew.CrewMemberLastName.Equals("Family Name") || (crew.CrewMemberLastName.Trim().Length == 0)) continue;
|
||||||
if (!reader.IsDBNull(1)) crew.CrewMemberFirstName = reader.GetString(1);
|
if (!reader.IsDBNull(1)) crew.CrewMemberFirstName = reader.GetString(1);
|
||||||
if (!reader.IsDBNull(2)) crew.CrewMemberGender = GlobalStructures.ParseGender(reader.GetString(2));
|
if (!reader.IsDBNull(2)) crew.CrewMemberGender = GlobalStructures.ParseGender(reader.GetString(2));
|
||||||
if (!reader.IsDBNull(3)) crew.CrewMemberDuty = reader.GetString(3).Clean();
|
if (!reader.IsDBNull(3)) crew.CrewMemberDuty = reader.GetString(3);
|
||||||
if (!reader.IsDBNull(4)) crew.CrewMemberNationality = reader.GetString(4).Substring(0, 2).ToUpper();
|
if (!reader.IsDBNull(4)) crew.CrewMemberNationality = reader.GetString(4).Substring(0, 2).ToUpper();
|
||||||
if (!reader.IsDBNull(5)) crew.CrewMemberPlaceOfBirth = reader.GetString(5);
|
if (!reader.IsDBNull(5)) crew.CrewMemberPlaceOfBirth = reader.GetString(5);
|
||||||
if (!reader.IsDBNull(6)) crew.CrewMemberCountryOfBirth = reader.GetString(6).Substring(0, 2).ToUpper();
|
if (!reader.IsDBNull(6)) crew.CrewMemberCountryOfBirth = reader.GetString(6).Substring(0, 2).ToUpper();
|
||||||
if (!reader.IsDBNull(7)) crew.CrewMemberDateOfBirth = reader.GetDateTime(7);
|
if (!reader.IsDBNull(7)) crew.CrewMemberDateOfBirth = reader.GetDateTime(7);
|
||||||
if (!reader.IsDBNull(8)) crew.CrewMemberIdentityDocumentType = GlobalStructures.ReadIdentityDocumentType(reader.GetString(8));
|
if (!reader.IsDBNull(8)) crew.CrewMemberIdentityDocumentType = GlobalStructures.ReadIdentityDocumentType(reader.GetString(8));
|
||||||
if (!reader.IsDBNull(9)) crew.CrewMemberIdentityDocumentId = reader.ReadAsString(9);
|
if (!reader.IsDBNull(9)) crew.CrewMemberIdentityDocumentId = this.getValueAsString(reader, 9);
|
||||||
if (!reader.IsDBNull(10)) crew.CrewMemberIdentityDocumentIssuingState = reader.GetString(10).Substring(0, 2).ToUpper();
|
if (!reader.IsDBNull(10)) crew.CrewMemberIdentityDocumentIssuingState = reader.GetString(10).Substring(0, 2).ToUpper();
|
||||||
if (!reader.IsDBNull(11)) crew.CrewMemberIdentityDocumentExpiryDate = reader.GetDateTime(11);
|
if (!reader.IsDBNull(11)) crew.CrewMemberIdentityDocumentExpiryDate = reader.GetDateTime(11);
|
||||||
if (!reader.IsDBNull(12)) crew.CrewMemberVisaNumber = reader.ReadAsString(12);
|
if (!reader.IsDBNull(12)) crew.CrewMemberVisaNumber = this.getValueAsString(reader, 12);
|
||||||
|
|
||||||
crew.MessageHeader = this._crewdMessage;
|
crew.MessageHeader = this._crewMessage;
|
||||||
crew.IsDirty = true;
|
crew.IsDirty = true;
|
||||||
crew.Identifier = CREWD.GetNewIdentifier(this._crewdMessage.Elements);
|
crew.Identifier = CREWD.GetNewIdentifier(this._crewdMessage.Elements);
|
||||||
this._crewdMessage.Elements.Add(crew);
|
this._crewdMessage.Elements.Add(crew);
|
||||||
@ -1193,6 +887,8 @@ namespace ENI2.DetailViewControls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
private void buttonImportExcelPassenger_Click(object sender, RoutedEventArgs e)
|
private void buttonImportExcelPassenger_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
OpenFileDialog ofd = new OpenFileDialog
|
OpenFileDialog ofd = new OpenFileDialog
|
||||||
@ -1245,12 +941,12 @@ namespace ENI2.DetailViewControls
|
|||||||
if (!reader.IsDBNull(8)) pas.PassengerCountryOfBirth = reader.GetString(8).Substring(0, 2).ToUpper().Clean();
|
if (!reader.IsDBNull(8)) pas.PassengerCountryOfBirth = reader.GetString(8).Substring(0, 2).ToUpper().Clean();
|
||||||
if (!reader.IsDBNull(9)) pas.PassengerDateOfBirth = reader.GetDateTime(9);
|
if (!reader.IsDBNull(9)) pas.PassengerDateOfBirth = reader.GetDateTime(9);
|
||||||
if (!reader.IsDBNull(10)) pas.PassengerIdentityDocumentType = GlobalStructures.ReadIdentityDocumentType(reader.GetString(10));
|
if (!reader.IsDBNull(10)) pas.PassengerIdentityDocumentType = GlobalStructures.ReadIdentityDocumentType(reader.GetString(10));
|
||||||
if (!reader.IsDBNull(11)) pas.PassengerIdentityDocumentId = reader.ReadAsString(11).Clean();
|
if (!reader.IsDBNull(11)) pas.PassengerIdentityDocumentId = this.getValueAsString(reader, 11).Clean();
|
||||||
if (!reader.IsDBNull(12)) pas.PassengerIdentityDocumentIssuingState = reader.GetString(12).Substring(0, 2).ToUpper();
|
if (!reader.IsDBNull(12)) pas.PassengerIdentityDocumentIssuingState = reader.GetString(12).Substring(0, 2).ToUpper();
|
||||||
if (!reader.IsDBNull(13)) pas.PassengerIdentityDocumentExpiryDate = reader.GetDateTime(13);
|
if (!reader.IsDBNull(13)) pas.PassengerIdentityDocumentExpiryDate = reader.GetDateTime(13);
|
||||||
if (!reader.IsDBNull(14)) pas.PassengerVisaNumber = reader.ReadAsString(14).Clean();
|
if (!reader.IsDBNull(14)) pas.PassengerVisaNumber = this.getValueAsString(reader, 14).Clean();
|
||||||
if (!reader.IsDBNull(15)) pas.EmergencyCare = reader.GetString(15).Clean();
|
if (!reader.IsDBNull(15)) pas.EmergencyCare = reader.GetString(15).Clean();
|
||||||
if (!reader.IsDBNull(16)) pas.EmergencyContactNumber = reader.ReadAsString(16).Clean();
|
if (!reader.IsDBNull(16)) pas.EmergencyContactNumber = this.getValueAsString(reader, 16).Clean();
|
||||||
|
|
||||||
pas.MessageHeader = this._pasMessage;
|
pas.MessageHeader = this._pasMessage;
|
||||||
pas.IsDirty = true;
|
pas.IsDirty = true;
|
||||||
@ -1268,7 +964,7 @@ namespace ENI2.DetailViewControls
|
|||||||
if (importPassenger.Count > 0)
|
if (importPassenger.Count > 0)
|
||||||
{
|
{
|
||||||
this.dataGridPassengerList.Items.Refresh();
|
this.dataGridPassengerList.Items.Refresh();
|
||||||
this.SublistElementChanged(Message.NotificationClass.PASA);
|
this.SublistElementChanged(Message.NotificationClass.PAS);
|
||||||
MessageBox.Show(String.Format(Properties.Resources.textPassengerImported, importPassenger.Count), Properties.Resources.textCaptionInformation, MessageBoxButton.OK, MessageBoxImage.Information);
|
MessageBox.Show(String.Format(Properties.Resources.textPassengerImported, importPassenger.Count), Properties.Resources.textCaptionInformation, MessageBoxButton.OK, MessageBoxImage.Information);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1276,6 +972,8 @@ namespace ENI2.DetailViewControls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
private void buttonImportExcelPassengerDeparture_Click(object sender, RoutedEventArgs e)
|
private void buttonImportExcelPassengerDeparture_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
OpenFileDialog ofd = new OpenFileDialog
|
OpenFileDialog ofd = new OpenFileDialog
|
||||||
@ -1328,12 +1026,12 @@ namespace ENI2.DetailViewControls
|
|||||||
if (!reader.IsDBNull(8)) pas.PassengerCountryOfBirth = reader.GetString(8).Substring(0, 2).ToUpper();
|
if (!reader.IsDBNull(8)) pas.PassengerCountryOfBirth = reader.GetString(8).Substring(0, 2).ToUpper();
|
||||||
if (!reader.IsDBNull(9)) pas.PassengerDateOfBirth = reader.GetDateTime(9);
|
if (!reader.IsDBNull(9)) pas.PassengerDateOfBirth = reader.GetDateTime(9);
|
||||||
if (!reader.IsDBNull(10)) pas.PassengerIdentityDocumentType = GlobalStructures.ReadIdentityDocumentType(reader.GetString(10));
|
if (!reader.IsDBNull(10)) pas.PassengerIdentityDocumentType = GlobalStructures.ReadIdentityDocumentType(reader.GetString(10));
|
||||||
if (!reader.IsDBNull(11)) pas.PassengerIdentityDocumentId = reader.ReadAsString(11);
|
if (!reader.IsDBNull(11)) pas.PassengerIdentityDocumentId = this.getValueAsString(reader, 11);
|
||||||
if (!reader.IsDBNull(12)) pas.PassengerIdentityDocumentIssuingState = reader.GetString(12).Substring(0, 2).ToUpper();
|
if (!reader.IsDBNull(12)) pas.PassengerIdentityDocumentIssuingState = reader.GetString(12).Substring(0, 2).ToUpper();
|
||||||
if (!reader.IsDBNull(13)) pas.PassengerIdentityDocumentExpiryDate = reader.GetDateTime(13);
|
if (!reader.IsDBNull(13)) pas.PassengerIdentityDocumentExpiryDate = reader.GetDateTime(13);
|
||||||
if (!reader.IsDBNull(14)) pas.PassengerVisaNumber = reader.ReadAsString(14);
|
if (!reader.IsDBNull(14)) pas.PassengerVisaNumber = this.getValueAsString(reader, 14);
|
||||||
if (!reader.IsDBNull(15)) pas.EmergencyCare = reader.GetString(15);
|
if (!reader.IsDBNull(15)) pas.EmergencyCare = reader.GetString(15);
|
||||||
if (!reader.IsDBNull(16)) pas.EmergencyContactNumber = reader.ReadAsString(16);
|
if (!reader.IsDBNull(16)) pas.EmergencyContactNumber = this.getValueAsString(reader, 16);
|
||||||
|
|
||||||
pas.MessageHeader = this._pasMessage;
|
pas.MessageHeader = this._pasMessage;
|
||||||
pas.IsDirty = true;
|
pas.IsDirty = true;
|
||||||
@ -1359,6 +1057,8 @@ namespace ENI2.DetailViewControls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Highlighting
|
#region Highlighting
|
||||||
@ -1385,30 +1085,43 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region mouse wheel
|
||||||
|
|
||||||
|
private void ScrollViewer_PreviewMouseWheel(object sender, System.Windows.Input.MouseWheelEventArgs e)
|
||||||
|
{
|
||||||
|
ScrollViewer scv = (ScrollViewer)sender;
|
||||||
|
scv.ScrollToVerticalOffset(scv.VerticalOffset - e.Delta);
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region Schengen/PAX checkboxes changed event handler
|
#region Schengen/PAX checkboxes changed event handler
|
||||||
|
|
||||||
|
/* XXX : TODO
|
||||||
|
|
||||||
private void checkBoxCrewNotificationSchengen_Click(object sender, RoutedEventArgs e)
|
private void checkBoxCrewNotificationSchengen_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
foreach(CREW crew in _crewMessage.Elements.Cast<CREW>())
|
foreach(CREW crew in _crewMessage.Elements)
|
||||||
{
|
{
|
||||||
crew.NotificationSchengen = checkBoxCrewNotificationSchengen.IsChecked;
|
crew.NotificationSchengen = checkBoxCrewNotificationSchengen.IsChecked;
|
||||||
}
|
}
|
||||||
this.SublistElementChanged(Message.NotificationClass.CREWA);
|
this.SublistElementChanged(Message.NotificationClass.CREW);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkBoxCrewNotificationPAX_Click(object sender, RoutedEventArgs e)
|
private void checkBoxCrewNotificationPAX_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
foreach (CREW crew in _crewMessage.Elements.Cast<CREW>())
|
foreach (CREW crew in _crewMessage.Elements)
|
||||||
{
|
{
|
||||||
crew.NotificationPAX = checkBoxCrewNotificationPAX.IsChecked;
|
crew.NotificationPAX = checkBoxCrewNotificationPAX.IsChecked;
|
||||||
}
|
}
|
||||||
this.SublistElementChanged(Message.NotificationClass.CREWA);
|
this.SublistElementChanged(Message.NotificationClass.CREW);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkBoxCrewNotificationSchengenDeparture_Click(object sender, RoutedEventArgs e)
|
private void checkBoxCrewNotificationSchengenDeparture_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
foreach(CREWD crewd in _crewdMessage.Elements.Cast<CREWD>())
|
foreach(CREWD crewd in _crewdMessage.Elements)
|
||||||
{
|
{
|
||||||
crewd.NotificationSchengen = checkBoxCrewNotificationSchengenDeparture.IsChecked;
|
crewd.NotificationSchengen = checkBoxCrewNotificationSchengenDeparture.IsChecked;
|
||||||
}
|
}
|
||||||
@ -1417,7 +1130,7 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
private void checkBoxCrewNotificationPAXDeparture_Click(object sender, RoutedEventArgs e)
|
private void checkBoxCrewNotificationPAXDeparture_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
foreach (CREWD crewd in _crewdMessage.Elements.Cast<CREWD>())
|
foreach (CREWD crewd in _crewdMessage.Elements)
|
||||||
{
|
{
|
||||||
crewd.NotificationPAX = checkBoxCrewNotificationPAXDeparture.IsChecked;
|
crewd.NotificationPAX = checkBoxCrewNotificationPAXDeparture.IsChecked;
|
||||||
}
|
}
|
||||||
@ -1426,25 +1139,25 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
private void checkBoxPasNotificationSchengen_Click(object sender, RoutedEventArgs e)
|
private void checkBoxPasNotificationSchengen_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
foreach(PAS pas in _pasMessage.Elements.Cast<PAS>())
|
foreach(PAS pas in _pasMessage.Elements)
|
||||||
{
|
{
|
||||||
pas.NotificationSchengen = checkBoxPasNotificationSchengen.IsChecked;
|
pas.NotificationSchengen = checkBoxPasNotificationSchengen.IsChecked;
|
||||||
}
|
}
|
||||||
this.SublistElementChanged(Message.NotificationClass.PASA);
|
this.SublistElementChanged(Message.NotificationClass.PAS);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkBoxPasNotificationPAX_Click(object sender, RoutedEventArgs e)
|
private void checkBoxPasNotificationPAX_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
foreach(PAS pas in _pasMessage.Elements.Cast<PAS>())
|
foreach(PAS pas in _pasMessage.Elements)
|
||||||
{
|
{
|
||||||
pas.NotificationPAX = checkBoxPasNotificationPAX.IsChecked;
|
pas.NotificationPAX = checkBoxPasNotificationPAX.IsChecked;
|
||||||
}
|
}
|
||||||
this.SublistElementChanged(Message.NotificationClass.PASA);
|
this.SublistElementChanged(Message.NotificationClass.PAS);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkBoxPasNotificationSchengenDeparture_Click(object sender, RoutedEventArgs e)
|
private void checkBoxPasNotificationSchengenDeparture_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
foreach(PASD pasd in _pasdMessage.Elements.Cast<PASD>())
|
foreach(PASD pasd in _pasdMessage.Elements)
|
||||||
{
|
{
|
||||||
pasd.NotificationSchengen = checkBoxPasNotificationSchengenDeparture.IsChecked;
|
pasd.NotificationSchengen = checkBoxPasNotificationSchengenDeparture.IsChecked;
|
||||||
}
|
}
|
||||||
@ -1453,72 +1166,14 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
private void checkBoxPasNotificationPAXDeparture_Click(object sender, RoutedEventArgs e)
|
private void checkBoxPasNotificationPAXDeparture_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
foreach(PASD pasd in _pasdMessage.Elements.Cast<PASD>())
|
foreach(PASD pasd in _pasdMessage.Elements)
|
||||||
{
|
{
|
||||||
pasd.NotificationPAX = checkBoxPasNotificationPAXDeparture.IsChecked;
|
pasd.NotificationPAX = checkBoxPasNotificationPAXDeparture.IsChecked;
|
||||||
}
|
}
|
||||||
this.SublistElementChanged(Message.NotificationClass.PASD);
|
this.SublistElementChanged(Message.NotificationClass.PASD);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
*/
|
||||||
|
|
||||||
#region Buttons to delete all entries from CREWA CREWD PASA PASD
|
|
||||||
|
|
||||||
private async void buttonDeleteAllCrewA_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if(MessageBox.Show(Properties.Resources.textConfimDeleteAllEntries, Properties.Resources.textConfirmation, MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.Yes)
|
|
||||||
{
|
|
||||||
foreach(CREW crewa in this._crewMessage.Elements.Cast<CREW>())
|
|
||||||
{
|
|
||||||
await DBManagerAsync.DeleteAsync(crewa);
|
|
||||||
}
|
|
||||||
this._crewMessage.Elements.Clear();
|
|
||||||
this.dataGridCrewList.Items.Refresh();
|
|
||||||
this.SublistElementChanged(Message.NotificationClass.CREWA);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private async void buttonDeleteAllCrewD_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (MessageBox.Show(Properties.Resources.textConfimDeleteAllEntries, Properties.Resources.textConfirmation, MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.Yes)
|
|
||||||
{
|
|
||||||
foreach (CREWD crewd in this._crewdMessage.Elements.Cast<CREWD>())
|
|
||||||
{
|
|
||||||
await DBManagerAsync.DeleteAsync(crewd);
|
|
||||||
}
|
|
||||||
this._crewdMessage.Elements.Clear();
|
|
||||||
this.dataGridCrewListDeparture.Items.Refresh();
|
|
||||||
this.SublistElementChanged(Message.NotificationClass.CREWD);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private async void buttonDeleteAllPasA_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (MessageBox.Show(Properties.Resources.textConfimDeleteAllEntries, Properties.Resources.textConfirmation, MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.Yes)
|
|
||||||
{
|
|
||||||
foreach (PAS pasa in this._pasMessage.Elements.Cast<PAS>())
|
|
||||||
{
|
|
||||||
await DBManagerAsync.DeleteAsync(pasa);
|
|
||||||
}
|
|
||||||
this._pasMessage.Elements.Clear();
|
|
||||||
this.dataGridPassengerList.Items.Refresh();
|
|
||||||
this.SublistElementChanged(Message.NotificationClass.PASA);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private async void buttonDeleteAllPasD_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (MessageBox.Show(Properties.Resources.textConfimDeleteAllEntries, Properties.Resources.textConfirmation, MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.Yes)
|
|
||||||
{
|
|
||||||
foreach (PASD pasd in this._pasdMessage.Elements.Cast<PASD>())
|
|
||||||
{
|
|
||||||
await DBManagerAsync.DeleteAsync(pasd);
|
|
||||||
}
|
|
||||||
this._pasdMessage.Elements.Clear();
|
|
||||||
this.dataGridPassengerListDeparture.Items.Refresh();
|
|
||||||
this.SublistElementChanged(Message.NotificationClass.PASD);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@ -197,12 +197,6 @@ namespace ENI2.DetailViewControls
|
|||||||
this._initialized = true;
|
this._initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int SelectedTabIndex
|
|
||||||
{
|
|
||||||
get { return this.tabControlPositions.SelectedIndex; }
|
|
||||||
set { this.tabControlPositions.SelectedIndex = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#region SetEnabled
|
#region SetEnabled
|
||||||
|
|
||||||
public override void SetEnabled(bool enabled)
|
public override void SetEnabled(bool enabled)
|
||||||
@ -332,6 +326,23 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Beim Hinzufügen der allerersten Gefahrgutposition sollen die Flags vorbelegt werden
|
||||||
|
/// </summary>
|
||||||
|
void SetHAZGlobalFlags()
|
||||||
|
{
|
||||||
|
HAZ haz = this.IsDeparture ? this.hazd : this.haza;
|
||||||
|
|
||||||
|
int totalCount = haz.MARPOLPositions.Count + haz.IMDGPositions.Count + haz.IGCPositions.Count + haz.IBCPositions.Count + haz.IMSBCPositions.Count;
|
||||||
|
if(totalCount == 1)
|
||||||
|
{
|
||||||
|
if (!(this.checkBoxDangerousGoodsOnBoard.IsChecked ?? false)) this.checkBoxDangerousGoodsOnBoard.IsChecked = true;
|
||||||
|
if (this.checkBoxMoUBaltic.IsChecked ?? true) this.checkBoxMoUBaltic.IsChecked = false;
|
||||||
|
haz.NoDPGOnBoardOnArrival = false;
|
||||||
|
haz.MOUBaltic = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#region MARPOL datagrid handlers
|
#region MARPOL datagrid handlers
|
||||||
|
|
||||||
private void DataGridMARPOLItems_DeleteRequested(DatabaseEntity obj)
|
private void DataGridMARPOLItems_DeleteRequested(DatabaseEntity obj)
|
||||||
@ -887,26 +898,5 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region private methods
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Beim Hinzufügen der allerersten Gefahrgutposition sollen die Flags vorbelegt werden
|
|
||||||
/// </summary>
|
|
||||||
void SetHAZGlobalFlags()
|
|
||||||
{
|
|
||||||
HAZ haz = this.IsDeparture ? this.hazd : this.haza;
|
|
||||||
|
|
||||||
int totalCount = haz.MARPOLPositions.Count + haz.IMDGPositions.Count + haz.IGCPositions.Count + haz.IBCPositions.Count + haz.IMSBCPositions.Count;
|
|
||||||
if (totalCount == 1)
|
|
||||||
{
|
|
||||||
if (!(this.checkBoxDangerousGoodsOnBoard.IsChecked ?? false)) this.checkBoxDangerousGoodsOnBoard.IsChecked = true;
|
|
||||||
if (this.checkBoxMoUBaltic.IsChecked ?? true) this.checkBoxMoUBaltic.IsChecked = false;
|
|
||||||
haz.NoDPGOnBoardOnArrival = false;
|
|
||||||
haz.MOUBaltic = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -70,24 +70,8 @@
|
|||||||
AutoGenerateColumns="False" Margin="0,5,0,0">
|
AutoGenerateColumns="False" Margin="0,5,0,0">
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTextColumn Header="" Binding="{Binding Identifier}" IsReadOnly="True" />
|
<DataGridTextColumn Header="" Binding="{Binding Identifier}" IsReadOnly="True" />
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textBunkerType}" Width="0.2*">
|
<DataGridTextColumn Header="{x:Static p:Resources.textBunkerType}" Binding="{Binding BunkerFuelType}" IsReadOnly="True" Width="0.2*" />
|
||||||
<DataGridTextColumn.Binding>
|
<DataGridTextColumn Header="{x:Static p:Resources.textBunkerQuantity}" Binding="{Binding BunkerFuelQuantity_TNE, Mode=TwoWay}" IsReadOnly="True" Width="0.8*" />
|
||||||
<Binding Path="BunkerFuelType" Mode="TwoWay">
|
|
||||||
<Binding.ValidationRules>
|
|
||||||
<util:StringValidationRule MaxLength="25" />
|
|
||||||
</Binding.ValidationRules>
|
|
||||||
</Binding>
|
|
||||||
</DataGridTextColumn.Binding>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textBunkerQuantity}" IsReadOnly="False" Width="0.8*">
|
|
||||||
<DataGridTextColumn.Binding>
|
|
||||||
<Binding Path="BunkerFuelQuantity_TNE" Mode="TwoWay">
|
|
||||||
<Binding.ValidationRules>
|
|
||||||
<util:NumberValidationRule MaxValue="10000" />
|
|
||||||
</Binding.ValidationRules>
|
|
||||||
</Binding>
|
|
||||||
</DataGridTextColumn.Binding>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</enictrl:ENIDataGrid>
|
</enictrl:ENIDataGrid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|||||||
@ -40,7 +40,6 @@ namespace ENI2.DetailViewControls
|
|||||||
this.RegisterIntegerUpDownChange(this.integerUpDownPassengersOnBoard, Message.NotificationClass.POBD);
|
this.RegisterIntegerUpDownChange(this.integerUpDownPassengersOnBoard, Message.NotificationClass.POBD);
|
||||||
this.RegisterIntegerUpDownChange(this.integerUpDownPersonsOnBoard, Message.NotificationClass.POBD);
|
this.RegisterIntegerUpDownChange(this.integerUpDownPersonsOnBoard, Message.NotificationClass.POBD);
|
||||||
this.RegisterIntegerUpDownChange(this.integerUpDownStowawaysOnBoard, Message.NotificationClass.POBD);
|
this.RegisterIntegerUpDownChange(this.integerUpDownStowawaysOnBoard, Message.NotificationClass.POBD);
|
||||||
this.dataGridBKRD.CellEditEnding += (obj, ev) => { this.SublistElementChanged(Message.NotificationClass.BKRD); };
|
|
||||||
startupComplete = true;
|
startupComplete = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,8 +167,6 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
private void DataGridBKRD_CreateRequested()
|
private void DataGridBKRD_CreateRequested()
|
||||||
{
|
{
|
||||||
this.dataGridBKRD.CancelEdit();
|
|
||||||
this.dataGridBKRD.CancelEdit();
|
|
||||||
EditBKRDialog ebd = new EditBKRDialog();
|
EditBKRDialog ebd = new EditBKRDialog();
|
||||||
ebd.IsDeparture = true;
|
ebd.IsDeparture = true;
|
||||||
ebd.BRKD = new BRKD();
|
ebd.BRKD = new BRKD();
|
||||||
@ -202,8 +199,6 @@ namespace ENI2.DetailViewControls
|
|||||||
{
|
{
|
||||||
if (obj is BRKD brkd)
|
if (obj is BRKD brkd)
|
||||||
{
|
{
|
||||||
this.dataGridBKRD.CancelEdit();
|
|
||||||
this.dataGridBKRD.CancelEdit();
|
|
||||||
// are you sure dialog is in base class
|
// are you sure dialog is in base class
|
||||||
this._bkrdMessage.Elements.Remove(brkd);
|
this._bkrdMessage.Elements.Remove(brkd);
|
||||||
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Delete(brkd);
|
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Delete(brkd);
|
||||||
@ -215,8 +210,6 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
private void DataGridBKRD_EditRequested(DatabaseEntity obj)
|
private void DataGridBKRD_EditRequested(DatabaseEntity obj)
|
||||||
{
|
{
|
||||||
this.dataGridBKRD.CancelEdit(DataGridEditingUnit.Row);
|
|
||||||
this.dataGridBKRD.CommitEdit(DataGridEditingUnit.Row, true);
|
|
||||||
EditBKRDialog eld = new EditBKRDialog();
|
EditBKRDialog eld = new EditBKRDialog();
|
||||||
eld.IsDeparture = true;
|
eld.IsDeparture = true;
|
||||||
eld.BRKD = obj as BRKD;
|
eld.BRKD = obj as BRKD;
|
||||||
@ -237,8 +230,7 @@ namespace ENI2.DetailViewControls
|
|||||||
{
|
{
|
||||||
if (!_bkrdMessage.Elements.Contains(eld.BRKD))
|
if (!_bkrdMessage.Elements.Contains(eld.BRKD))
|
||||||
_bkrdMessage.Elements.Add(eld.BRKD);
|
_bkrdMessage.Elements.Add(eld.BRKD);
|
||||||
this.dataGridBKRD.ItemsSource = null;
|
this.dataGridBKRD.Items.Refresh();
|
||||||
this.dataGridBKRD.ItemsSource = this._bkrdMessage.Elements;
|
|
||||||
this.SublistElementChanged(Message.NotificationClass.BKRD);
|
this.SublistElementChanged(Message.NotificationClass.BKRD);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -300,6 +292,17 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region mouse wheel
|
||||||
|
|
||||||
|
private void ScrollViewer_PreviewMouseWheel(object sender, System.Windows.Input.MouseWheelEventArgs e)
|
||||||
|
{
|
||||||
|
ScrollViewer scv = (ScrollViewer)sender;
|
||||||
|
scv.ScrollToVerticalOffset(scv.VerticalOffset - e.Delta);
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region special datetimepicker validation popup (OMG)
|
#region special datetimepicker validation popup (OMG)
|
||||||
|
|
||||||
private void dateTimePickerATD_ValueChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
|
private void dateTimePickerATD_ValueChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
|
||||||
|
|||||||
@ -130,12 +130,6 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int SelectedTabIndex
|
|
||||||
{
|
|
||||||
get { return this.mainFrame.SelectedIndex; }
|
|
||||||
set { this.mainFrame.SelectedIndex = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#region SetEnabled
|
#region SetEnabled
|
||||||
|
|
||||||
public override void SetEnabled(bool enabled)
|
public override void SetEnabled(bool enabled)
|
||||||
@ -609,5 +603,16 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region mouse wheel
|
||||||
|
|
||||||
|
private void ScrollViewer_PreviewMouseWheel(object sender, System.Windows.Input.MouseWheelEventArgs e)
|
||||||
|
{
|
||||||
|
ScrollViewer scv = (ScrollViewer)sender;
|
||||||
|
scv.ScrollToVerticalOffset(scv.VerticalOffset - e.Delta);
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
xmlns:data="clr-namespace:bsmd.database;assembly=bsmd.database"
|
xmlns:data="clr-namespace:bsmd.database;assembly=bsmd.database"
|
||||||
xmlns:local="clr-namespace:ENI2.DetailViewControls"
|
xmlns:local="clr-namespace:ENI2.DetailViewControls"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="768" d:DesignWidth="1024">
|
d:DesignHeight="300" d:DesignWidth="800">
|
||||||
<xctk:BusyIndicator Name="busyIndicator">
|
<xctk:BusyIndicator Name="busyIndicator">
|
||||||
<xctk:BusyIndicator.ProgressBarStyle>
|
<xctk:BusyIndicator.ProgressBarStyle>
|
||||||
<Style TargetType="ProgressBar">
|
<Style TargetType="ProgressBar">
|
||||||
@ -26,85 +26,75 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</xctk:BusyIndicator.BusyContent>
|
</xctk:BusyIndicator.BusyContent>
|
||||||
|
|
||||||
<GroupBox Name="visitTransitGroupBox" Header="{x:Static p:Resources.textOverview}">
|
<GroupBox Name="visitTransitGroupBox" Header="{x:Static p:Resources.textVisitTransit}">
|
||||||
<ScrollViewer PreviewMouseWheel="ScrollViewer_PreviewMouseWheel">
|
<ScrollViewer PreviewMouseWheel="ScrollViewer_PreviewMouseWheel">
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="400" />
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<Grid>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="2*" />
|
|
||||||
<ColumnDefinition Width="2*" />
|
|
||||||
<ColumnDefinition Width="2*" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
<RowDefinition Height="28" />
|
|
||||||
<RowDefinition Height="28" />
|
|
||||||
<RowDefinition Height="28" />
|
|
||||||
<RowDefinition Height="28" />
|
|
||||||
<RowDefinition Height="28" />
|
|
||||||
|
|
||||||
<RowDefinition Height="4" />
|
<RowDefinition Height="4" />
|
||||||
<RowDefinition Height="36" />
|
<RowDefinition Height="32" />
|
||||||
|
<RowDefinition Height="32" />
|
||||||
<RowDefinition Height="4" />
|
<RowDefinition Height="4" />
|
||||||
<RowDefinition Height="28" />
|
|
||||||
<RowDefinition Height="28" />
|
|
||||||
|
|
||||||
<RowDefinition Height="4" />
|
|
||||||
<RowDefinition Height="28" />
|
|
||||||
<RowDefinition Height="28" />
|
|
||||||
<RowDefinition Height="28" />
|
|
||||||
<RowDefinition Height="28" />
|
|
||||||
<RowDefinition Height="28" />
|
|
||||||
<RowDefinition Height="28" />
|
|
||||||
<RowDefinition Height="28" />
|
|
||||||
|
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textPortCall}" Margin="0,0,10,0"/>
|
||||||
|
<enictrl:LocodeControl Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="0" Width="Auto" x:Name="locodePoC" LocodeValue="{Binding PoC, Mode=TwoWay}" IsEnabled="False" />
|
||||||
|
<!--Grid Grid.Column="1" Grid.Row="0" Width="Auto">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<xctk:WatermarkComboBox Grid.Column="0" x:Name="comboBoxPoC" Margin="2" IsEditable="True" Watermark="Type for Locode.." TextBoxBase.TextChanged="ComboBox_TextChanged" ItemsSource="{Binding LocodePoCList, Mode=TwoWay}" SelectedItem="{Binding PoC, Mode=TwoWay}" />
|
||||||
|
<Image Name="imagePoCState" Grid.Column="1" Source="../Resources/bullet_ball_grey.png" />
|
||||||
|
</-->
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="3" Content="{x:Static p:Resources.textVisitTransitId}" Margin="0,0,10,0" />
|
||||||
|
<TextBox Name="textBoxDisplayId" Grid.Row="0" Grid.Column="4" Grid.ColumnSpan="2" IsReadOnly="True" Margin="2" VerticalContentAlignment="Center" />
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textIMO}" Margin="0,0,10,0" />
|
||||||
|
<TextBox Name="textBoxIMO" Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="1" Text="{Binding IMO, Mode=TwoWay, Converter={util:TrimStringConverter}}" Margin="2" IsReadOnly="True" VerticalContentAlignment="Center"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="3" Content="{x:Static p:Resources.textENI}" Margin="0,0,10,0" />
|
||||||
|
<TextBox Name="textBoxENI" Grid.Row="1" Grid.Column="4" Grid.ColumnSpan="2" Text="{Binding ENI, Mode=TwoWay, Converter={util:TrimStringConverter}}" Margin="2" IsReadOnly="True" VerticalContentAlignment="Center"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textETAPortOfCall}" Margin="0,0,10,0" />
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="3" Content="{x:Static p:Resources.textETDPortOfCall}" Margin="0,0,10,0" />
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textATAPortOfCall}" Margin="0,0,10,0" />
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="3" Content="{x:Static p:Resources.textATDPortOfCall}" Margin="0,0,10,0" />
|
||||||
|
<xctk:DateTimePicker Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="2" Value="{Binding ETAToPortOfCall, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePickerETA" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00" />
|
||||||
|
<xctk:DateTimePicker Grid.Column="4" Grid.ColumnSpan="2" Grid.Row="2" Value="{Binding ETDFromPortOfCall, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePickerETD" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00"/>
|
||||||
|
<xctk:DateTimePicker Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="3" Value="{Binding ATAPortOfCall, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePickerATA" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00"/>
|
||||||
|
<xctk:DateTimePicker Grid.Column="4" Grid.ColumnSpan="2" Grid.Row="3" Value="{Binding ATDPortOfCall, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePickerATD" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00"/>
|
||||||
|
<Label HorizontalAlignment="Right" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textTicketNo}" Margin="0,0,10,0" />
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="4" Grid.Column="3" Content="{x:Static p:Resources.textCreated}" Margin="0,0,10,0" />
|
||||||
|
<Label Name="labelCreated" Grid.Column="4" Grid.Row="4" Margin="2, 0, 0, 0" />
|
||||||
|
<Button Name="buttonFormblattNeu" Grid.Column="4" Grid.Row="7" Margin="2" Click="buttonFormblattNeu_Click" >
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="Formblatt neu"></TextBlock>
|
||||||
|
<Image Source="../Resources/excel.png" Margin="10,0,5,0" Height="16"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Button>
|
||||||
|
<TextBox Name="textBoxTicketNo" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="2" Text="{Binding TicketNo, Mode=TwoWay, Converter={util:TrimStringConverter}}" Margin="2" VerticalContentAlignment="Center" MaxLength="50"/>
|
||||||
|
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textVisitTransitId}" Margin="0,0,10,0" />
|
<Label Grid.Column="0" Grid.Row="6" Margin="0,0,10,0" HorizontalContentAlignment="Right" Name="labelBSMDStatusInternal" Content="{Binding BSMDStatusInternal, StringFormat={}{0}}" VerticalContentAlignment="Center" FontWeight="Bold" />
|
||||||
<TextBox Name="textBoxDisplayId" Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" IsReadOnly="True" Margin="2" VerticalContentAlignment="Center" />
|
<Button IsEnabled="True" Name="buttonStorno" Grid.Column="1" Grid.Row="6" Margin="2" Click="buttonStorno_Click" Content="{x:Static p:Resources.textCancelDeclaration}" Background="Red"/>
|
||||||
|
<Button IsEnabled="True" Name="buttonCopy" Grid.Column="2" Grid.Row="6" Margin="2" Click="buttonCopy_Click" Content="{x:Static p:Resources.textCopyData}"/>
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textPortCall}" Margin="0,0,10,0"/>
|
<Button IsEnabled="True" Name="buttonSendPDF" Grid.Column="3" Grid.Row="6" Margin="2" Click="buttonSendPDF_Click">
|
||||||
<enictrl:LocodeControl Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="1" Width="Auto" x:Name="locodePoC" LocodeValue="{Binding PoC, Mode=TwoWay}" IsEnabled="False" />
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="{x:Static p:Resources.textCreatePDF}"></TextBlock>
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textIMO}" Margin="0,0,10,0" />
|
<Image Source="../Resources/document_pdf.png" Margin="10,0,5,0" Height="16"/>
|
||||||
<TextBox Name="textBoxIMO" Grid.Row="2" Grid.ColumnSpan="2" Grid.Column="1" Text="{Binding IMO, Mode=TwoWay, Converter={util:TrimStringConverter}}" Margin="2" IsReadOnly="True" VerticalContentAlignment="Center"/>
|
</StackPanel>
|
||||||
|
</Button>
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textENI}" Margin="0,0,10,0" />
|
<Button Name="buttonQueryHIS" Grid.Column="4" Grid.Row="6" Margin="2" Click="buttonQueryHIS_Click" Content="{x:Static p:Resources.textQueryHIS}"/>
|
||||||
<TextBox Name="textBoxENI" Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" Text="{Binding ENI, Mode=TwoWay, Converter={util:TrimStringConverter}}" Margin="2" IsReadOnly="True" VerticalContentAlignment="Center"/>
|
<StackPanel Orientation="Horizontal" Grid.Column="5" Grid.Row="6">
|
||||||
|
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textETAPortOfCall}" Margin="0,0,10,0" />
|
|
||||||
<xctk:DateTimePicker Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="4" Value="{Binding ETAToPortOfCall, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePickerETA" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00" />
|
|
||||||
|
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textETDPortOfCall}" Margin="0,0,10,0" />
|
|
||||||
<xctk:DateTimePicker Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="5" Value="{Binding ETDFromPortOfCall, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePickerETD" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00"/>
|
|
||||||
|
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="6" Grid.Column="0" Content="{x:Static p:Resources.textATAPortOfCall}" Margin="0,0,10,0" />
|
|
||||||
<xctk:DateTimePicker Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="6" Value="{Binding ATAPortOfCall, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePickerATA" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00"/>
|
|
||||||
|
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="7" Grid.Column="0" Content="{x:Static p:Resources.textATDPortOfCall}" Margin="0,0,10,0" />
|
|
||||||
<xctk:DateTimePicker Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="7" Value="{Binding ATDPortOfCall, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePickerATD" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00"/>
|
|
||||||
|
|
||||||
<Label HorizontalAlignment="Right" Grid.Row="8" Grid.Column="0" Content="{x:Static p:Resources.textRemarks}" Margin="0,0,10,0" />
|
|
||||||
<TextBox Name="textBoxTicketNo" Grid.Column="1" Grid.Row="8" Grid.ColumnSpan="2" Text="{Binding TicketNo, Mode=TwoWay, Converter={util:TrimStringConverter}}" Margin="2" VerticalContentAlignment="Center" MaxLength="50"/>
|
|
||||||
|
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="9" Grid.Column="0" Content="{x:Static p:Resources.textCreated}" Margin="0,0,10,0" />
|
|
||||||
<Label Name="labelCreated" Grid.Column="1" Grid.Row="9" Margin="2, 0, 0, 0" />
|
|
||||||
|
|
||||||
<Label Grid.Column="2" Grid.Row="9" Margin="0,0,10,0" HorizontalContentAlignment="Right" Name="labelBSMDStatusInternal" Content="{Binding BSMDStatusInternal, StringFormat={}{0}}" VerticalContentAlignment="Center" FontWeight="Bold" />
|
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="11">
|
|
||||||
<Button Name="buttonRefresh" Margin="2" Click="buttonRefresh_Click" BorderThickness="0" Background="Transparent" ToolTip="{x:Static p:Resources.textTooltipRefresh}">
|
<Button Name="buttonRefresh" Margin="2" Click="buttonRefresh_Click" BorderThickness="0" Background="Transparent" ToolTip="{x:Static p:Resources.textTooltipRefresh}">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<Image Source="../Resources/nav_refresh_blue.png" Margin="0,0,5,0" Height="24"/>
|
<Image Source="../Resources/nav_refresh_blue.png" Margin="0,0,5,0" Height="24"/>
|
||||||
@ -124,45 +114,15 @@
|
|||||||
</Button>
|
</Button>
|
||||||
-->
|
-->
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Horizontal" Grid.Column="2" Grid.Row="11" Visibility="Hidden" Name="stackPanelLock">
|
<Label Grid.Column="0" Grid.Row="7" Margin="0,0,10,0" HorizontalContentAlignment="Right" Name="labelCancelled" VerticalContentAlignment="Center" FontWeight="Bold" />
|
||||||
<Image Source="../Resources/lock.png" Margin="0,0,5,0" Height="24" />
|
<Label Grid.Column="1" Grid.Row="7" Margin="0,0,10,0" HorizontalContentAlignment="Right" Name="labelHIS" VerticalContentAlignment="Center" Content="{x:Static p:Resources.textSendToHIS}" />
|
||||||
<TextBlock Name="textBlockLockUserName" VerticalAlignment="Center" />
|
<ComboBox Grid.Column="2" Grid.Row="7" Margin="2" Name="comboBoxInitialHis" VerticalContentAlignment="Center" SelectedValuePath="Key" DisplayMemberPath="Value" SelectedValue="{Binding Path=InitialHIS}" />
|
||||||
</StackPanel>
|
<Button Grid.Column="3" Grid.Row="7" Margin="2" Name="buttonExcelImport" Click="buttonExcelImport_Click">
|
||||||
|
|
||||||
<Label Grid.Column="0" Grid.Row="13" Margin="0,0,10,0" HorizontalContentAlignment="Right" Name="labelHIS" VerticalContentAlignment="Center" Content="{x:Static p:Resources.textSendToHIS}" />
|
|
||||||
<ComboBox Grid.Column="1" Grid.Row="13" Margin="2" Name="comboBoxInitialHis" VerticalContentAlignment="Center" SelectedValuePath="Key" DisplayMemberPath="Value" SelectedValue="{Binding Path=InitialHIS}" />
|
|
||||||
|
|
||||||
<Button IsEnabled="True" Name="buttonSendAll" Grid.Column="1" Grid.Row="14" Content="{x:Static p:Resources.textSendAll}" Margin="2" Click="buttonSendAll_Click" />
|
|
||||||
|
|
||||||
<Button Grid.Column="1" Grid.Row="16" Margin="2" Name="buttonExcelImport" Click="buttonExcelImport_Click">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<TextBlock Text="{x:Static p:Resources.textExcelImport}"></TextBlock>
|
<TextBlock Text="{x:Static p:Resources.textExcelImport}"></TextBlock>
|
||||||
<Image Source="../Resources/excel.png" Margin="10,0,5,0" Height="16"/>
|
<Image Source="../Resources/excel.png" Margin="10,0,5,0" Height="16"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button IsEnabled="True" Name="buttonSendPDF" Grid.Column="1" Grid.Row="17" Margin="2" Click="buttonSendPDF_Click">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<TextBlock Text="{x:Static p:Resources.textCreatePDF}"></TextBlock>
|
|
||||||
<Image Source="../Resources/document_pdf.png" Margin="10,0,5,0" Height="16"/>
|
|
||||||
</StackPanel>
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<Button Name="buttonQueryHIS" Grid.Column="1" Grid.Row="18" Margin="2" Click="buttonQueryHIS_Click" Content="{x:Static p:Resources.textQueryHIS}"/>
|
|
||||||
<Button IsEnabled="True" Name="buttonCopy" Grid.Column="1" Grid.Row="19" Margin="2" Click="buttonCopy_Click" Content="{x:Static p:Resources.textCopyData}"/>
|
|
||||||
|
|
||||||
<Button Name="buttonFormblattNeu" Grid.Column="1" Grid.Row="20" Margin="2" Click="buttonFormblattNeu_Click" >
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<TextBlock Text="Formblatt neu"></TextBlock>
|
|
||||||
<Image Source="../Resources/excel.png" Margin="10,0,5,0" Height="16"/>
|
|
||||||
</StackPanel>
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<Button IsEnabled="True" Name="buttonStorno" Grid.Column="1" Grid.Row="22" Margin="2" Click="buttonStorno_Click" Content="{x:Static p:Resources.textCancelDeclaration}" Background="Red"/>
|
|
||||||
<Label Grid.Column="2" Grid.Row="21" Margin="0,0,10,0" HorizontalContentAlignment="Right" Name="labelCancelled" VerticalContentAlignment="Center" FontWeight="Bold" />
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<Button Grid.Column="4" Grid.Row="7" Margin="2" Name="buttonExcelExport" Click="buttonExcelExport_Click">
|
<Button Grid.Column="4" Grid.Row="7" Margin="2" Name="buttonExcelExport" Click="buttonExcelExport_Click">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
@ -171,64 +131,14 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Button>
|
</Button>
|
||||||
-->
|
-->
|
||||||
|
<StackPanel Orientation="Horizontal" Grid.Column="5" Grid.Row="4" Visibility="Hidden" Name="stackPanelLock">
|
||||||
|
<Image Source="../Resources/lock.png" Margin="0,0,5,0" Height="24" />
|
||||||
|
<TextBlock Name="textBlockLockUserName" VerticalAlignment="Center" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
<!-- Data Grid -->
|
<!-- Data Grid -->
|
||||||
<DataGrid Grid.Row="0" Grid.ColumnSpan="1" Grid.Column="1" Margin="2" x:Name="dataGridMessages" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" CanUserAddRows="False"
|
<DataGrid Grid.Row="9" Grid.ColumnSpan="6" Margin="0,8,0,0" x:Name="dataGridMessages" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" CanUserAddRows="False"
|
||||||
SelectionMode="Extended" AutoGenerateColumns="False" MouseDoubleClick="dataGrid_MouseDoubleClick" PreviewKeyDown="dataGrid_PreviewKeyDown">
|
SelectionMode="Extended" AutoGenerateColumns="False" MouseDoubleClick="dataGrid_MouseDoubleClick" PreviewKeyDown="dataGrid_PreviewKeyDown">
|
||||||
<DataGrid.Resources>
|
|
||||||
|
|
||||||
<Style TargetType="{x:Type DataGridColumnHeadersPresenter}">
|
|
||||||
<Setter Property="Template">
|
|
||||||
<Setter.Value>
|
|
||||||
<ControlTemplate TargetType="{x:Type DataGridColumnHeadersPresenter}">
|
|
||||||
<Grid Background="Transparent" Grid.IsSharedSizeScope="True">
|
|
||||||
<!-- 3 header rows: 0 = main title, 1 = group headers, 2 = real column headers -->
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<!-- One ColumnDefinition per DataGridTextColumn (or shared‐size groups) -->
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="{Binding Columns[0].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
|
||||||
<ColumnDefinition Width="{Binding Columns[1].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
|
||||||
<ColumnDefinition Width="{Binding Columns[2].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
|
||||||
<ColumnDefinition Width="{Binding Columns[3].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
|
||||||
<ColumnDefinition Width="{Binding Columns[4].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
|
||||||
<ColumnDefinition Width="{Binding Columns[5].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
|
||||||
<ColumnDefinition Width="{Binding Columns[6].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
|
||||||
<ColumnDefinition Width="{Binding Columns[7].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
|
||||||
<ColumnDefinition Width="{Binding Columns[8].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
|
||||||
<ColumnDefinition Width="{Binding Columns[9].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
|
||||||
<ColumnDefinition Width="{Binding Columns[10].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
|
||||||
<ColumnDefinition Width="{Binding Columns[11].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
|
||||||
<ColumnDefinition Width="{Binding Columns[12].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
|
||||||
<ColumnDefinition Width="{Binding Columns[13].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
|
||||||
<ColumnDefinition Width="{Binding Columns[14].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
|
||||||
<ColumnDefinition Width="{Binding Columns[15].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
|
||||||
<!-- …add as many as you need… -->
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<!-- Row 0: A single big header across all columns -->
|
|
||||||
<!--TextBlock Grid.Row="0" Grid.ColumnSpan="4" Text="Main Application" HorizontalAlignment="Center" FontWeight="Bold"/ -->
|
|
||||||
|
|
||||||
<!-- Row 1: your “banded” group headers -->
|
|
||||||
<TextBlock Grid.Row="0" Grid.Column="5" Grid.ColumnSpan="2" Text="{x:Static p:Resources.textENIStatus}" HorizontalAlignment="Stretch" TextAlignment="Center" Padding="0,2,0,4" Background="AntiqueWhite" />
|
|
||||||
<TextBlock Grid.Row="0" Grid.Column="7" Grid.ColumnSpan="9" Text="{x:Static p:Resources.textNSWStatus}" HorizontalAlignment="Stretch" TextAlignment="Center" Padding="0,2,0,4" Background="AliceBlue"/>
|
|
||||||
|
|
||||||
<!-- Row 2: the real column headers -->
|
|
||||||
<!-- This invisible filler ensures the layout lines up -->
|
|
||||||
<DataGridColumnHeader x:Name="PART_FillerColumnHeader" Grid.Row="1" Grid.ColumnSpan="14" IsHitTestVisible="False"/>
|
|
||||||
<!-- And here the ItemsPresenter will place each DataGridColumnHeader -->
|
|
||||||
<ItemsPresenter Grid.Row="1" Grid.ColumnSpan="16"/>
|
|
||||||
</Grid>
|
|
||||||
</ControlTemplate>
|
|
||||||
</Setter.Value>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
</DataGrid.Resources>
|
|
||||||
<DataGrid.RowStyle>
|
<DataGrid.RowStyle>
|
||||||
<Style TargetType="DataGridRow">
|
<Style TargetType="DataGridRow">
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
@ -241,51 +151,26 @@ SelectionMode="Extended" AutoGenerateColumns="False" MouseDoubleClick="dataGrid_
|
|||||||
<MultiDataTrigger>
|
<MultiDataTrigger>
|
||||||
<MultiDataTrigger.Conditions>
|
<MultiDataTrigger.Conditions>
|
||||||
<Condition Binding="{Binding Path=Elements, Converter={util:CutoffConverter}, ConverterParameter=0}" Value="True" />
|
<Condition Binding="{Binding Path=Elements, Converter={util:CutoffConverter}, ConverterParameter=0}" Value="True" />
|
||||||
<Condition Binding="{Binding Path=MessageNotificationClass}" Value="{x:Static data:Message+NotificationClass.PASA}" />
|
<Condition Binding="{Binding Path=MessageNotificationClass}" Value="{x:Static data:Message+NotificationClass.PAS}" />
|
||||||
</MultiDataTrigger.Conditions>
|
</MultiDataTrigger.Conditions>
|
||||||
<Setter Property="Background" Value="Yellow" />
|
<Setter Property="Background" Value="Yellow" />
|
||||||
</MultiDataTrigger>
|
</MultiDataTrigger>
|
||||||
<MultiDataTrigger>
|
|
||||||
<MultiDataTrigger.Conditions>
|
|
||||||
<Condition Binding="{Binding Path=Elements, Converter={util:CutoffConverter}, ConverterParameter=0}" Value="True" />
|
|
||||||
<Condition Binding="{Binding Path=MessageNotificationClass}" Value="{x:Static data:Message+NotificationClass.PASD}" />
|
|
||||||
</MultiDataTrigger.Conditions>
|
|
||||||
<Setter Property="Background" Value="Yellow" />
|
|
||||||
</MultiDataTrigger>
|
|
||||||
<DataTrigger Binding="{Binding SendSuccess}" Value="True">
|
|
||||||
<Setter Property="Background" Value="#92F592"></Setter>
|
|
||||||
</DataTrigger>
|
|
||||||
<DataTrigger Binding="{Binding InternalStatus}" Value="UPDATED">
|
|
||||||
<Setter Property="Background" Value="#DFFDDF"></Setter>
|
|
||||||
</DataTrigger>
|
|
||||||
<DataTrigger Binding="{Binding InternalStatus}" Value="TOSEND">
|
|
||||||
<Setter Property="Background" Value="#BFFDBF"></Setter>
|
|
||||||
</DataTrigger>
|
|
||||||
<DataTrigger Binding="{Binding InternalStatus}" Value="SENT">
|
|
||||||
<Setter Property="Background" Value="#BFFDBF"></Setter>
|
|
||||||
</DataTrigger>
|
|
||||||
<DataTrigger Binding="{Binding HasSystemErrors}" Value="True">
|
|
||||||
<Setter Property="Background" Value="MistyRose"></Setter>
|
|
||||||
</DataTrigger>
|
|
||||||
<!--DataTrigger Binding="{Binding HasErrors}" Value="True">
|
|
||||||
<Setter Property="Background" Value="PaleVioletRed"></Setter>
|
|
||||||
</DataTrigger-->
|
|
||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
</DataGrid.RowStyle>
|
</DataGrid.RowStyle>
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
|
|
||||||
<DataGridTemplateColumn Header=" " Width="SizeToCells" IsReadOnly="True">
|
<DataGridTemplateColumn Header=" " Width="SizeToCells" IsReadOnly="True">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<!--Image Source="{Binding src:Util.ImageDict[ENINotificationDetailGroup]}" /-->
|
<!--Image Source="{Binding src:Util.ImageDict[ENINotificationDetailGroup]}" /-->
|
||||||
<!--Image Source="{Binding Source={x:Static src:Util.ImageDict}, Path=[ENINotificationDetailGroup]}"></-->
|
<!--Image Source="{Binding Source={x:Static src:Util.ImageDict}, Path=[ENINotificationDetailGroup]}"></-->
|
||||||
<Image Source="{Binding ENINotificationIconString, Converter={util:NullImageConverter}}" Height="24" />
|
<Image Source="{Binding ENINotificationIconString, Converter={util:NullImageConverter}}" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textNotificationClass}" Binding="{Binding MessageNotificationClassDisplay}" IsReadOnly="True" Width="0.1*" FontWeight="Bold">
|
<DataGridTextColumn Header="{x:Static p:Resources.textNotificationClass}" Binding="{Binding MessageNotificationClassDisplay}"
|
||||||
|
IsReadOnly="True" Width="0.075*" FontWeight="Bold">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="TextBlock">
|
<Style TargetType="TextBlock">
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
@ -293,75 +178,6 @@ SelectionMode="Extended" AutoGenerateColumns="False" MouseDoubleClick="dataGrid_
|
|||||||
</Style>
|
</Style>
|
||||||
</DataGridTextColumn.ElementStyle>
|
</DataGridTextColumn.ElementStyle>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
|
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textStatus}" Binding="{Binding BSMDStatusOverviewDisplay}" IsReadOnly="True" Width="0.1*">
|
|
||||||
<DataGridTextColumn.ElementStyle>
|
|
||||||
<Style TargetType="TextBlock">
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
||||||
</Style>
|
|
||||||
</DataGridTextColumn.ElementStyle>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
|
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textChangedBy}" Binding="{Binding ChangedBy}" IsReadOnly="True" Width="0.2*">
|
|
||||||
<DataGridTextColumn.ElementStyle>
|
|
||||||
<Style TargetType="TextBlock">
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
||||||
</Style>
|
|
||||||
</DataGridTextColumn.ElementStyle>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
|
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textChanged}" Binding="{Binding Changed}" IsReadOnly="True" Width="0.15*">
|
|
||||||
<DataGridTextColumn.ElementStyle>
|
|
||||||
<Style TargetType="TextBlock">
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
||||||
</Style>
|
|
||||||
</DataGridTextColumn.ElementStyle>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
|
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textErrors}" IsReadOnly="True" Width="0.06*" Binding="{Binding ErrorCount}">
|
|
||||||
<DataGridTextColumn.ElementStyle>
|
|
||||||
<Style TargetType="TextBlock">
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
||||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
|
||||||
<Setter Property="FontWeight" Value="DemiBold" />
|
|
||||||
</Style>
|
|
||||||
</DataGridTextColumn.ElementStyle>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
|
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textViolations}" IsReadOnly="True" Width="0.06*" Binding="{Binding ViolationCount}">
|
|
||||||
<DataGridTextColumn.ElementStyle>
|
|
||||||
<Style TargetType="TextBlock">
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
||||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
|
||||||
<Setter Property="FontWeight" Value="DemiBold" />
|
|
||||||
</Style>
|
|
||||||
</DataGridTextColumn.ElementStyle>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
|
|
||||||
<DataGridTextColumn Header="HIS" Binding="{Binding HISOverviewDisplay}" IsReadOnly="True" Width="0.06*">
|
|
||||||
<DataGridTextColumn.ElementStyle>
|
|
||||||
<Style TargetType="TextBlock">
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
||||||
</Style>
|
|
||||||
</DataGridTextColumn.ElementStyle>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
|
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textReceivedAt}" Binding="{Binding ReceivedAt}" IsReadOnly="True" Width="0.15*">
|
|
||||||
<DataGridTextColumn.ElementStyle>
|
|
||||||
<Style TargetType="TextBlock">
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
||||||
</Style>
|
|
||||||
</DataGridTextColumn.ElementStyle>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
|
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textSentBy}" Binding="{Binding SentBy}" IsReadOnly="True" Width="0.1*">
|
|
||||||
<DataGridTextColumn.ElementStyle>
|
|
||||||
<Style TargetType="TextBlock">
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
||||||
</Style>
|
|
||||||
</DataGridTextColumn.ElementStyle>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
|
|
||||||
<DataGridTemplateColumn Header="" Width="SizeToCells" IsReadOnly="True">
|
<DataGridTemplateColumn Header="" Width="SizeToCells" IsReadOnly="True">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
@ -434,7 +250,6 @@ SelectionMode="Extended" AutoGenerateColumns="False" MouseDoubleClick="dataGrid_
|
|||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
|
||||||
<DataGridTemplateColumn Header="" Width="SizeToCells" IsReadOnly="True">
|
<DataGridTemplateColumn Header="" Width="SizeToCells" IsReadOnly="True">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
@ -447,7 +262,41 @@ SelectionMode="Extended" AutoGenerateColumns="False" MouseDoubleClick="dataGrid_
|
|||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textChanged}" Binding="{Binding Changed}" IsReadOnly="True" Width="0.15*">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textReceivedAt}" Binding="{Binding ReceivedAt}" IsReadOnly="True" Width="0.15*">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textStatus}" Binding="{Binding InternalStatus}" IsReadOnly="True" Width="0.1*">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Header="HIS" Binding="{Binding HIS}" IsReadOnly="True" Width="0.1*">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textSentBy}" Binding="{Binding SentBy}" IsReadOnly="True" Width="0.1*">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textStatusInfo}" Binding="{Binding StatusInfo}" IsReadOnly="True" Width="0.2*">
|
<DataGridTextColumn Header="{x:Static p:Resources.textStatusInfo}" Binding="{Binding StatusInfo}" IsReadOnly="True" Width="0.2*">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="TextBlock">
|
<Style TargetType="TextBlock">
|
||||||
@ -455,7 +304,13 @@ SelectionMode="Extended" AutoGenerateColumns="False" MouseDoubleClick="dataGrid_
|
|||||||
</Style>
|
</Style>
|
||||||
</DataGridTextColumn.ElementStyle>
|
</DataGridTextColumn.ElementStyle>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textChangedBy}" Binding="{Binding ChangedBy}" IsReadOnly="True" Width="0.2*">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@ -19,10 +19,6 @@ using System.Collections.Generic;
|
|||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.ComponentModel;
|
|
||||||
using static bsmd.database.Message;
|
|
||||||
using PdfSharp.Fonts;
|
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
namespace ENI2.DetailViewControls
|
namespace ENI2.DetailViewControls
|
||||||
{
|
{
|
||||||
@ -31,9 +27,6 @@ namespace ENI2.DetailViewControls
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class OverViewDetailControl : DetailBaseControl
|
public partial class OverViewDetailControl : DetailBaseControl
|
||||||
{
|
{
|
||||||
|
|
||||||
#region Fields
|
|
||||||
|
|
||||||
private Message _message = null;
|
private Message _message = null;
|
||||||
private Message _ataMessage;
|
private Message _ataMessage;
|
||||||
private Message _atdMessage;
|
private Message _atdMessage;
|
||||||
@ -43,29 +36,21 @@ namespace ENI2.DetailViewControls
|
|||||||
private readonly object _collectionLock = new object();
|
private readonly object _collectionLock = new object();
|
||||||
// private MessageSendStatusDialog mssd = null;
|
// private MessageSendStatusDialog mssd = null;
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Construction
|
|
||||||
|
|
||||||
public OverViewDetailControl()
|
public OverViewDetailControl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
this.Loaded += OverViewDetailControl_Loaded;
|
this.Loaded += OverViewDetailControl_Loaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Initialize
|
|
||||||
|
|
||||||
private void OverViewDetailControl_Loaded(object sender, RoutedEventArgs e)
|
private void OverViewDetailControl_Loaded(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
// die Controls nach Änderungen monitoren
|
// die Controls nach Änderungen monitoren
|
||||||
// diese Einträge gehen auf core
|
// diese Einträge gehen auf core
|
||||||
this.textBoxTicketNo.TextChanged += CoreTextBox_TextChanged;
|
this.RegisterTextboxChange(this.textBoxTicketNo, Message.NotificationClass.ATA);
|
||||||
this.textBoxDisplayId.TextChanged += CoreTextBox_TextChanged;
|
this.RegisterTextboxChange(this.textBoxDisplayId, Message.NotificationClass.ATA);
|
||||||
this.textBoxIMO.TextChanged += CoreTextBox_TextChanged;
|
this.RegisterTextboxChange(this.textBoxIMO, Message.NotificationClass.ATA);
|
||||||
this.textBoxENI.TextChanged += CoreTextBox_TextChanged;
|
this.RegisterTextboxChange(this.textBoxENI, Message.NotificationClass.ATA);
|
||||||
this.locodePoC.PropertyChanged += CoreLocode_LocodeChanged;
|
this.RegisterLocodeChange(this.locodePoC, Message.NotificationClass.ATA);
|
||||||
|
|
||||||
this.RegisterDateTimePickerChange(this.dateTimePickerATA, Message.NotificationClass.ATA);
|
this.RegisterDateTimePickerChange(this.dateTimePickerATA, Message.NotificationClass.ATA);
|
||||||
this.RegisterDateTimePickerChange(this.dateTimePickerATD, Message.NotificationClass.ATD);
|
this.RegisterDateTimePickerChange(this.dateTimePickerATD, Message.NotificationClass.ATD);
|
||||||
@ -73,6 +58,8 @@ namespace ENI2.DetailViewControls
|
|||||||
this.RegisterDateTimePickerChange(this.dateTimePickerETD, Message.NotificationClass.NOA_NOD);
|
this.RegisterDateTimePickerChange(this.dateTimePickerETD, Message.NotificationClass.NOA_NOD);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region Initialize
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
bool iAmAdmin = DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].IsAdmin;
|
bool iAmAdmin = DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].IsAdmin;
|
||||||
@ -199,6 +186,12 @@ namespace ENI2.DetailViewControls
|
|||||||
pasdMessage = aMessage;
|
pasdMessage = aMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// XXX : TODO remove this
|
||||||
|
|
||||||
|
this.Messages.Remove(crewdMessage);
|
||||||
|
this.Messages.Remove(pasdMessage);
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region init ATA
|
#region init ATA
|
||||||
@ -318,8 +311,6 @@ namespace ENI2.DetailViewControls
|
|||||||
BindingOperations.EnableCollectionSynchronization(this.Messages, _collectionLock);
|
BindingOperations.EnableCollectionSynchronization(this.Messages, _collectionLock);
|
||||||
this.dataGridMessages.ItemsSource = this.Messages;
|
this.dataGridMessages.ItemsSource = this.Messages;
|
||||||
|
|
||||||
this.OnRequestValidate(false);
|
|
||||||
|
|
||||||
base.Initialize(); // wenn Meldeklassen erst bei der Init. erzeugt werden, fehlen die Handler, die hier erneut festgelegt werden
|
base.Initialize(); // wenn Meldeklassen erst bei der Init. erzeugt werden, fehlen die Handler, die hier erneut festgelegt werden
|
||||||
this._initialized = true;
|
this._initialized = true;
|
||||||
}
|
}
|
||||||
@ -357,9 +348,6 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
this.buttonExcelImport.IsEnabled = !this.Core.DisplayId.IsNullOrEmpty();
|
this.buttonExcelImport.IsEnabled = !this.Core.DisplayId.IsNullOrEmpty();
|
||||||
|
|
||||||
this.dataGridMessages.ItemsSource = null;
|
|
||||||
this.dataGridMessages.ItemsSource = this.Messages;
|
|
||||||
|
|
||||||
//MessageBox.Show(string.Format("Visit/Transit ID updated: {0}", this.Core.DisplayId));
|
//MessageBox.Show(string.Format("Visit/Transit ID updated: {0}", this.Core.DisplayId));
|
||||||
//ShowIdDialog sid = new ShowIdDialog(this.Core)
|
//ShowIdDialog sid = new ShowIdDialog(this.Core)
|
||||||
//{
|
//{
|
||||||
@ -436,16 +424,9 @@ namespace ENI2.DetailViewControls
|
|||||||
{
|
{
|
||||||
MessageBoxResult result = MessageBox.Show(Properties.Resources.textConfirmSend, Properties.Resources.textConfirm, MessageBoxButton.YesNo, MessageBoxImage.Question);
|
MessageBoxResult result = MessageBox.Show(Properties.Resources.textConfirmSend, Properties.Resources.textConfirm, MessageBoxButton.YesNo, MessageBoxImage.Question);
|
||||||
if (result == MessageBoxResult.Yes)
|
if (result == MessageBoxResult.Yes)
|
||||||
{
|
|
||||||
this.SendMessages(this.dataGridMessages.SelectedItems.Cast<Message>());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SendMessages(IEnumerable<Message> messages)
|
|
||||||
{
|
{
|
||||||
bool somethingsNotSaved = false;
|
bool somethingsNotSaved = false;
|
||||||
|
foreach (Message selectedMessage in this.dataGridMessages.SelectedItems)
|
||||||
foreach (Message selectedMessage in messages)
|
|
||||||
{
|
{
|
||||||
if (selectedMessage.IsDirty) somethingsNotSaved = true;
|
if (selectedMessage.IsDirty) somethingsNotSaved = true;
|
||||||
}
|
}
|
||||||
@ -457,7 +438,7 @@ namespace ENI2.DetailViewControls
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<Message> watchList = new List<Message>();
|
List<Message> watchList = new List<Message>();
|
||||||
foreach (Message selectedMessage in messages)
|
foreach (Message selectedMessage in this.dataGridMessages.SelectedItems)
|
||||||
{
|
{
|
||||||
if (selectedMessage.Reset) selectedMessage.Reset = false; // "nochmal" Versenden ist möglich
|
if (selectedMessage.Reset) selectedMessage.Reset = false; // "nochmal" Versenden ist möglich
|
||||||
selectedMessage.InternalStatus = Message.BSMDStatus.TOSEND;
|
selectedMessage.InternalStatus = Message.BSMDStatus.TOSEND;
|
||||||
@ -480,6 +461,7 @@ namespace ENI2.DetailViewControls
|
|||||||
this.OnRequestSendValidation();
|
this.OnRequestSendValidation();
|
||||||
this.dataGridMessages.Items.Refresh();
|
this.dataGridMessages.Items.Refresh();
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (this.mssd == null)
|
if (this.mssd == null)
|
||||||
{
|
{
|
||||||
@ -501,6 +483,7 @@ namespace ENI2.DetailViewControls
|
|||||||
this.mssd.AddMessages(watchList);
|
this.mssd.AddMessages(watchList);
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void contextResetMessage(object sender, RoutedEventArgs e)
|
private void contextResetMessage(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
@ -587,12 +570,6 @@ namespace ENI2.DetailViewControls
|
|||||||
Util.UIHelper.SetBusyState();
|
Util.UIHelper.SetBusyState();
|
||||||
ReportManager rm = new ReportManager();
|
ReportManager rm = new ReportManager();
|
||||||
|
|
||||||
// TODO!!
|
|
||||||
// https://docs.pdfsharp.net/PDFsharp/Topics/Fonts/Font-Resolving.html
|
|
||||||
// https://docs.pdfsharp.net/MigraDoc/DOM/Document/MigraDocSettings.html
|
|
||||||
GlobalFontSettings.UseWindowsFontsUnderWindows = true;
|
|
||||||
GlobalFontSettings.UseWindowsFontsUnderWsl2 = true;
|
|
||||||
|
|
||||||
// create PDF from message classes
|
// create PDF from message classes
|
||||||
if (rm.Create(sfd.FileName, this.Core, sicd.SelectedClasses, out string importResultText))
|
if (rm.Create(sfd.FileName, this.Core, sicd.SelectedClasses, out string importResultText))
|
||||||
{
|
{
|
||||||
@ -633,16 +610,6 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
#region event handler
|
#region event handler
|
||||||
|
|
||||||
private void CoreLocode_LocodeChanged(object sender, PropertyChangedEventArgs e)
|
|
||||||
{
|
|
||||||
this.OnNotificationClassChanged(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CoreTextBox_TextChanged(object sender, TextChangedEventArgs e)
|
|
||||||
{
|
|
||||||
this.OnNotificationClassChanged(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void _checkStatusTimer_Elapsed(object sender, ElapsedEventArgs e)
|
private void _checkStatusTimer_Elapsed(object sender, ElapsedEventArgs e)
|
||||||
{
|
{
|
||||||
bool? statusFlag = DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).GetMessageCoreQueryStatusFlag(this.Core.Id.Value);
|
bool? statusFlag = DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).GetMessageCoreQueryStatusFlag(this.Core.Id.Value);
|
||||||
@ -751,7 +718,7 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
private void buttonValidate_Click(object sender, RoutedEventArgs e)
|
private void buttonValidate_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
this.OnRequestValidate(true);
|
this.OnRequestValidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -781,7 +748,7 @@ namespace ENI2.DetailViewControls
|
|||||||
this.OnRequestReload(this.Core.Id.Value);
|
this.OnRequestReload(this.Core.Id.Value);
|
||||||
|
|
||||||
// validate all selected import classes (Finger with "selection")
|
// validate all selected import classes (Finger with "selection")
|
||||||
this.OnRequestValidate(true);
|
this.OnRequestValidate();
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -835,71 +802,15 @@ namespace ENI2.DetailViewControls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buttonSendAll_Click(object sender, RoutedEventArgs e)
|
#endregion
|
||||||
{
|
|
||||||
SelectImportClassesDialog sicd = new SelectImportClassesDialog();
|
|
||||||
List<Message.NotificationClass> readyToSendMessages = new List<Message.NotificationClass>();
|
|
||||||
|
|
||||||
// Evaluate a number of criteria for messages that should not be preselected for sending
|
#region mouse wheel
|
||||||
bool addToSend;
|
|
||||||
foreach (Message message in this.Messages)
|
|
||||||
{
|
|
||||||
addToSend = true;
|
|
||||||
|
|
||||||
// if ((message.ErrorCount ?? 0) > 0) continue; // skip selection if there are any errors left
|
private void ScrollViewer_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
|
||||||
|
|
||||||
switch(message.MessageNotificationClass)
|
|
||||||
{
|
{
|
||||||
case NotificationClass.HAZA:
|
ScrollViewer scv = (ScrollViewer)sender;
|
||||||
addToSend = XtraSendLogic.ShouldSendMessage(message); break;
|
scv.ScrollToVerticalOffset(scv.VerticalOffset - e.Delta);
|
||||||
case NotificationClass.HAZD:
|
e.Handled = true;
|
||||||
addToSend = XtraSendLogic.ShouldSendMessage(message); break;
|
|
||||||
case NotificationClass.BPOL:
|
|
||||||
if (message.Elements.Count > 0)
|
|
||||||
{
|
|
||||||
if (message.Elements[0] is BPOL bpol)
|
|
||||||
{
|
|
||||||
if (bpol.PortOfItineraries.Count == 0) addToSend = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case NotificationClass.WAS_RCPT:
|
|
||||||
addToSend = false;
|
|
||||||
break;
|
|
||||||
case NotificationClass.INFO:
|
|
||||||
if (Core.PoC == "DEHAM") addToSend = false;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
if(Message.IsListClass(message.MessageNotificationClass) && (message.Elements.Count == 0)) addToSend = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(addToSend)
|
|
||||||
readyToSendMessages.Add(message.MessageNotificationClass);
|
|
||||||
}
|
|
||||||
|
|
||||||
sicd.Messages = this.Messages;
|
|
||||||
sicd.PreselectedClasses.AddRange(readyToSendMessages);
|
|
||||||
sicd.IsTransit = this.Core.IsTransit;
|
|
||||||
sicd.IsImportMode = false;
|
|
||||||
|
|
||||||
if ((sicd.ShowDialog() ?? false) && (sicd.SelectedClasses.Count > 0))
|
|
||||||
{
|
|
||||||
// now send all selected messages
|
|
||||||
List<Message> toSendMessages = new List<Message>();
|
|
||||||
foreach(NotificationClass notificationClass in sicd.SelectedClasses)
|
|
||||||
{
|
|
||||||
Message selectedMessage = this.Messages.Find(x => x.MessageNotificationClass == notificationClass);
|
|
||||||
if (selectedMessage != null)
|
|
||||||
{
|
|
||||||
toSendMessages.Add(selectedMessage);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (toSendMessages.Count > 0)
|
|
||||||
{
|
|
||||||
this.SendMessages(toSendMessages);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@ -18,13 +18,13 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
private Message _pre72hMessage;
|
private Message _pre72hMessage;
|
||||||
|
|
||||||
private static readonly string[] hullConfiguration = {
|
private static string[] hullConfiguration = {
|
||||||
Properties.Resources.textSingleHull,
|
Properties.Resources.textSingleHull,
|
||||||
Properties.Resources.textSingleHullBallast,
|
Properties.Resources.textSingleHullBallast,
|
||||||
Properties.Resources.textDoubleHull
|
Properties.Resources.textDoubleHull
|
||||||
};
|
};
|
||||||
|
|
||||||
private static readonly string[] conditionCargoTanks =
|
private static string[] conditionCargoTanks =
|
||||||
{
|
{
|
||||||
Properties.Resources.textFull,
|
Properties.Resources.textFull,
|
||||||
Properties.Resources.textEmpty,
|
Properties.Resources.textEmpty,
|
||||||
@ -118,6 +118,17 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region mouse wheel
|
||||||
|
|
||||||
|
private void ScrollViewer_PreviewMouseWheel(object sender, System.Windows.Input.MouseWheelEventArgs e)
|
||||||
|
{
|
||||||
|
ScrollViewer scv = (ScrollViewer)sender;
|
||||||
|
scv.ScrollToVerticalOffset(scv.VerticalOffset - e.Delta);
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="600" d:DesignWidth="800">
|
d:DesignHeight="600" d:DesignWidth="800">
|
||||||
<GroupBox Name="portCallGroupBox" Header="{x:Static p:Resources.textPortCall}">
|
<GroupBox Name="portCallGroupBox" Header="{x:Static p:Resources.textPortCall}">
|
||||||
<ScrollViewer>
|
<ScrollViewer PreviewMouseWheel="ScrollViewer_PreviewMouseWheel">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="300" />
|
<RowDefinition Height="300" />
|
||||||
@ -92,9 +92,8 @@
|
|||||||
<Label HorizontalContentAlignment="Right" Grid.Row="6" Grid.Column="0" Content="{x:Static p:Resources.textPhone}" Name="label_AgentPhone" Margin="0,0,10,0"/>
|
<Label HorizontalContentAlignment="Right" Grid.Row="6" Grid.Column="0" Content="{x:Static p:Resources.textPhone}" Name="label_AgentPhone" Margin="0,0,10,0"/>
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="7" Grid.Column="0" Content="{x:Static p:Resources.textEMail}" Name="label_AgentEMail" Margin="0,0,10,0" />
|
<Label HorizontalContentAlignment="Right" Grid.Row="7" Grid.Column="0" Content="{x:Static p:Resources.textEMail}" Name="label_AgentEMail" Margin="0,0,10,0" />
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="2" Content="{x:Static p:Resources.textCity}" Name="label_AgentCity" Margin="0,0,10,0" />
|
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="2" Content="{x:Static p:Resources.textCity}" Name="label_AgentCity" Margin="0,0,10,0" />
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="5" Grid.Column="2" Content="{x:Static p:Resources.textFirstName}" Name="label_AgentFirstName" Margin="0,0,10,0"/>
|
<Label HorizontalContentAlignment="Right" Grid.Row="6" Grid.Column="2" Content="{x:Static p:Resources.textFirstName}" Name="label_AgentFirstName" Margin="0,0,10,0"/>
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="6" Grid.Column="2" Content="{x:Static p:Resources.textFax}" Name="label_AgentFax" Margin="0,0,10,0"/>
|
<Label HorizontalContentAlignment="Right" Grid.Row="7" Grid.Column="2" Content="{x:Static p:Resources.textFax}" Name="label_AgentFax" Margin="0,0,10,0"/>
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="7" Grid.Column="2" Content="{x:Static p:Resources.textWasteDisposalServiceProvider}" Margin="0,0,10,0" />
|
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textCountry}" Name="label_AgentCountry" Margin="0,0,10,0"/>
|
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textCountry}" Name="label_AgentCountry" Margin="0,0,10,0"/>
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="2" Content="{x:Static p:Resources.textAgentTemplate}" Name="labelAgentTemplate" Margin="0,0,10,0"/>
|
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="2" Content="{x:Static p:Resources.textAgentTemplate}" Name="labelAgentTemplate" Margin="0,0,10,0"/>
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="2" Content="{x:Static p:Resources.textTitle}" Name="labelAgentTemplateTitle" Margin="0,0,10,0" Visibility="Hidden" />
|
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="2" Content="{x:Static p:Resources.textTitle}" Name="labelAgentTemplateTitle" Margin="0,0,10,0" Visibility="Hidden" />
|
||||||
@ -105,11 +104,10 @@
|
|||||||
<TextBox Grid.Row="3" Grid.Column="3" Name="textBox_AgentCity" MaxLength="99" Margin="2" Text="{Binding AgentCity, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
<TextBox Grid.Row="3" Grid.Column="3" Name="textBox_AgentCity" MaxLength="99" Margin="2" Text="{Binding AgentCity, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
||||||
<TextBox Grid.Row="3" Grid.Column="1" Name="textBox_AgentCountry" MaxLength="99" Margin="2" Text="{Binding AgentCountry, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center" />
|
<TextBox Grid.Row="3" Grid.Column="1" Name="textBox_AgentCountry" MaxLength="99" Margin="2" Text="{Binding AgentCountry, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center" />
|
||||||
<TextBox Grid.Row="5" Grid.Column="1" Name="textBox_AgentLastName" MaxLength="99" Margin="2" Text="{Binding AgentLastName, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
<TextBox Grid.Row="5" Grid.Column="1" Name="textBox_AgentLastName" MaxLength="99" Margin="2" Text="{Binding AgentLastName, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
||||||
<TextBox Grid.Row="5" Grid.Column="3" Name="textBox_AgentFirstName" MaxLength="99" Margin="2" Text="{Binding AgentFirstName, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
<TextBox Grid.Row="6" Grid.Column="3" Name="textBox_AgentFirstName" MaxLength="99" Margin="2" Text="{Binding AgentFirstName, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
||||||
<TextBox Grid.Row="6" Grid.Column="1" Name="textBox_AgentPhone" MaxLength="99" Margin="2" Text="{Binding AgentPhone, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
<TextBox Grid.Row="6" Grid.Column="1" Name="textBox_AgentPhone" MaxLength="99" Margin="2" Text="{Binding AgentPhone, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
||||||
<TextBox Grid.Row="6" Grid.Column="3" Name="textBox_AgentFax" MaxLength="99" Margin="2" Text="{Binding AgentFax, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
<TextBox Grid.Row="7" Grid.Column="3" Name="textBox_AgentFax" MaxLength="99" Margin="2" Text="{Binding AgentFax, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
||||||
<TextBox Grid.Row="7" Grid.Column="1" Name="textBox_AgentEMail" MaxLength="99" Margin="2" Text="{Binding AgentEMail, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
<TextBox Grid.Row="7" Grid.Column="1" Name="textBox_AgentEMail" MaxLength="99" Margin="2" Text="{Binding AgentEMail, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
||||||
<TextBox Grid.Row="7" Grid.Column="3" Name="textBox_WasteDisposalServiceProvider" MaxLength="99" Margin="2" Text="{Binding WasteDisposalServiceProviderText, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
|
||||||
|
|
||||||
<ComboBox Grid.Row="0" Grid.Column="3" Name="comboBox_AgentTemplate" Margin="2" SelectedValuePath="Id" DisplayMemberPath="AgentTitle" SelectionChanged="comboBox_AgentTemplate_SelectionChanged" />
|
<ComboBox Grid.Row="0" Grid.Column="3" Name="comboBox_AgentTemplate" Margin="2" SelectedValuePath="Id" DisplayMemberPath="AgentTitle" SelectionChanged="comboBox_AgentTemplate_SelectionChanged" />
|
||||||
<Grid Grid.Column="2" Grid.Row="1" HorizontalAlignment="Right">
|
<Grid Grid.Column="2" Grid.Row="1" HorizontalAlignment="Right">
|
||||||
|
|||||||
@ -25,7 +25,6 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
private NOA_NOD _noa_nod;
|
private NOA_NOD _noa_nod;
|
||||||
private AGNT _agnt;
|
private AGNT _agnt;
|
||||||
private WAS _was;
|
|
||||||
private static List<AGNT_Template> _agntTemplates = null;
|
private static List<AGNT_Template> _agntTemplates = null;
|
||||||
private AGNT_Template _currentTemplate;
|
private AGNT_Template _currentTemplate;
|
||||||
private AGNT_Template _undoTemplate;
|
private AGNT_Template _undoTemplate;
|
||||||
@ -69,14 +68,11 @@ namespace ENI2.DetailViewControls
|
|||||||
this.RegisterTextboxChange(this.textBox_AgentStreetAndNumber, Message.NotificationClass.AGNT);
|
this.RegisterTextboxChange(this.textBox_AgentStreetAndNumber, Message.NotificationClass.AGNT);
|
||||||
this.RegisterTextboxChange(this.textBox_AgentCountry, Message.NotificationClass.AGNT);
|
this.RegisterTextboxChange(this.textBox_AgentCountry, Message.NotificationClass.AGNT);
|
||||||
|
|
||||||
// WAS
|
|
||||||
this.RegisterTextboxChange(this.textBox_WasteDisposalServiceProvider, Message.NotificationClass.WAS);
|
|
||||||
|
|
||||||
this.buttonSaveTemplate.IsEnabled = DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].IsEditor;
|
this.buttonSaveTemplate.IsEnabled = DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].IsEditor;
|
||||||
this.buttonDeleteTemplate.IsEnabled = DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].IsEditor;
|
this.buttonDeleteTemplate.IsEnabled = DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].IsEditor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
|
|
||||||
@ -99,16 +95,6 @@ namespace ENI2.DetailViewControls
|
|||||||
_agnt = new AGNT();
|
_agnt = new AGNT();
|
||||||
this.ControlMessages.Add(aMessage);
|
this.ControlMessages.Add(aMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(aMessage.MessageNotificationClass == Message.NotificationClass.WAS)
|
|
||||||
{
|
|
||||||
if (aMessage.Elements.Count > 0)
|
|
||||||
_was = aMessage.Elements[0] as WAS;
|
|
||||||
else
|
|
||||||
_was = new WAS();
|
|
||||||
this.ControlMessages.Add(aMessage);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.dateTimePicker_ETAToKielCanal.IsEnabled = this.Core.IsTransit;
|
this.dateTimePicker_ETAToKielCanal.IsEnabled = this.Core.IsTransit;
|
||||||
@ -137,13 +123,11 @@ namespace ENI2.DetailViewControls
|
|||||||
this.dateTimePicker_ETDFromLastPort.DataContext = _noa_nod;
|
this.dateTimePicker_ETDFromLastPort.DataContext = _noa_nod;
|
||||||
this.dateTimePicker_ETDFromPortOfCall.DataContext = _noa_nod;
|
this.dateTimePicker_ETDFromPortOfCall.DataContext = _noa_nod;
|
||||||
|
|
||||||
this.textBox_WasteDisposalServiceProvider.DataContext = _was;
|
|
||||||
|
|
||||||
this.checkBox_IsAnchored.IsEnabled = this.Core.IsDK;
|
this.checkBox_IsAnchored.IsEnabled = this.Core.IsDK;
|
||||||
|
|
||||||
if(_agntTemplates == null)
|
if(_agntTemplates == null)
|
||||||
{
|
{
|
||||||
_agntTemplates = await DBManagerAsync.GetAGNTTemplatesAsync(); // inital full load
|
_agntTemplates = DBManager.Instance.GetAGNTTemplates(); // inital full load
|
||||||
_agntTemplates.Sort();
|
_agntTemplates.Sort();
|
||||||
Trace.WriteLine(string.Format("{0} agent templates loaded", _agntTemplates.Count));
|
Trace.WriteLine(string.Format("{0} agent templates loaded", _agntTemplates.Count));
|
||||||
}
|
}
|
||||||
@ -258,6 +242,17 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region mouse wheel
|
||||||
|
|
||||||
|
private void ScrollViewer_PreviewMouseWheel(object sender, System.Windows.Input.MouseWheelEventArgs e)
|
||||||
|
{
|
||||||
|
ScrollViewer scv = (ScrollViewer)sender;
|
||||||
|
scv.ScrollToVerticalOffset(scv.VerticalOffset - e.Delta);
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region AGNT templates combo
|
#region AGNT templates combo
|
||||||
|
|
||||||
private void comboBox_AgentTemplate_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void comboBox_AgentTemplate_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
@ -353,8 +348,6 @@ namespace ENI2.DetailViewControls
|
|||||||
this.textBox_AgentPostalCode.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
this.textBox_AgentPostalCode.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
||||||
this.textBox_AgentStreetAndNumber.Text = this._undoTemplate.AgentStreetAndNumber;
|
this.textBox_AgentStreetAndNumber.Text = this._undoTemplate.AgentStreetAndNumber;
|
||||||
this.textBox_AgentStreetAndNumber.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
this.textBox_AgentStreetAndNumber.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
||||||
this.textBox_WasteDisposalServiceProvider.Text = this._undoTemplate.WasteDisposalServiceProviderName;
|
|
||||||
this.textBox_WasteDisposalServiceProvider.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
|
||||||
|
|
||||||
this.buttonUndoTemplate.IsEnabled = false; // can't undo after undo
|
this.buttonUndoTemplate.IsEnabled = false; // can't undo after undo
|
||||||
}
|
}
|
||||||
@ -363,13 +356,6 @@ namespace ENI2.DetailViewControls
|
|||||||
{
|
{
|
||||||
if (this._currentTemplate == null) return;
|
if (this._currentTemplate == null) return;
|
||||||
|
|
||||||
// confirm overwrite of waste disposal service provider
|
|
||||||
if (this.textBox_WasteDisposalServiceProvider.Text.Length > 0)
|
|
||||||
{
|
|
||||||
string message = string.Format(Properties.Resources.textConfirmWSDPOverwrite, this.textBox_WasteDisposalServiceProvider.Text, this._currentTemplate.WasteDisposalServiceProviderName);
|
|
||||||
if (MessageBox.Show(message, Properties.Resources.textConfirmation, MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.No) { return; }
|
|
||||||
}
|
|
||||||
|
|
||||||
this._undoTemplate = createFromCurrentText(null, null);
|
this._undoTemplate = createFromCurrentText(null, null);
|
||||||
|
|
||||||
this.textBox_AgentCity.Text = this._currentTemplate.AgentCity;
|
this.textBox_AgentCity.Text = this._currentTemplate.AgentCity;
|
||||||
@ -381,7 +367,7 @@ namespace ENI2.DetailViewControls
|
|||||||
this.textBox_AgentEMail.Text = this._currentTemplate.AgentEMail;
|
this.textBox_AgentEMail.Text = this._currentTemplate.AgentEMail;
|
||||||
this.textBox_AgentEMail.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
this.textBox_AgentEMail.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
||||||
this.textBox_AgentFax.Text = this._currentTemplate.AgentFax;
|
this.textBox_AgentFax.Text = this._currentTemplate.AgentFax;
|
||||||
this.textBox_AgentFax.GetBindingExpression (TextBox.TextProperty).UpdateSource();
|
this.textBox_AgentEMail.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
||||||
this.textBox_AgentFirstName.Text = this._currentTemplate.AgentFirstName;
|
this.textBox_AgentFirstName.Text = this._currentTemplate.AgentFirstName;
|
||||||
this.textBox_AgentFirstName.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
this.textBox_AgentFirstName.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
||||||
this.textBox_AgentLastName.Text = this._currentTemplate.AgentLastName;
|
this.textBox_AgentLastName.Text = this._currentTemplate.AgentLastName;
|
||||||
@ -392,11 +378,6 @@ namespace ENI2.DetailViewControls
|
|||||||
this.textBox_AgentPostalCode.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
this.textBox_AgentPostalCode.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
||||||
this.textBox_AgentStreetAndNumber.Text = this._currentTemplate.AgentStreetAndNumber;
|
this.textBox_AgentStreetAndNumber.Text = this._currentTemplate.AgentStreetAndNumber;
|
||||||
this.textBox_AgentStreetAndNumber.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
this.textBox_AgentStreetAndNumber.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
||||||
if ((this._currentTemplate.WasteDisposalServiceProviderName ?? "").Trim() != (this.textBox_WasteDisposalServiceProvider.Text ?? "").Trim())
|
|
||||||
{
|
|
||||||
this.textBox_WasteDisposalServiceProvider.Text = this._currentTemplate.WasteDisposalServiceProviderName;
|
|
||||||
this.textBox_WasteDisposalServiceProvider.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.buttonUndoTemplate.IsEnabled = true;
|
this.buttonUndoTemplate.IsEnabled = true;
|
||||||
this.buttonSetTemplate.IsEnabled = false;
|
this.buttonSetTemplate.IsEnabled = false;
|
||||||
@ -422,7 +403,6 @@ namespace ENI2.DetailViewControls
|
|||||||
at.AgentPhone = this.textBox_AgentPhone.Text;
|
at.AgentPhone = this.textBox_AgentPhone.Text;
|
||||||
at.AgentPostalCode = this.textBox_AgentPostalCode.Text;
|
at.AgentPostalCode = this.textBox_AgentPostalCode.Text;
|
||||||
at.AgentStreetAndNumber = textBox_AgentStreetAndNumber.Text;
|
at.AgentStreetAndNumber = textBox_AgentStreetAndNumber.Text;
|
||||||
at.WasteDisposalServiceProviderName = textBox_WasteDisposalServiceProvider.Text;
|
|
||||||
|
|
||||||
return at;
|
return at;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,16 +19,14 @@
|
|||||||
<col:DictionaryEntry Key="SeaGo BHV" Value="2" />
|
<col:DictionaryEntry Key="SeaGo BHV" Value="2" />
|
||||||
<col:DictionaryEntry Key="SeaGo WHV" Value="4" />
|
<col:DictionaryEntry Key="SeaGo WHV" Value="4" />
|
||||||
<col:DictionaryEntry Key="Hoegh BHV" Value="8" />
|
<col:DictionaryEntry Key="Hoegh BHV" Value="8" />
|
||||||
<col:DictionaryEntry Key="Elbe Bulk" Value="16" />
|
|
||||||
<col:DictionaryEntry Key="Fct Junge" Value="32" />
|
|
||||||
</col:ArrayList>
|
</col:ArrayList>
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
<GroupBox Name="portNotificationGroupBox" Header="{x:Static p:Resources.textPortNotification}">
|
<GroupBox Name="portNotificationGroupBox" Header="{x:Static p:Resources.textPortNotification}">
|
||||||
<ScrollViewer>
|
<ScrollViewer PreviewMouseWheel="ScrollViewer_PreviewMouseWheel">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="50" />
|
<RowDefinition Height="50" />
|
||||||
<RowDefinition Height="194" />
|
<RowDefinition Height="220" />
|
||||||
<RowDefinition Height="200" />
|
<RowDefinition Height="200" />
|
||||||
<RowDefinition Height="200" />
|
<RowDefinition Height="200" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
@ -36,12 +34,10 @@
|
|||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*" />
|
<ColumnDefinition Width="1*" />
|
||||||
<ColumnDefinition Width="4*" />
|
<ColumnDefinition Width="5*" />
|
||||||
<ColumnDefinition Width="1*" />
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textNameMaster}" Name="label_nameMaster" Margin="0,0,10,0"/>
|
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textNameMaster}" Name="label_nameMaster" Margin="0,0,10,0"/>
|
||||||
<TextBox Grid.Row="0" Grid.Column="1" Name="textBox_NameMaster" MaxLength="100" Margin="2" Text="{Binding NameOfMaster, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center" VerticalAlignment="Center"/>
|
<TextBox Grid.Row="0" Grid.Column="1" Name="textBox_NameMaster" MaxLength="100" Margin="2" Text="{Binding NameOfMaster, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center" VerticalAlignment="Center"/>
|
||||||
<Button x:Name="buttonCopyNameFromCREWA" Grid.Row="0" Grid.Column="2" Margin="2" Content="{x:Static p:Resources.textCopyFromCREWA}" Click="buttonCopyNameFromCREWA_Click"/>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
<GroupBox Name="infoGroupBox" Header="{x:Static p:Resources.textInfo}" Grid.Row="1" Margin="0,5,0,5">
|
<GroupBox Name="infoGroupBox" Header="{x:Static p:Resources.textInfo}" Grid.Row="1" Margin="0,5,0,5">
|
||||||
@ -59,84 +55,32 @@
|
|||||||
<RowDefinition Height="26" />
|
<RowDefinition Height="26" />
|
||||||
<RowDefinition Height="26" />
|
<RowDefinition Height="26" />
|
||||||
<RowDefinition Height="26" />
|
<RowDefinition Height="26" />
|
||||||
|
<RowDefinition Height="26" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textShippingArea}" Name="label_INFOShippingArea" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textShippingArea}" Name="label_INFOShippingArea" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="2" Content="{x:Static p:Resources.textMaerskSeago}" Name="label_MaerskSeaGo" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textPortArea}" Name="label_INFOPortArea" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textPortArea}" Name="label_INFOPortArea" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||||
|
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textRequestedPositionInPortOfCall}" Name="label_INFORequestedBerth" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
<Label HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textRequestedPositionInPortOfCall}" Name="label_INFORequestedBerth" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textBowThrusterPower}" Name="label_INFOBowThrusterPower" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textBowThrusterPower}" Name="label_INFOBowThrusterPower" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textSternThrusterPower}" Name="label_INFOSternThrusterPower" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
<Label HorizontalContentAlignment="Right" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textSternThrusterPower}" Name="label_INFOSternThrusterPower" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textFumigatedBulkCargo}" Name="label_INFOFumigatedBulkCargo" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
<Label HorizontalContentAlignment="Right" Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textFumigatedBulkCargo}" Name="label_INFOFumigatedBulkCargo" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="2" Content="{x:Static p:Resources.textDeplacementSummerDraught}" Name="label_INFODeplacementSummerDraught" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
<Label HorizontalContentAlignment="Right" Grid.Row="6" Grid.Column="0" Content="{x:Static p:Resources.textDeplacementSummerDraught}" Name="label_INFODeplacementSummerDraught" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="2" Content="{x:Static p:Resources.textSpecialRequirementsOfShipAtBerth}" Name="label_INFOSpecialRequirements" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
<Label HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="2" Content="{x:Static p:Resources.textSpecialRequirementsOfShipAtBerth}" Name="label_INFOSpecialRequirements" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="2" Content="{x:Static p:Resources.textConstructionCharacteristics}" Name="label_INFOConstructionCharacteristics" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
<Label HorizontalContentAlignment="Right" Grid.Row="4" Grid.Column="2" Content="{x:Static p:Resources.textConstructionCharacteristics}" Name="label_INFOConstructionCharacteristics" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||||
<ComboBox Grid.Row="0" Grid.Column="1" x:Name="comboBoxShippingArea" Margin="2" SelectedIndex="{Binding ShippingArea, Converter={util:ByteConverter}}" ContextMenu="{DynamicResource ClearContextMenu}" />
|
<ComboBox Grid.Row="0" Grid.Column="1" x:Name="comboBoxShippingArea" Margin="2" SelectedIndex="{Binding ShippingArea, Converter={util:ByteConverter}}" ContextMenu="{DynamicResource ClearContextMenu}" />
|
||||||
|
<ComboBox Grid.Row="0" Grid.Column="3" x:Name="comboBoxGroup" Margin="0,2,4,2" ItemsSource="{StaticResource arrList}" DisplayMemberPath="Key" SelectedValuePath="Value" SelectionChanged="comboBoxGroup_SelectionChanged"/>
|
||||||
<Grid Grid.Row="1" Grid.Column="1">
|
<ComboBox Grid.Row="1" Grid.Column="1" Name="comboBoxPortArea" Margin="2" SelectedValue="{Binding PortArea}" SelectedValuePath="Key" DisplayMemberPath="Value" ContextMenu="{DynamicResource ClearContextMenu}" />
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
<ColumnDefinition Width="110" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<ComboBox Grid.Column="0" Name="comboBoxPortArea" Margin="2" SelectedValue="{Binding PortArea}" SelectedValuePath="Key" DisplayMemberPath="Value" ContextMenu="{DynamicResource ClearContextMenu}" />
|
|
||||||
<Button Grid.Column="1" x:Name="buttonSearchPortArea" Margin="2" Content="Lookup port area" Click="buttonSearchPortArea_Click" />
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<TextBox Grid.Row="2" Grid.Column="1" Name="textRequestedPostionInPortOfCall" Margin="2" Text="{Binding RequestedPositionInPortOfCall, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
<TextBox Grid.Row="2" Grid.Column="1" Name="textRequestedPostionInPortOfCall" Margin="2" Text="{Binding RequestedPositionInPortOfCall, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
||||||
<TextBox Grid.Row="3" Grid.Column="1" Name="textBowThrusterPower" Margin="2" Text="{Binding BowThrusterPower, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
<TextBox Grid.Row="3" Grid.Column="1" Name="textBowThrusterPower" Margin="2" Text="{Binding BowThrusterPower, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
||||||
<TextBox Grid.Row="4" Grid.Column="1" Name="textSternThrusterPower" Margin="2" Text="{Binding SternThrusterPower, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
<TextBox Grid.Row="4" Grid.Column="1" Name="textSternThrusterPower" Margin="2" Text="{Binding SternThrusterPower, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
||||||
<CheckBox Grid.Row="5" Grid.Column="1" Name="checkBoxFumigatedBulkCargo" VerticalContentAlignment="Center" IsChecked="{Binding FumigatedBulkCargoBool, Mode=TwoWay}" Margin="2"/>
|
<CheckBox Grid.Row="5" Grid.Column="1" Name="checkBoxFumigatedBulkCargo" VerticalContentAlignment="Center" IsChecked="{Binding FumigatedBulkCargoBool, Mode=TwoWay}" Margin="2"/>
|
||||||
<xctk:DoubleUpDown Grid.Row="0" Grid.Column="3" Name="doubleUpDownDisplacementSummerDraught" ShowButtonSpinner="False" ParsingNumberStyle="Any" Value="{Binding DeplacementSummerDraught_TNE}" Margin="4,2,0,2" FormatString="N1" TextAlignment="Left"/>
|
<xctk:DoubleUpDown Grid.Row="6" Grid.Column="1" Name="doubleUpDownDisplacementSummerDraught" ShowButtonSpinner="False" ParsingNumberStyle="Any" Value="{Binding DeplacementSummerDraught_TNE}" Margin="4,2,0,2" FormatString="N1" TextAlignment="Left"/>
|
||||||
<TextBox Grid.Row="1" Grid.Column="3" Grid.RowSpan="2" Name="textSpecialRequirements" Margin="2" Text="{Binding SpecialRequirementsOfShipAtBerth, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Top" />
|
<TextBox Grid.Row="2" Grid.Column="3" Grid.RowSpan="2" Name="textSpecialRequirements" Margin="2" Text="{Binding SpecialRequirementsOfShipAtBerth, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
||||||
<TextBox Grid.Row="3" Grid.Column="3" Grid.RowSpan="2" Name="textConstructionCharacteristics" Margin="2" Text="{Binding ConstructionCharacteristicsOfShip, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Top"/>
|
<TextBox Grid.Row="4" Grid.Column="3" Grid.RowSpan="2" Name="textConstructionCharacteristics" Margin="2" Text="{Binding ConstructionCharacteristicsOfShip, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
<GroupBox Name="servGroupBox" Header="{x:Static p:Resources.textServ}" Grid.Row="2">
|
<GroupBox Name="servGroupBox" Header="{x:Static p:Resources.textServ}" Grid.Row="2">
|
||||||
<Grid>
|
<enictrl:ENIDataGrid x:Name="dataGridSERV" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="28" />
|
|
||||||
<RowDefinition Height="*" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Grid Grid.Row="0">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width=".1*" />
|
|
||||||
<ColumnDefinition Width=".2*" />
|
|
||||||
<ColumnDefinition Width="26" />
|
|
||||||
<ColumnDefinition Width="26" />
|
|
||||||
<ColumnDefinition Width="26" />
|
|
||||||
<ColumnDefinition Width="26" />
|
|
||||||
<ColumnDefinition Width="26" />
|
|
||||||
|
|
||||||
<ColumnDefinition Width=".2*" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textSERVTemplate}" Name="label_MaerskSeaGo" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
|
||||||
<ComboBox Grid.Row="0" Grid.Column="1" x:Name="comboBoxGroup" Margin="2,2,4,2" DisplayMemberPath="ServiceName"
|
|
||||||
SelectionChanged="comboBoxGroup_SelectionChanged" ContextMenu="{DynamicResource ClearContextMenu}" />
|
|
||||||
<Button Name="buttonSetTemplate" Margin="2" Click="buttonSetTemplate_Click" BorderThickness="0" Background="Transparent" Grid.Column="2"
|
|
||||||
ToolTip="Apply template" HorizontalContentAlignment="Right" IsEnabled="False">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<Image Source="../Resources/check.png" Margin="0,0,0,0" Height="20" Width="20" />
|
|
||||||
</StackPanel>
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<Button Name="buttonEditTemplate" Grid.Column="4" Grid.Row="0" Margin="2" Click="buttonEditTemplate_Click" BorderThickness="0" Background="Transparent" ToolTip="Edit template">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<Image Source="../Resources/pencil.png" Margin="0,0,0,0" Height="20" Width="20" />
|
|
||||||
</StackPanel>
|
|
||||||
</Button>
|
|
||||||
<Button Name="buttonNewTemplate" Grid.Column="5" Grid.Row="0" Margin="2" Click="buttonNewTemplate_Click" BorderThickness="0" Background="Transparent" ToolTip="New template">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<Image Source="../Resources/document_plain_new.png" Margin="0,0,0,0" Height="20" Width="20" />
|
|
||||||
</StackPanel>
|
|
||||||
</Button>
|
|
||||||
<Button Name="buttonDeleteTemplate" Grid.Column="6" Grid.Row="0" Margin="2" Click="buttonDeleteTemplate_Click" BorderThickness="0" Background="Transparent" ToolTip="Delete template" IsEnabled="False">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<Image Source="../Resources/delete.png" Margin="0,0,0,0" Height="20" Width="20" />
|
|
||||||
</StackPanel>
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
<enictrl:ENIDataGrid Grid.Row="1" x:Name="dataGridSERV" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
|
||||||
AutoGenerateColumns="False" Margin="0,5,0,0">
|
AutoGenerateColumns="False" Margin="0,5,0,0">
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTextColumn Header="" Binding="{Binding Identifier}" IsReadOnly="True" />
|
<DataGridTextColumn Header="" Binding="{Binding Identifier}" IsReadOnly="True" />
|
||||||
@ -145,7 +89,7 @@
|
|||||||
<DataGridTextColumn Header="{x:Static p:Resources.textServiceInvoiceRecipient}" Binding="{Binding ServiceInvoiceRecipient, Mode=TwoWay}" IsReadOnly="True" Width="0.4*" />
|
<DataGridTextColumn Header="{x:Static p:Resources.textServiceInvoiceRecipient}" Binding="{Binding ServiceInvoiceRecipient, Mode=TwoWay}" IsReadOnly="True" Width="0.4*" />
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</enictrl:ENIDataGrid>
|
</enictrl:ENIDataGrid>
|
||||||
</Grid>
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
<GroupBox Name="ladgGroupBox" Header="{x:Static p:Resources.textLadg}" Grid.Row="3">
|
<GroupBox Name="ladgGroupBox" Header="{x:Static p:Resources.textLadg}" Grid.Row="3">
|
||||||
<enictrl:ENIDataGrid x:Name="dataGridLADG" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
<enictrl:ENIDataGrid x:Name="dataGridLADG" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||||
@ -156,27 +100,8 @@
|
|||||||
<DataGridTextColumn Header="{x:Static p:Resources.textLACodes}" Binding="{Binding CargoLACode, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
<DataGridTextColumn Header="{x:Static p:Resources.textLACodes}" Binding="{Binding CargoLACode, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textCargoCodeNST}" Binding="{Binding CargoCodeNST, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
<DataGridTextColumn Header="{x:Static p:Resources.textCargoCodeNST}" Binding="{Binding CargoCodeNST, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textCargoCodeNST3}" Binding="{Binding CargoCodeNST_3, Mode=TwoWay}" IsReadOnly="True" Width="0.15*" />
|
<DataGridTextColumn Header="{x:Static p:Resources.textCargoCodeNST3}" Binding="{Binding CargoCodeNST_3, Mode=TwoWay}" IsReadOnly="True" Width="0.15*" />
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textCargoNumberOfItems}" Binding="{Binding CargoNumberOfItems, Mode=TwoWay}" IsReadOnly="True" Width="0.15*" />
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textCargoNumberOfItems}" IsReadOnly="False" Width="0.15*">
|
<DataGridTextColumn Header="{x:Static p:Resources.textCargoGrossQuantity}" Binding="{Binding CargoGrossQuantity_TNE, Mode=TwoWay, StringFormat={}{0:N3}}" IsReadOnly="True" Width="0.15*" />
|
||||||
<DataGridTextColumn.Binding>
|
|
||||||
<Binding Path="CargoNumberOfItems" Mode="TwoWay">
|
|
||||||
<Binding.ValidationRules>
|
|
||||||
<util:NumberValidationRule MaxValue="9999999" />
|
|
||||||
</Binding.ValidationRules>
|
|
||||||
</Binding>
|
|
||||||
</DataGridTextColumn.Binding>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
|
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textCargoGrossQuantity}" IsReadOnly="False" Width="0.15*">
|
|
||||||
<DataGridTextColumn.Binding>
|
|
||||||
<Binding Path="CargoGrossQuantity_TNE" Mode="TwoWay" StringFormat="N3">
|
|
||||||
<Binding.ValidationRules>
|
|
||||||
<util:NumberValidationRule MaxValue="1000000" MinValue="0" />
|
|
||||||
</Binding.ValidationRules>
|
|
||||||
</Binding>
|
|
||||||
</DataGridTextColumn.Binding>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
|
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textCargoPortOfLoading}" Binding="{Binding PortOfLoading, Mode=TwoWay}" IsReadOnly="True" Width="0.15*" />
|
<DataGridTextColumn Header="{x:Static p:Resources.textCargoPortOfLoading}" Binding="{Binding PortOfLoading, Mode=TwoWay}" IsReadOnly="True" Width="0.15*" />
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textCargoPortOfDischarge}" Binding="{Binding PortOfDischarge, Mode=TwoWay}" IsReadOnly="True" Width="0.15*" />
|
<DataGridTextColumn Header="{x:Static p:Resources.textCargoPortOfDischarge}" Binding="{Binding PortOfDischarge, Mode=TwoWay}" IsReadOnly="True" Width="0.15*" />
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
|
|||||||
@ -1,6 +1,4 @@
|
|||||||
// Copyright (c) 2017- schick Informatik
|
// Copyright (c) 2017 schick Informatik
|
||||||
// Description:
|
|
||||||
//
|
|
||||||
|
|
||||||
// Description: Detailansicht Gruppe Port Notification
|
// Description: Detailansicht Gruppe Port Notification
|
||||||
//
|
//
|
||||||
@ -8,7 +6,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
|
||||||
@ -16,8 +13,6 @@ using ENI2.EditControls;
|
|||||||
using ENI2.Util;
|
using ENI2.Util;
|
||||||
|
|
||||||
using bsmd.database;
|
using bsmd.database;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Diagnostics;
|
|
||||||
|
|
||||||
namespace ENI2.DetailViewControls
|
namespace ENI2.DetailViewControls
|
||||||
{
|
{
|
||||||
@ -27,18 +22,10 @@ namespace ENI2.DetailViewControls
|
|||||||
public partial class PortNotificationDetailControl : DetailBaseControl
|
public partial class PortNotificationDetailControl : DetailBaseControl
|
||||||
{
|
{
|
||||||
|
|
||||||
#region Fields
|
|
||||||
|
|
||||||
private Message _nameMessage;
|
private Message _nameMessage;
|
||||||
private Message _infoMessage;
|
private Message _infoMessage;
|
||||||
private Message _servMessage;
|
private Message _servMessage;
|
||||||
private Message _ladgMessage;
|
private Message _ladgMessage;
|
||||||
private Message _crewaMessage;
|
|
||||||
private Dictionary<string, string> portAreas = null;
|
|
||||||
private static List<SERV_Template> _servTemplates = null;
|
|
||||||
private SERV_Template _currentTemplate;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
private static readonly string[] shippingAreas = {
|
private static readonly string[] shippingAreas = {
|
||||||
Properties.Resources.textShippingAreaNORTHBALTIC,
|
Properties.Resources.textShippingAreaNORTHBALTIC,
|
||||||
@ -65,10 +52,10 @@ namespace ENI2.DetailViewControls
|
|||||||
this.RegisterDoubleUpDownChange(this.doubleUpDownDisplacementSummerDraught, Message.NotificationClass.INFO);
|
this.RegisterDoubleUpDownChange(this.doubleUpDownDisplacementSummerDraught, Message.NotificationClass.INFO);
|
||||||
this.RegisterTextboxChange(this.textSpecialRequirements, Message.NotificationClass.INFO);
|
this.RegisterTextboxChange(this.textSpecialRequirements, Message.NotificationClass.INFO);
|
||||||
this.RegisterTextboxChange(this.textConstructionCharacteristics, Message.NotificationClass.INFO);
|
this.RegisterTextboxChange(this.textConstructionCharacteristics, Message.NotificationClass.INFO);
|
||||||
this.dataGridLADG.CellEditEnding += (obj, ev) => { this.OnNotificationClassChanged(Message.NotificationClass.LADG); };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override async void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
|
|
||||||
@ -78,7 +65,6 @@ namespace ENI2.DetailViewControls
|
|||||||
if (aMessage.MessageNotificationClass == Message.NotificationClass.INFO) { this._infoMessage = aMessage; this.ControlMessages.Add(aMessage); }
|
if (aMessage.MessageNotificationClass == Message.NotificationClass.INFO) { this._infoMessage = aMessage; this.ControlMessages.Add(aMessage); }
|
||||||
if (aMessage.MessageNotificationClass == Message.NotificationClass.SERV) { this._servMessage = aMessage; this.ControlMessages.Add(aMessage); }
|
if (aMessage.MessageNotificationClass == Message.NotificationClass.SERV) { this._servMessage = aMessage; this.ControlMessages.Add(aMessage); }
|
||||||
if (aMessage.MessageNotificationClass == Message.NotificationClass.LADG) { this._ladgMessage = aMessage; this.ControlMessages.Add(aMessage); }
|
if (aMessage.MessageNotificationClass == Message.NotificationClass.LADG) { this._ladgMessage = aMessage; this.ControlMessages.Add(aMessage); }
|
||||||
if(aMessage.MessageNotificationClass == Message.NotificationClass.CREWA) { this._crewaMessage = aMessage;}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region init NAME
|
#region init NAME
|
||||||
@ -123,7 +109,7 @@ namespace ENI2.DetailViewControls
|
|||||||
_infoMessage.Elements.Add(info);
|
_infoMessage.Elements.Add(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
portAreas = LocalizedLookup.getPortAreasForLocode(this.Core.PoC);
|
Dictionary<string, string> portAreas = LocalizedLookup.getPortAreasForLocode(this.Core.PoC);
|
||||||
this.comboBoxPortArea.ItemsSource = portAreas;
|
this.comboBoxPortArea.ItemsSource = portAreas;
|
||||||
|
|
||||||
this.comboBoxShippingArea.ItemsSource = shippingAreas;
|
this.comboBoxShippingArea.ItemsSource = shippingAreas;
|
||||||
@ -167,31 +153,20 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region init SERV templates
|
#region init helper Maersk / SeaGo Field
|
||||||
|
|
||||||
if(_servTemplates == null)
|
if (this.Core.IsFlagSet(MessageCore.CoreFlags.MAERSK_BHV)) this.comboBoxGroup.SelectedIndex = 1;
|
||||||
{
|
if (this.Core.IsFlagSet(MessageCore.CoreFlags.SEAGO_BHV)) this.comboBoxGroup.SelectedIndex = 2;
|
||||||
_servTemplates = await DBManagerAsync.GetSERVTemplatesAsync(); // initial load
|
if (this.Core.IsFlagSet(MessageCore.CoreFlags.SEAGO_WHV)) this.comboBoxGroup.SelectedIndex = 3;
|
||||||
_servTemplates.Sort();
|
if (this.Core.IsFlagSet(MessageCore.CoreFlags.HOEGH)) this.comboBoxGroup.SelectedIndex = 4;
|
||||||
Trace.WriteLine($"{_servTemplates.Count} SERV templates loaded");
|
|
||||||
}
|
|
||||||
|
|
||||||
this.comboBoxGroup.ItemsSource = _servTemplates;
|
|
||||||
|
|
||||||
this.buttonDeleteTemplate.Visibility = DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].IsEditor ? Visibility.Visible : Visibility.Hidden;
|
|
||||||
this.buttonEditTemplate.Visibility = DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].IsEditor ? Visibility.Visible : Visibility.Hidden;
|
|
||||||
this.buttonNewTemplate.Visibility = DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].IsEditor ? Visibility.Visible : Visibility.Hidden;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region datagrid LADG
|
#region datagrid LADG
|
||||||
|
|
||||||
private void DataGridLADG_CreateRequested()
|
private void DataGridLADG_CreateRequested()
|
||||||
{
|
{
|
||||||
this.dataGridLADG.CancelEdit();
|
|
||||||
this.dataGridLADG.CancelEdit();
|
|
||||||
EditLADGDialog eld = new EditLADGDialog();
|
EditLADGDialog eld = new EditLADGDialog();
|
||||||
eld.LADG = new LADG();
|
eld.LADG = new LADG();
|
||||||
eld.LADG.MessageHeader = _ladgMessage;
|
eld.LADG.MessageHeader = _ladgMessage;
|
||||||
@ -224,8 +199,6 @@ namespace ENI2.DetailViewControls
|
|||||||
{
|
{
|
||||||
if (obj is LADG ladg)
|
if (obj is LADG ladg)
|
||||||
{
|
{
|
||||||
this.dataGridLADG.CancelEdit();
|
|
||||||
this.dataGridLADG.CancelEdit();
|
|
||||||
// are you sure dialog is in base class
|
// are you sure dialog is in base class
|
||||||
this._ladgMessage.Elements.Remove(ladg);
|
this._ladgMessage.Elements.Remove(ladg);
|
||||||
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Delete(ladg);
|
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Delete(ladg);
|
||||||
@ -237,9 +210,6 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
private void DataGridLADG_EditRequested(DatabaseEntity obj)
|
private void DataGridLADG_EditRequested(DatabaseEntity obj)
|
||||||
{
|
{
|
||||||
this.dataGridLADG.CancelEdit();
|
|
||||||
this.dataGridLADG.CancelEdit();
|
|
||||||
|
|
||||||
LADG ladg = obj as LADG;
|
LADG ladg = obj as LADG;
|
||||||
|
|
||||||
EditLADGDialog eld = new EditLADGDialog();
|
EditLADGDialog eld = new EditLADGDialog();
|
||||||
@ -381,38 +351,57 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region SERV template event handler
|
#region mouse wheel
|
||||||
|
|
||||||
|
private void ScrollViewer_PreviewMouseWheel(object sender, System.Windows.Input.MouseWheelEventArgs e)
|
||||||
|
{
|
||||||
|
ScrollViewer scv = (ScrollViewer)sender;
|
||||||
|
scv.ScrollToVerticalOffset(scv.VerticalOffset - e.Delta);
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Spezialbalkon für die Gruppenauswahl im Core (Maersk BHV / Seago usw.)
|
||||||
|
|
||||||
private void comboBoxGroup_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void comboBoxGroup_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if(this.comboBoxGroup.SelectedItem is SERV_Template st)
|
// clear all
|
||||||
|
this.Core.SetFlag(false, MessageCore.CoreFlags.MAERSK_BHV);
|
||||||
|
this.Core.SetFlag(false, MessageCore.CoreFlags.SEAGO_BHV);
|
||||||
|
this.Core.SetFlag(false, MessageCore.CoreFlags.SEAGO_WHV);
|
||||||
|
this.Core.SetFlag(false, MessageCore.CoreFlags.HOEGH);
|
||||||
|
|
||||||
|
DictionaryEntry selectedItem = (DictionaryEntry) this.comboBoxGroup.SelectedItem;
|
||||||
|
if(Int32.TryParse((string)selectedItem.Value, out int selectedValue))
|
||||||
{
|
{
|
||||||
this.buttonDeleteTemplate.IsEnabled = true;
|
if (selectedValue == (int)MessageCore.CoreFlags.MAERSK_BHV) CheckServiceEntryMaerskBHV();
|
||||||
this.buttonSetTemplate.IsEnabled = true;
|
if (selectedValue == (int)MessageCore.CoreFlags.SEAGO_BHV) CheckServiceEntrySeaGoBHV();
|
||||||
this._currentTemplate = st;
|
if (selectedValue == (int)MessageCore.CoreFlags.HOEGH) CheckServiceEntryHoegh();
|
||||||
|
this.Core.SetFlag(true, (MessageCore.CoreFlags)selectedValue);
|
||||||
|
DBManager.Instance.Save(this.Core);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buttonSetTemplate_Click(object sender, RoutedEventArgs e)
|
#endregion
|
||||||
{
|
|
||||||
if (this.comboBoxGroup.SelectedItem is SERV_Template st)
|
#region special entry ship service check
|
||||||
|
|
||||||
|
private void CheckServiceEntryMaerskBHV()
|
||||||
{
|
{
|
||||||
bool found = false;
|
bool found = false;
|
||||||
foreach (SERV serv in _servMessage.Elements.Cast<SERV>())
|
foreach(SERV serv in this._servMessage.Elements)
|
||||||
{
|
{
|
||||||
if (serv.ServiceName.Equals(st.ServiceName))
|
if (serv.ServiceBeneficiary.Equals("Maersk A/S, Esplanaden 50, DK-1263 Copenhagen K, VAT-ID: DK53139655"))
|
||||||
{
|
found = true;
|
||||||
found = true; break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!found)
|
if(!found)
|
||||||
{
|
{
|
||||||
SERV newServ = new SERV();
|
SERV newServ = new SERV();
|
||||||
newServ.ServiceName = st.ServiceName;
|
newServ.ServiceBeneficiary = "Maersk A/S, Esplanaden 50, DK-1263 Copenhagen K, VAT-ID: DK53139655";
|
||||||
newServ.ServiceBeneficiary = st.ServiceBeneficiary;
|
newServ.ServiceInvoiceRecipient = "Maersk Deutschland A/S & Co.KG, Ericusspitze 2-4, 20457 Hamburg";
|
||||||
newServ.ServiceInvoiceRecipient = st.ServiceInvoiceRecipient;
|
newServ.ServiceName = "Maersk BHV";
|
||||||
|
|
||||||
newServ.MessageHeader = this._servMessage;
|
newServ.MessageHeader = this._servMessage;
|
||||||
newServ.Identifier = SERV.GetNewIdentifier(_servMessage.Elements);
|
newServ.Identifier = SERV.GetNewIdentifier(_servMessage.Elements);
|
||||||
this._servMessage.Elements.Add(newServ);
|
this._servMessage.Elements.Add(newServ);
|
||||||
@ -420,101 +409,53 @@ namespace ENI2.DetailViewControls
|
|||||||
this.SublistElementChanged(Message.NotificationClass.SERV);
|
this.SublistElementChanged(Message.NotificationClass.SERV);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void CheckServiceEntrySeaGoBHV()
|
||||||
|
{
|
||||||
|
bool found = false;
|
||||||
|
foreach (SERV serv in this._servMessage.Elements)
|
||||||
|
{
|
||||||
|
if (serv.ServiceBeneficiary.Equals("Sealand Europe A/S, Dampfaergevej 10, 3.tv, DK- 2100 Copenhagen, VAT-ID: DK53139655"))
|
||||||
|
found = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buttonNewTemplate_Click(object sender, RoutedEventArgs e)
|
if (!found)
|
||||||
{
|
{
|
||||||
SERV_Template newTemplate = new SERV_Template();
|
SERV newServ = new SERV();
|
||||||
EditSERVDialog esd = new EditSERVDialog();
|
newServ.ServiceBeneficiary = "Sealand Europe A/S, Dampfaergevej 10, 3.tv, DK- 2100 Copenhagen, VAT-ID: DK53139655";
|
||||||
esd.AddVisible = false;
|
newServ.ServiceInvoiceRecipient = "Maersk Deutschland A/S & Co. KG on behalf of Sealand Europe A/S, Ericusspitze 2-4, 20457 Hamburg";
|
||||||
esd.SERV_Template = newTemplate;
|
newServ.ServiceName = "SeaGo BHV";
|
||||||
if(esd.ShowDialog() ?? false)
|
newServ.MessageHeader = this._servMessage;
|
||||||
{
|
newServ.Identifier = SERV.GetNewIdentifier(_servMessage.Elements);
|
||||||
_ = DBManagerAsync.SaveAsync(esd.SERV_Template);
|
this._servMessage.Elements.Add(newServ);
|
||||||
this.comboBoxGroup.ItemsSource = null;
|
this.dataGridSERV.Items.Refresh();
|
||||||
_servTemplates.Add(newTemplate);
|
this.SublistElementChanged(Message.NotificationClass.SERV);
|
||||||
_servTemplates.Sort();
|
|
||||||
this.comboBoxGroup.ItemsSource = _servTemplates;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buttonEditTemplate_Click(object sender, RoutedEventArgs e)
|
private void CheckServiceEntryHoegh()
|
||||||
{
|
{
|
||||||
if (this.comboBoxGroup.SelectedItem is SERV_Template st)
|
bool found = false;
|
||||||
|
foreach (SERV serv in this._servMessage.Elements)
|
||||||
{
|
{
|
||||||
EditSERVDialog editSERVDialog = new EditSERVDialog();
|
if (serv.ServiceBeneficiary.Equals("Höegh Autoliners AS, Oslo, Norway"))
|
||||||
editSERVDialog.AddVisible = false;
|
found = true;
|
||||||
editSERVDialog.SERV_Template = st;
|
|
||||||
if (editSERVDialog.ShowDialog() ?? false)
|
|
||||||
{
|
|
||||||
_ = DBManagerAsync.SaveAsync(st);
|
|
||||||
this.comboBoxGroup.ItemsSource = null;
|
|
||||||
_servTemplates.Sort();
|
|
||||||
this.comboBoxGroup.ItemsSource = _servTemplates;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!found)
|
||||||
|
{
|
||||||
|
SERV newServ = new SERV();
|
||||||
|
newServ.ServiceBeneficiary = "Höegh Autoliners AS, Oslo, Norway";
|
||||||
|
newServ.ServiceInvoiceRecipient = " PWL Port Services GmbH & Co. KG";
|
||||||
|
newServ.ServiceName = "HOEGH BHV";
|
||||||
|
newServ.MessageHeader = this._servMessage;
|
||||||
|
newServ.Identifier = SERV.GetNewIdentifier(_servMessage.Elements);
|
||||||
|
this._servMessage.Elements.Add(newServ);
|
||||||
|
this.dataGridSERV.Items.Refresh();
|
||||||
|
this.SublistElementChanged(Message.NotificationClass.SERV);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buttonDeleteTemplate_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (_currentTemplate != null)
|
|
||||||
{
|
|
||||||
if (MessageBox.Show("Delete this template?", "Confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.Yes)
|
|
||||||
{
|
|
||||||
this.comboBoxGroup.SelectedItem = null;
|
|
||||||
this.comboBoxGroup.ItemsSource = null;
|
|
||||||
_ = DBManagerAsync.DeleteAsync(_currentTemplate);
|
|
||||||
_servTemplates.Remove(_currentTemplate);
|
|
||||||
this.buttonDeleteTemplate.IsEnabled = false;
|
|
||||||
this.comboBoxGroup.ItemsSource = _servTemplates;
|
|
||||||
this.buttonSetTemplate.IsEnabled = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region other event handler
|
|
||||||
|
|
||||||
private void buttonSearchPortArea_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (portAreas != null)
|
|
||||||
{
|
|
||||||
SelectPortAreaDialog spad = new SelectPortAreaDialog(this.Core.PoC);
|
|
||||||
if (spad.ShowDialog() ?? false)
|
|
||||||
{
|
|
||||||
if (spad.SelectedArea != null)
|
|
||||||
{
|
|
||||||
if (portAreas.ContainsKey(spad.SelectedArea))
|
|
||||||
{
|
|
||||||
var pair = portAreas.SingleOrDefault(p => p.Key == spad.SelectedArea);
|
|
||||||
this.comboBoxPortArea.SelectedItem = pair;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void buttonCopyNameFromCREWA_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
CREW crewA = null;
|
|
||||||
if (this._crewaMessage.Elements.Count > 0)
|
|
||||||
{
|
|
||||||
crewA = this._crewaMessage.Elements[0] as CREW;
|
|
||||||
}
|
|
||||||
|
|
||||||
SelectCrewMemberDialog scmd = new SelectCrewMemberDialog();
|
|
||||||
scmd.CREW = crewA;
|
|
||||||
scmd.AddVisible = false;
|
|
||||||
|
|
||||||
if (scmd.ShowDialog() ?? false)
|
|
||||||
{
|
|
||||||
this.textBox_NameMaster.Text = $"{crewA.CrewMemberFirstName} {crewA.CrewMemberLastName}";
|
|
||||||
this.SublistElementChanged(Message.NotificationClass.NAME);
|
|
||||||
var binding = textBox_NameMaster.GetBindingExpression(TextBox.TextProperty);
|
|
||||||
binding?.UpdateSource();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@ -116,12 +116,6 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int SelectedTabIndex
|
|
||||||
{
|
|
||||||
get { return this.mainFrame.SelectedIndex; }
|
|
||||||
set { this.mainFrame.SelectedIndex = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#region SetEnabled
|
#region SetEnabled
|
||||||
|
|
||||||
public override void SetEnabled(bool enabled)
|
public override void SetEnabled(bool enabled)
|
||||||
@ -510,5 +504,16 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region mouse wheel
|
||||||
|
|
||||||
|
private void ScrollViewer_PreviewMouseWheel(object sender, System.Windows.Input.MouseWheelEventArgs e)
|
||||||
|
{
|
||||||
|
ScrollViewer scv = (ScrollViewer)sender;
|
||||||
|
scv.ScrollToVerticalOffset(scv.VerticalOffset - e.Delta);
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="600" d:DesignWidth="800">
|
d:DesignHeight="600" d:DesignWidth="800">
|
||||||
<GroupBox Name="shipDataGroupBox" Header="{x:Static p:Resources.textShipData}" >
|
<GroupBox Name="shipDataGroupBox" Header="{x:Static p:Resources.textShipData}" >
|
||||||
|
<ScrollViewer PreviewMouseWheel="ScrollViewer_PreviewMouseWheel">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="260" />
|
<RowDefinition Height="260" />
|
||||||
@ -104,6 +104,6 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
</ScrollViewer>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
</src:DetailBaseControl>
|
</src:DetailBaseControl>
|
||||||
|
|||||||
@ -5,8 +5,10 @@
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
|
||||||
using bsmd.database;
|
using bsmd.database;
|
||||||
|
using ENI2.EditControls;
|
||||||
|
using System.Windows.Media;
|
||||||
using ENI2.Util;
|
using ENI2.Util;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
|
||||||
namespace ENI2.DetailViewControls
|
namespace ENI2.DetailViewControls
|
||||||
{
|
{
|
||||||
@ -104,5 +106,16 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region mouse wheel
|
||||||
|
|
||||||
|
private void ScrollViewer_PreviewMouseWheel(object sender, System.Windows.Input.MouseWheelEventArgs e)
|
||||||
|
{
|
||||||
|
ScrollViewer scv = (ScrollViewer)sender;
|
||||||
|
scv.ScrollToVerticalOffset(scv.VerticalOffset - e.Delta);
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -71,7 +71,7 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
private void copyItemToTOWA(object sender, RoutedEventArgs e)
|
private void copyItemToTOWA(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
// aus dem aktuell selektierten TOWD Element ein neues TOWA Element machen
|
// aus dem aktuell selektierten TOWA Element ein neues TOWD Element machen
|
||||||
if (this.dataGridTowageOnDeparture.SelectedItems != null)
|
if (this.dataGridTowageOnDeparture.SelectedItems != null)
|
||||||
{
|
{
|
||||||
foreach (TOWD selectedTOWD in this.dataGridTowageOnDeparture.SelectedItems)
|
foreach (TOWD selectedTOWD in this.dataGridTowageOnDeparture.SelectedItems)
|
||||||
@ -166,7 +166,8 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
private void DataGridTowageOnDeparture_DeleteRequested(DatabaseEntity obj)
|
private void DataGridTowageOnDeparture_DeleteRequested(DatabaseEntity obj)
|
||||||
{
|
{
|
||||||
if (obj is TOWD towd)
|
TOWD towd = obj as TOWD;
|
||||||
|
if (towd != null)
|
||||||
{
|
{
|
||||||
// are you sure dialog is in base class
|
// are you sure dialog is in base class
|
||||||
this._towdMessage.Elements.Remove(towd);
|
this._towdMessage.Elements.Remove(towd);
|
||||||
@ -244,7 +245,8 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
private void DataGridTowageOnArrival_DeleteRequested(DatabaseEntity obj)
|
private void DataGridTowageOnArrival_DeleteRequested(DatabaseEntity obj)
|
||||||
{
|
{
|
||||||
if (obj is TOWA towa)
|
TOWA towa = obj as TOWA;
|
||||||
|
if (towa != null)
|
||||||
{
|
{
|
||||||
// are you sure dialog is in base class
|
// are you sure dialog is in base class
|
||||||
this._towaMessage.Elements.Remove(towa);
|
this._towaMessage.Elements.Remove(towa);
|
||||||
@ -310,5 +312,16 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region mouse wheel
|
||||||
|
|
||||||
|
private void ScrollViewer_PreviewMouseWheel(object sender, System.Windows.Input.MouseWheelEventArgs e)
|
||||||
|
{
|
||||||
|
ScrollViewer scv = (ScrollViewer)sender;
|
||||||
|
scv.ScrollToVerticalOffset(scv.VerticalOffset - e.Delta);
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -45,7 +45,7 @@
|
|||||||
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="2" Content="{x:Static p:Resources.textValidExemption}" Name="label_ValidExemption" Margin="0,0,10,0"/>
|
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="2" Content="{x:Static p:Resources.textValidExemption}" Name="label_ValidExemption" Margin="0,0,10,0"/>
|
||||||
<CheckBox Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" Name="checkBoxAccurateCorrectDetails" IsChecked="{Binding ConfirmationOfCorrectness, Mode=TwoWay}" />
|
<CheckBox Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" Name="checkBoxAccurateCorrectDetails" IsChecked="{Binding ConfirmationOfCorrectness, Mode=TwoWay}" />
|
||||||
<CheckBox Grid.Row="0" Grid.Column="3" VerticalAlignment="Center" Name="checkBoxValidExemption" IsChecked="{Binding WasteDisposalValidExemption, Mode=TwoWay}" />
|
<CheckBox Grid.Row="0" Grid.Column="3" VerticalAlignment="Center" Name="checkBoxValidExemption" IsChecked="{Binding WasteDisposalValidExemption, Mode=TwoWay}" />
|
||||||
|
<enictrl:LocodeControl Grid.Row="3" Grid.Column="1" x:Name="locodeCtrlNextWastePort" LocodeValue="{Binding NextWasteDisposalPort, Mode=TwoWay}" LocodeSource="SSN" />
|
||||||
<DatePicker Grid.Row="1" Grid.Column="1" Name="datePickerDateLastDisposal" Margin="2" SelectedDate="{Binding LastWasteDisposalDate, Mode=TwoWay}" DisplayDateStart="1/1/1800" DisplayDateEnd="12/31/2199" PreviewKeyUp="DateTimePicker_PreviewKeyUpDate">
|
<DatePicker Grid.Row="1" Grid.Column="1" Name="datePickerDateLastDisposal" Margin="2" SelectedDate="{Binding LastWasteDisposalDate, Mode=TwoWay}" DisplayDateStart="1/1/1800" DisplayDateEnd="12/31/2199" PreviewKeyUp="DateTimePicker_PreviewKeyUpDate">
|
||||||
<DatePicker.BlackoutDates>
|
<DatePicker.BlackoutDates>
|
||||||
<CalendarDateRange Start="1/1/0001" End="12/31/1799"/>
|
<CalendarDateRange Start="1/1/0001" End="12/31/1799"/>
|
||||||
@ -53,9 +53,7 @@
|
|||||||
</DatePicker.BlackoutDates>
|
</DatePicker.BlackoutDates>
|
||||||
</DatePicker>
|
</DatePicker>
|
||||||
<enictrl:LocodeControl Grid.Row="2" Grid.Column="1" x:Name="locodeCtrlLastWastePort" LocodeValue="{Binding LastWasteDisposalPort, Mode=TwoWay}" LocodeSource="SSN" />
|
<enictrl:LocodeControl Grid.Row="2" Grid.Column="1" x:Name="locodeCtrlLastWastePort" LocodeValue="{Binding LastWasteDisposalPort, Mode=TwoWay}" LocodeSource="SSN" />
|
||||||
<enictrl:LocodeControl Grid.Row="3" Grid.Column="1" x:Name="locodeCtrlNextWastePort" LocodeValue="{Binding NextWasteDisposalPort, Mode=TwoWay}" LocodeSource="SSN" />
|
|
||||||
<TextBox Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="3" Grid.RowSpan="2" Name="textBoxWasteDisposalServiceProviders" Text="{Binding WasteDisposalServiceProviderText, Converter={util:TrimStringConverter}}" Margin="2" />
|
<TextBox Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="3" Grid.RowSpan="2" Name="textBoxWasteDisposalServiceProviders" Text="{Binding WasteDisposalServiceProviderText, Converter={util:TrimStringConverter}}" Margin="2" />
|
||||||
|
|
||||||
<Button Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="1" Name="buttonAddMissingEntries" Content="{x:Static p:Resources.textAddMissingEntries}" Margin="2" Click="buttonAddMissingEntries_Click"/>
|
<Button Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="1" Name="buttonAddMissingEntries" Content="{x:Static p:Resources.textAddMissingEntries}" Margin="2" Click="buttonAddMissingEntries_Click"/>
|
||||||
<Button Grid.Row="6" Grid.Column="2" Grid.ColumnSpan="1" Name="buttonImportFromExcel" Content="{x:Static p:Resources.textImportFromExcel}" Margin="2" Click="buttonImportFromExcel_Click" />
|
<Button Grid.Row="6" Grid.Column="2" Grid.ColumnSpan="1" Name="buttonImportFromExcel" Content="{x:Static p:Resources.textImportFromExcel}" Margin="2" Click="buttonImportFromExcel_Click" />
|
||||||
</Grid>
|
</Grid>
|
||||||
@ -153,12 +151,10 @@
|
|||||||
</enictrl:ENIDataGrid>
|
</enictrl:ENIDataGrid>
|
||||||
<Grid Grid.Row="1">
|
<Grid Grid.Row="1">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="120" />
|
|
||||||
<ColumnDefinition Width="120" />
|
<ColumnDefinition Width="120" />
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Button Grid.Row="0" Grid.Column="0" Name="buttonWasteReceivedAddMissingEntries" Content="{x:Static p:Resources.textAddMissingEntries}" Margin="2" Click="buttonWasteReceivedAddMissingEntries_Click"/>
|
<Button Grid.Row="0" Grid.Column="0" Name="buttonWasteReceivedAddMissingEntries" Content="{x:Static p:Resources.textAddMissingEntries}" Margin="2" Click="buttonWasteReceivedAddMissingEntries_Click"/>
|
||||||
<Button Grid.Row="0" Grid.Column="1" Name="buttonCopyFromWAS" Content="{x:Static p:Resources.textCopyFromWAS}" Margin="2" Click="buttonCopyFromWAS_Click"/>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
<enictrl:ENIDataGrid x:Name="dataGridWasteReceived" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
<enictrl:ENIDataGrid x:Name="dataGridWasteReceived" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||||
AutoGenerateColumns="False" Margin="0,5,0,0" Grid.Row="2" CanUserAddRows="False">
|
AutoGenerateColumns="False" Margin="0,5,0,0" Grid.Row="2" CanUserAddRows="False">
|
||||||
@ -166,7 +162,7 @@
|
|||||||
<DataGridTextColumn Header="" Binding="{Binding Identifier}" IsReadOnly="True" />
|
<DataGridTextColumn Header="" Binding="{Binding Identifier}" IsReadOnly="True" />
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textCode}" Binding="{Binding WasteTypeDisplayGrid}" IsReadOnly="True" Width="0.2*" />
|
<DataGridTextColumn Header="{x:Static p:Resources.textCode}" Binding="{Binding WasteTypeDisplayGrid}" IsReadOnly="True" Width="0.2*" />
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textDescription}" Binding="{Binding WasteDescription}" IsReadOnly="True" Width="0.3*" />
|
<DataGridTextColumn Header="{x:Static p:Resources.textDescription}" Binding="{Binding WasteDescription}" IsReadOnly="True" Width="0.3*" />
|
||||||
<!--DataGridTemplateColumn IsReadOnly="True" Width="0.15*">
|
<DataGridTemplateColumn IsReadOnly="True" Width="0.15*">
|
||||||
<DataGridTemplateColumn.HeaderTemplate>
|
<DataGridTemplateColumn.HeaderTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock TextWrapping="Wrap" Text="{x:Static p:Resources.textAmountWasteReceived_MTQ}" FontSize="10"/>
|
<TextBlock TextWrapping="Wrap" Text="{x:Static p:Resources.textAmountWasteReceived_MTQ}" FontSize="10"/>
|
||||||
@ -177,16 +173,7 @@
|
|||||||
<TextBlock TextAlignment="Center" Text="{Binding AmountWasteReceived_MTQ, StringFormat={}{0:N3}}" />
|
<TextBlock TextAlignment="Center" Text="{Binding AmountWasteReceived_MTQ, StringFormat={}{0:N3}}" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn-->
|
</DataGridTemplateColumn>
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textAmountWasteReceived_MTQ}" IsReadOnly="False" Width="0.15*">
|
|
||||||
<DataGridTextColumn.Binding>
|
|
||||||
<Binding Path="AmountWasteReceived_MTQ" Mode="TwoWay" StringFormat="N3" >
|
|
||||||
<Binding.ValidationRules>
|
|
||||||
<util:NumberValidationRule MaxValue="10000" MinValue="0" />
|
|
||||||
</Binding.ValidationRules>
|
|
||||||
</Binding>
|
|
||||||
</DataGridTextColumn.Binding>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
|
|
||||||
</enictrl:ENIDataGrid>
|
</enictrl:ENIDataGrid>
|
||||||
|
|||||||
@ -22,14 +22,17 @@ namespace ENI2.DetailViewControls
|
|||||||
public partial class WasteDetailControl : DetailBaseControl
|
public partial class WasteDetailControl : DetailBaseControl
|
||||||
{
|
{
|
||||||
|
|
||||||
#region Fields
|
|
||||||
|
|
||||||
private Message _wasMessage;
|
private Message _wasMessage;
|
||||||
private WAS _was;
|
private WAS _was;
|
||||||
private Message _wasRcptMessage;
|
private Message _wasRcptMessage;
|
||||||
private WAS_RCPT _selectedWAS_RCPT;
|
private WAS_RCPT _selectedWAS_RCPT;
|
||||||
|
|
||||||
#endregion
|
private static readonly string[] _wasteDeliveryList =
|
||||||
|
{
|
||||||
|
"ALL",
|
||||||
|
"SOME",
|
||||||
|
"NONE"
|
||||||
|
};
|
||||||
|
|
||||||
public WasteDetailControl()
|
public WasteDetailControl()
|
||||||
{
|
{
|
||||||
@ -46,7 +49,7 @@ namespace ENI2.DetailViewControls
|
|||||||
this.RegisterCheckboxChange(this.checkBoxValidExemption, Message.NotificationClass.WAS);
|
this.RegisterCheckboxChange(this.checkBoxValidExemption, Message.NotificationClass.WAS);
|
||||||
this.RegisterDatePickerChange(this.datePickerDateLastDisposal, Message.NotificationClass.WAS);
|
this.RegisterDatePickerChange(this.datePickerDateLastDisposal, Message.NotificationClass.WAS);
|
||||||
this.RegisterTextboxChange(this.textBoxWasteDisposalServiceProviders, Message.NotificationClass.WAS);
|
this.RegisterTextboxChange(this.textBoxWasteDisposalServiceProviders, Message.NotificationClass.WAS);
|
||||||
this.dataGridWasteReceived.CellEditEnding += (obj, ev) => { this.SublistElementChanged(Message.NotificationClass.WAS_RCPT); };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CheckBoxValidExemption_Checked(object sender, RoutedEventArgs e)
|
private void CheckBoxValidExemption_Checked(object sender, RoutedEventArgs e)
|
||||||
@ -177,12 +180,6 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int SelectedTabIndex
|
|
||||||
{
|
|
||||||
get { return this.mainFrame.SelectedIndex; }
|
|
||||||
set { this.mainFrame.SelectedIndex = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Waste receipt grid event handler
|
#region Waste receipt grid event handler
|
||||||
|
|
||||||
private void DataGridWasteReceipt_CreateRequested()
|
private void DataGridWasteReceipt_CreateRequested()
|
||||||
@ -216,8 +213,6 @@ namespace ENI2.DetailViewControls
|
|||||||
this.dataGridWasteReceived.ItemsSource = null;
|
this.dataGridWasteReceived.ItemsSource = null;
|
||||||
dataGridWasteReceipt_SelectionChanged(this, null);
|
dataGridWasteReceipt_SelectionChanged(this, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DataGridWasteReceipt_DeleteRequested(DatabaseEntity obj)
|
private void DataGridWasteReceipt_DeleteRequested(DatabaseEntity obj)
|
||||||
@ -263,7 +258,6 @@ namespace ENI2.DetailViewControls
|
|||||||
this.dataGridWasteReceipt.Items.Refresh();
|
this.dataGridWasteReceipt.Items.Refresh();
|
||||||
this.SublistElementChanged(Message.NotificationClass.WAS_RCPT);
|
this.SublistElementChanged(Message.NotificationClass.WAS_RCPT);
|
||||||
dataGridWasteReceipt_SelectionChanged(this, null);
|
dataGridWasteReceipt_SelectionChanged(this, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DataGridWasteReceipt_AddingNewItem(object sender, AddingNewItemEventArgs e)
|
private void DataGridWasteReceipt_AddingNewItem(object sender, AddingNewItemEventArgs e)
|
||||||
@ -288,8 +282,7 @@ namespace ENI2.DetailViewControls
|
|||||||
{
|
{
|
||||||
if (obj is WasteReceived wasteReceived)
|
if (obj is WasteReceived wasteReceived)
|
||||||
{
|
{
|
||||||
this.dataGridWasteReceived.CancelEdit();
|
|
||||||
this.dataGridWasteReceived.CancelEdit();
|
|
||||||
// are you sure dialog is in base class
|
// are you sure dialog is in base class
|
||||||
_selectedWAS_RCPT.WasteReceived.Remove(wasteReceived);
|
_selectedWAS_RCPT.WasteReceived.Remove(wasteReceived);
|
||||||
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Delete(wasteReceived);
|
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Delete(wasteReceived);
|
||||||
@ -301,9 +294,6 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
private void DataGridWasteReceived_CreateRequested()
|
private void DataGridWasteReceived_CreateRequested()
|
||||||
{
|
{
|
||||||
if (_selectedWAS_RCPT == null) return;
|
|
||||||
this.dataGridWasteReceived.CancelEdit();
|
|
||||||
this.dataGridWasteReceived.CancelEdit();
|
|
||||||
EditWasteReceivedDialog ewrd = new EditWasteReceivedDialog();
|
EditWasteReceivedDialog ewrd = new EditWasteReceivedDialog();
|
||||||
ewrd.WasteReceived = new WasteReceived();
|
ewrd.WasteReceived = new WasteReceived();
|
||||||
ewrd.WasteReceived.WAS_RCPT = _selectedWAS_RCPT;
|
ewrd.WasteReceived.WAS_RCPT = _selectedWAS_RCPT;
|
||||||
@ -337,9 +327,6 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
private void DataGridWasteReceived_EditRequested(DatabaseEntity obj)
|
private void DataGridWasteReceived_EditRequested(DatabaseEntity obj)
|
||||||
{
|
{
|
||||||
this.dataGridWasteReceived.CancelEdit();
|
|
||||||
this.dataGridWasteReceived.CancelEdit();
|
|
||||||
|
|
||||||
EditWasteReceivedDialog ewrd = new EditWasteReceivedDialog();
|
EditWasteReceivedDialog ewrd = new EditWasteReceivedDialog();
|
||||||
ewrd.WasteReceived = obj as WasteReceived;
|
ewrd.WasteReceived = obj as WasteReceived;
|
||||||
|
|
||||||
@ -475,6 +462,17 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region mouse wheel
|
||||||
|
|
||||||
|
private void ScrollViewer_PreviewMouseWheel(object sender, System.Windows.Input.MouseWheelEventArgs e)
|
||||||
|
{
|
||||||
|
ScrollViewer scv = (ScrollViewer)sender;
|
||||||
|
scv.ScrollToVerticalOffset(scv.VerticalOffset - e.Delta);
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region Excel file import
|
#region Excel file import
|
||||||
|
|
||||||
private void buttonImportFromExcel_Click(object sender, RoutedEventArgs e)
|
private void buttonImportFromExcel_Click(object sender, RoutedEventArgs e)
|
||||||
@ -580,38 +578,8 @@ namespace ENI2.DetailViewControls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Copy WAS to WAS_RCPT handler
|
|
||||||
|
|
||||||
private void buttonCopyFromWAS_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (_selectedWAS_RCPT == null) return;
|
|
||||||
|
|
||||||
if(MessageBox.Show(Properties.Resources.textCopyToWASConfirmation, Properties.Resources.textConfirmation,
|
|
||||||
MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.Yes)
|
|
||||||
{
|
|
||||||
foreach(Waste waste in _was.Waste)
|
|
||||||
{
|
|
||||||
if(waste.WasteDisposalAmount_MTQ.HasValue && waste.WasteDisposalAmount_MTQ > 0)
|
|
||||||
{
|
|
||||||
// find matching WAS_RCPT entry
|
|
||||||
foreach(WasteReceived wasteReceived in _selectedWAS_RCPT.WasteReceived)
|
|
||||||
{
|
|
||||||
if(wasteReceived.WasteCode.Equals(waste.WasteType.ToString()))
|
|
||||||
{
|
|
||||||
wasteReceived.AmountWasteReceived_MTQ = waste.WasteDisposalAmount_MTQ;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.dataGridWasteReceived.Items.Refresh();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
291
ENI2/ENI2.csproj
@ -8,7 +8,7 @@
|
|||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>ENI2</RootNamespace>
|
<RootNamespace>ENI2</RootNamespace>
|
||||||
<AssemblyName>ENI2Test</AssemblyName>
|
<AssemblyName>ENI2</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||||
@ -36,8 +36,8 @@
|
|||||||
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
|
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
|
||||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||||
<WebPage>publish.html</WebPage>
|
<WebPage>publish.html</WebPage>
|
||||||
<ApplicationRevision>7</ApplicationRevision>
|
<ApplicationRevision>3</ApplicationRevision>
|
||||||
<ApplicationVersion>7.2.12.7</ApplicationVersion>
|
<ApplicationVersion>7.12.0.%2a</ApplicationVersion>
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||||
@ -62,8 +62,7 @@
|
|||||||
<OutputPath>bin\Release\</OutputPath>
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>0</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<StartupObject>ENI2.App</StartupObject>
|
<StartupObject>ENI2.App</StartupObject>
|
||||||
@ -85,13 +84,14 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup />
|
<PropertyGroup />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ManifestCertificateThumbprint>C5FD306818D481FBECE3B2E74D7A912F515191E0</ManifestCertificateThumbprint>
|
<ManifestCertificateThumbprint>62DE8527C377957850DB503DA52FF66F664BD459</ManifestCertificateThumbprint>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<SignManifests>true</SignManifests>
|
<SignManifests>true</SignManifests>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ManifestKeyFile>ENI2_7_TemporaryKey.pfx</ManifestKeyFile>
|
<ManifestKeyFile>
|
||||||
|
</ManifestKeyFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug 64|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug 64|AnyCPU'">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
@ -134,115 +134,43 @@
|
|||||||
<CodeAnalysisRuleSet>..\code.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>..\code.ruleset</CodeAnalysisRuleSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="ExcelDataReader, Version=3.8.0.0, Culture=neutral, PublicKeyToken=93517dbe6a4012fa, processorArchitecture=MSIL">
|
<Reference Include="ExcelDataReader, Version=3.6.0.0, Culture=neutral, PublicKeyToken=93517dbe6a4012fa, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\ExcelDataReader.3.8.0\lib\net462\ExcelDataReader.dll</HintPath>
|
<HintPath>packages\ExcelDataReader.3.6.0\lib\net45\ExcelDataReader.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="log4net, Version=3.2.0.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
<Reference Include="log4net, Version=2.0.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\log4net.3.2.0\lib\net462\log4net.dll</HintPath>
|
<HintPath>packages\log4net.2.0.15\lib\net45\log4net.dll</HintPath>
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=9.0.0.9, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
|
||||||
<HintPath>packages\Microsoft.Bcl.AsyncInterfaces.9.0.9\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Bcl.Cryptography, Version=9.0.0.9, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
|
||||||
<HintPath>packages\Microsoft.Bcl.Cryptography.9.0.9\lib\net462\Microsoft.Bcl.Cryptography.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Extensions.DependencyInjection, Version=9.0.0.9, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
|
||||||
<HintPath>packages\Microsoft.Extensions.DependencyInjection.9.0.9\lib\net462\Microsoft.Extensions.DependencyInjection.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=9.0.0.9, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
|
||||||
<HintPath>packages\Microsoft.Extensions.DependencyInjection.Abstractions.9.0.9\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Extensions.Logging, Version=9.0.0.9, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
|
||||||
<HintPath>packages\Microsoft.Extensions.Logging.9.0.9\lib\net462\Microsoft.Extensions.Logging.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=9.0.0.9, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
|
||||||
<HintPath>packages\Microsoft.Extensions.Logging.Abstractions.9.0.9\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Extensions.Options, Version=9.0.0.9, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
|
||||||
<HintPath>packages\Microsoft.Extensions.Options.9.0.9\lib\net462\Microsoft.Extensions.Options.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Extensions.Primitives, Version=9.0.0.9, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
|
||||||
<HintPath>packages\Microsoft.Extensions.Primitives.9.0.9\lib\net462\Microsoft.Extensions.Primitives.dll</HintPath>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\Microsoft.Office.Interop.Excel.15.0.4795.1001\lib\net20\Microsoft.Office.Interop.Excel.dll</HintPath>
|
<HintPath>packages\Microsoft.Office.Interop.Excel.15.0.4795.1001\lib\net20\Microsoft.Office.Interop.Excel.dll</HintPath>
|
||||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="MigraDoc.DocumentObjectModel, Version=6.2.2.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
|
<Reference Include="MigraDoc.DocumentObjectModel-gdi, Version=1.50.5147.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\PDFsharp-MigraDoc.6.2.2\lib\netstandard2.0\MigraDoc.DocumentObjectModel.dll</HintPath>
|
<HintPath>packages\PDFsharp-MigraDoc-gdi.1.50.5147\lib\net20\MigraDoc.DocumentObjectModel-gdi.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="MigraDoc.Rendering, Version=6.2.2.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
|
<Reference Include="MigraDoc.Rendering-gdi, Version=1.50.5147.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\PDFsharp-MigraDoc.6.2.2\lib\netstandard2.0\MigraDoc.Rendering.dll</HintPath>
|
<HintPath>packages\PDFsharp-MigraDoc-gdi.1.50.5147\lib\net20\MigraDoc.Rendering-gdi.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="MigraDoc.RtfRendering, Version=6.2.2.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
|
<Reference Include="MigraDoc.RtfRendering-gdi, Version=1.50.5147.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\PDFsharp-MigraDoc.6.2.2\lib\netstandard2.0\MigraDoc.RtfRendering.dll</HintPath>
|
<HintPath>packages\PDFsharp-MigraDoc-gdi.1.50.5147\lib\net20\MigraDoc.RtfRendering-gdi.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="PdfSharp, Version=6.2.2.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
|
<Reference Include="PdfSharp-gdi, Version=1.50.5147.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\PDFsharp.6.2.2\lib\netstandard2.0\PdfSharp.dll</HintPath>
|
<HintPath>packages\PDFsharp-MigraDoc-gdi.1.50.5147\lib\net20\PdfSharp-gdi.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="PdfSharp.BarCodes, Version=6.2.2.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
|
<Reference Include="PdfSharp.Charting-gdi, Version=1.50.5147.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\PDFsharp.6.2.2\lib\netstandard2.0\PdfSharp.BarCodes.dll</HintPath>
|
<HintPath>packages\PDFsharp-MigraDoc-gdi.1.50.5147\lib\net20\PdfSharp.Charting-gdi.dll</HintPath>
|
||||||
</Reference>
|
|
||||||
<Reference Include="PdfSharp.Charting, Version=6.2.2.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
|
|
||||||
<HintPath>packages\PDFsharp.6.2.2\lib\netstandard2.0\PdfSharp.Charting.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="PdfSharp.Cryptography, Version=6.2.2.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
|
|
||||||
<HintPath>packages\PDFsharp.6.2.2\lib\netstandard2.0\PdfSharp.Cryptography.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="PdfSharp.Quality, Version=6.2.2.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
|
|
||||||
<HintPath>packages\PDFsharp.6.2.2\lib\netstandard2.0\PdfSharp.Quality.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="PdfSharp.Shared, Version=6.2.2.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
|
|
||||||
<HintPath>packages\PDFsharp.6.2.2\lib\netstandard2.0\PdfSharp.Shared.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="PdfSharp.Snippets, Version=6.2.2.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
|
|
||||||
<HintPath>packages\PDFsharp.6.2.2\lib\netstandard2.0\PdfSharp.Snippets.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="PdfSharp.System, Version=6.2.2.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
|
|
||||||
<HintPath>packages\PDFsharp.6.2.2\lib\netstandard2.0\PdfSharp.System.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="PdfSharp.WPFonts, Version=6.2.2.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
|
|
||||||
<HintPath>packages\PDFsharp.6.2.2\lib\netstandard2.0\PdfSharp.WPFonts.dll</HintPath>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Buffers, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
|
||||||
<HintPath>packages\System.Buffers.4.6.1\lib\net462\System.Buffers.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Data.SQLite, Version=1.0.119.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
<Reference Include="System.Data.SQLite, Version=1.0.117.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\lib\net46\System.Data.SQLite.dll</HintPath>
|
<HintPath>packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.117.0\lib\net46\System.Data.SQLite.dll</HintPath>
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Diagnostics.DiagnosticSource, Version=9.0.0.9, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
|
||||||
<HintPath>packages\System.Diagnostics.DiagnosticSource.9.0.9\lib\net462\System.Diagnostics.DiagnosticSource.dll</HintPath>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Formats.Asn1, Version=9.0.0.9, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
|
||||||
<HintPath>packages\System.Formats.Asn1.9.0.9\lib\net462\System.Formats.Asn1.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.IO.Compression" />
|
<Reference Include="System.IO.Compression" />
|
||||||
<Reference Include="System.Memory, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
|
||||||
<HintPath>packages\System.Memory.4.6.3\lib\net462\System.Memory.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Numerics" />
|
|
||||||
<Reference Include="System.Numerics.Vectors, Version=4.1.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>packages\System.Numerics.Vectors.4.6.1\lib\net462\System.Numerics.Vectors.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>packages\System.Runtime.CompilerServices.Unsafe.6.1.2\lib\net462\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Runtime.Serialization" />
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
<Reference Include="System.Security" />
|
|
||||||
<Reference Include="System.Security.Cryptography.Pkcs, Version=9.0.0.9, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>packages\System.Security.Cryptography.Pkcs.9.0.9\lib\net462\System.Security.Cryptography.Pkcs.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.ServiceModel" />
|
<Reference Include="System.ServiceModel" />
|
||||||
<Reference Include="System.ServiceModel.Web" />
|
<Reference Include="System.ServiceModel.Web" />
|
||||||
<Reference Include="System.ServiceProcess" />
|
<Reference Include="System.ServiceProcess" />
|
||||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
|
||||||
<HintPath>packages\System.Threading.Tasks.Extensions.4.6.3\lib\net462\System.Threading.Tasks.Extensions.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Web" />
|
<Reference Include="System.Web" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
@ -257,20 +185,20 @@
|
|||||||
<Reference Include="WindowsBase" />
|
<Reference Include="WindowsBase" />
|
||||||
<Reference Include="PresentationCore" />
|
<Reference Include="PresentationCore" />
|
||||||
<Reference Include="PresentationFramework" />
|
<Reference Include="PresentationFramework" />
|
||||||
<Reference Include="Xceed.Wpf.AvalonDock, Version=5.0.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
<Reference Include="Xceed.Wpf.AvalonDock, Version=4.5.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\Extended.Wpf.Toolkit.5.0.0\lib\net40\Xceed.Wpf.AvalonDock.dll</HintPath>
|
<HintPath>packages\Extended.Wpf.Toolkit.4.5.0\lib\net40\Xceed.Wpf.AvalonDock.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Xceed.Wpf.AvalonDock.Themes.Aero, Version=5.0.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
<Reference Include="Xceed.Wpf.AvalonDock.Themes.Aero, Version=4.5.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\Extended.Wpf.Toolkit.5.0.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll</HintPath>
|
<HintPath>packages\Extended.Wpf.Toolkit.4.5.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Xceed.Wpf.AvalonDock.Themes.Metro, Version=5.0.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
<Reference Include="Xceed.Wpf.AvalonDock.Themes.Metro, Version=4.5.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\Extended.Wpf.Toolkit.5.0.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll</HintPath>
|
<HintPath>packages\Extended.Wpf.Toolkit.4.5.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Xceed.Wpf.AvalonDock.Themes.VS2010, Version=5.0.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
<Reference Include="Xceed.Wpf.AvalonDock.Themes.VS2010, Version=4.5.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\Extended.Wpf.Toolkit.5.0.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll</HintPath>
|
<HintPath>packages\Extended.Wpf.Toolkit.4.5.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Xceed.Wpf.Toolkit, Version=5.0.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
<Reference Include="Xceed.Wpf.Toolkit, Version=4.5.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\Extended.Wpf.Toolkit.5.0.0\lib\net40\Xceed.Wpf.Toolkit.dll</HintPath>
|
<HintPath>packages\Extended.Wpf.Toolkit.4.5.0\lib\net40\Xceed.Wpf.Toolkit.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@ -297,9 +225,6 @@
|
|||||||
<Compile Include="Controls\ConditionGroupControl.xaml.cs">
|
<Compile Include="Controls\ConditionGroupControl.xaml.cs">
|
||||||
<DependentUpon>ConditionGroupControl.xaml</DependentUpon>
|
<DependentUpon>ConditionGroupControl.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Controls\EasyPeasyControl.xaml.cs">
|
|
||||||
<DependentUpon>EasyPeasyControl.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Controls\EditWindowBase.cs" />
|
<Compile Include="Controls\EditWindowBase.cs" />
|
||||||
<Compile Include="Controls\ENIDataGrid.cs" />
|
<Compile Include="Controls\ENIDataGrid.cs" />
|
||||||
<Compile Include="Controls\IHighlightControlContainer.cs" />
|
<Compile Include="Controls\IHighlightControlContainer.cs" />
|
||||||
@ -312,9 +237,6 @@
|
|||||||
<Compile Include="Controls\ValueMappingsControl.xaml.cs">
|
<Compile Include="Controls\ValueMappingsControl.xaml.cs">
|
||||||
<DependentUpon>ValueMappingsControl.xaml</DependentUpon>
|
<DependentUpon>ValueMappingsControl.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="EditControls\ChangePasswordDialog.xaml.cs">
|
|
||||||
<DependentUpon>ChangePasswordDialog.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="EditControls\CompareExcelDialog.xaml.cs">
|
<Compile Include="EditControls\CompareExcelDialog.xaml.cs">
|
||||||
<DependentUpon>CompareExcelDialog.xaml</DependentUpon>
|
<DependentUpon>CompareExcelDialog.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@ -330,12 +252,6 @@
|
|||||||
<Compile Include="EditControls\NewDGItemDialog.xaml.cs">
|
<Compile Include="EditControls\NewDGItemDialog.xaml.cs">
|
||||||
<DependentUpon>NewDGItemDialog.xaml</DependentUpon>
|
<DependentUpon>NewDGItemDialog.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="EditControls\SelectCrewMemberDialog.xaml.cs">
|
|
||||||
<DependentUpon>SelectCrewMemberDialog.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="EditControls\SelectPortAreaDialog.xaml.cs">
|
|
||||||
<DependentUpon>SelectPortAreaDialog.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Excel\DakosyUtil.cs" />
|
<Compile Include="Excel\DakosyUtil.cs" />
|
||||||
<Compile Include="Excel\ExcelBase.cs" />
|
<Compile Include="Excel\ExcelBase.cs" />
|
||||||
<Compile Include="Excel\ExcelComparer.cs" />
|
<Compile Include="Excel\ExcelComparer.cs" />
|
||||||
@ -515,42 +431,6 @@
|
|||||||
<DesignTime>True</DesignTime>
|
<DesignTime>True</DesignTime>
|
||||||
<DependentUpon>Reference.svcmap</DependentUpon>
|
<DependentUpon>Reference.svcmap</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="SheetDisplayControls\ATAControl.xaml.cs">
|
|
||||||
<DependentUpon>ATAControl.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="SheetDisplayControls\CrewDepartureControl.xaml.cs">
|
|
||||||
<DependentUpon>CrewDepartureControl.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="SheetDisplayControls\CrewPreArrivalControl.xaml.cs">
|
|
||||||
<DependentUpon>CrewPreArrivalControl.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="SheetDisplayControls\DangerousCargoControl.xaml.cs">
|
|
||||||
<DependentUpon>DangerousCargoControl.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="SheetDisplayControls\PassengerDepartureControl.xaml.cs">
|
|
||||||
<DependentUpon>PassengerDepartureControl.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="SheetDisplayControls\PassengerPreArrivalControl.xaml.cs">
|
|
||||||
<DependentUpon>PassengerPreArrivalControl.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="SheetDisplayControls\PortControl.xaml.cs">
|
|
||||||
<DependentUpon>PortControl.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="SheetDisplayControls\PreArrivalControl.xaml.cs">
|
|
||||||
<DependentUpon>PreArrivalControl.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="SheetDisplayControls\PreDepartureControl.xaml.cs">
|
|
||||||
<DependentUpon>PreDepartureControl.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="SheetDisplayControls\ShipDataControl.xaml.cs">
|
|
||||||
<DependentUpon>ShipDataControl.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="SheetDisplayControls\VoyageControl.xaml.cs">
|
|
||||||
<DependentUpon>VoyageControl.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="SheetDisplayControls\WasteReceiptsControl.xaml.cs">
|
|
||||||
<DependentUpon>WasteReceiptsControl.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="SplashScreenWindow.xaml.cs">
|
<Compile Include="SplashScreenWindow.xaml.cs">
|
||||||
<DependentUpon>SplashScreenWindow.xaml</DependentUpon>
|
<DependentUpon>SplashScreenWindow.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@ -561,23 +441,21 @@
|
|||||||
<Compile Include="Util\ByteConverter.cs" />
|
<Compile Include="Util\ByteConverter.cs" />
|
||||||
<Compile Include="Util\CutoffConverter.cs" />
|
<Compile Include="Util\CutoffConverter.cs" />
|
||||||
<Compile Include="Util\DatabaseEntityWatchdog.cs" />
|
<Compile Include="Util\DatabaseEntityWatchdog.cs" />
|
||||||
<Compile Include="Util\EasyPeasyState.cs" />
|
|
||||||
<Compile Include="Util\EnumHelper.cs" />
|
<Compile Include="Util\EnumHelper.cs" />
|
||||||
<Compile Include="Util\EnumToBooleanConverter.cs" />
|
<Compile Include="Util\EnumToBooleanConverter.cs" />
|
||||||
<Compile Include="Util\EnumToCollectionConverter.cs" />
|
<Compile Include="Util\EnumToCollectionConverter.cs" />
|
||||||
<Compile Include="Util\ExpandableListConverter.cs" />
|
<Compile Include="Util\ExpandableListConverter.cs" />
|
||||||
<Compile Include="Util\Extensions.cs" />
|
|
||||||
<Compile Include="Util\GlobalStructures.cs" />
|
<Compile Include="Util\GlobalStructures.cs" />
|
||||||
<Compile Include="Util\HighlightService.cs" />
|
<Compile Include="Util\HighlightService.cs" />
|
||||||
<Compile Include="Util\InverseBooleanConverter.cs" />
|
<Compile Include="Util\InverseBooleanConverter.cs" />
|
||||||
<Compile Include="Util\NullImageConverter.cs" />
|
<Compile Include="Util\NullImageConverter.cs" />
|
||||||
<Compile Include="Util\NumberValidationRule.cs" />
|
|
||||||
<Compile Include="Util\SettingBindingExtension.cs" />
|
|
||||||
<Compile Include="Util\StringValidationRule.cs" />
|
|
||||||
<Compile Include="Util\TrimStringConverter.cs" />
|
<Compile Include="Util\TrimStringConverter.cs" />
|
||||||
<Compile Include="Util\UIHelper.cs" />
|
<Compile Include="Util\UIHelper.cs" />
|
||||||
<Compile Include="Util\UtcToLocalDateTimeConverter.cs" />
|
<Compile Include="Util\UtcToLocalDateTimeConverter.cs" />
|
||||||
<Compile Include="Util\ValidationContext.cs" />
|
<Compile Include="Util\ValidationContext.cs" />
|
||||||
|
<Compile Include="VorgaengeControl.xaml.cs">
|
||||||
|
<DependentUpon>VorgaengeControl.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="WindowPlacement.cs" />
|
<Compile Include="WindowPlacement.cs" />
|
||||||
<Page Include="AnmeldungenControl.xaml">
|
<Page Include="AnmeldungenControl.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
@ -591,10 +469,6 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="Controls\EasyPeasyControl.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Include="Controls\LocodeControl.xaml">
|
<Page Include="Controls\LocodeControl.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@ -691,10 +565,6 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="EditControls\ChangePasswordDialog.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Include="EditControls\CompareExcelDialog.xaml">
|
<Page Include="EditControls\CompareExcelDialog.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@ -823,18 +693,10 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="EditControls\SelectCrewMemberDialog.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Include="EditControls\SelectImportClassesDialog.xaml">
|
<Page Include="EditControls\SelectImportClassesDialog.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="EditControls\SelectPortAreaDialog.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Include="EditControls\ShowIdDialog.xaml">
|
<Page Include="EditControls\ShowIdDialog.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@ -870,54 +732,6 @@
|
|||||||
<DependentUpon>MainWindow.xaml</DependentUpon>
|
<DependentUpon>MainWindow.xaml</DependentUpon>
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Page Include="SheetDisplayControls\ATAControl.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Include="SheetDisplayControls\CrewDepartureControl.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Include="SheetDisplayControls\CrewPreArrivalControl.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Include="SheetDisplayControls\DangerousCargoControl.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Include="SheetDisplayControls\PassengerDepartureControl.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Include="SheetDisplayControls\PassengerPreArrivalControl.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Include="SheetDisplayControls\PortControl.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Include="SheetDisplayControls\PreArrivalControl.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Include="SheetDisplayControls\PreDepartureControl.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Include="SheetDisplayControls\ShipDataControl.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Include="SheetDisplayControls\VoyageControl.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Include="SheetDisplayControls\WasteReceiptsControl.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Include="SplashScreenWindow.xaml">
|
<Page Include="SplashScreenWindow.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@ -930,6 +744,10 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="VorgaengeControl.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Properties\AssemblyInfo.cs">
|
<Compile Include="Properties\AssemblyInfo.cs">
|
||||||
@ -945,6 +763,10 @@
|
|||||||
<DependentUpon>Settings.settings</DependentUpon>
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Content Include="..\misc\Logo.gif">
|
||||||
|
<Link>Report\Logo.gif</Link>
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
<Content Include="..\misc\report.db">
|
<Content Include="..\misc\report.db">
|
||||||
<Link>report.db</Link>
|
<Link>report.db</Link>
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
@ -962,9 +784,6 @@
|
|||||||
<None Include="ENI2_3_TemporaryKey.pfx" />
|
<None Include="ENI2_3_TemporaryKey.pfx" />
|
||||||
<None Include="ENI2_4_TemporaryKey.pfx" />
|
<None Include="ENI2_4_TemporaryKey.pfx" />
|
||||||
<None Include="ENI2_5_TemporaryKey.pfx" />
|
<None Include="ENI2_5_TemporaryKey.pfx" />
|
||||||
<None Include="ENI2_6_TemporaryKey.pfx" />
|
|
||||||
<None Include="ENI2_7_TemporaryKey.pfx" />
|
|
||||||
<None Include="packages.config" />
|
|
||||||
<None Include="Service References\LockingServiceReference\ENI2.LockingServiceReference.CoreLock.datasource">
|
<None Include="Service References\LockingServiceReference\ENI2.LockingServiceReference.CoreLock.datasource">
|
||||||
<DependentUpon>Reference.svcmap</DependentUpon>
|
<DependentUpon>Reference.svcmap</DependentUpon>
|
||||||
</None>
|
</None>
|
||||||
@ -1047,15 +866,6 @@
|
|||||||
<Resource Include="Resources\document_plain_new.png" />
|
<Resource Include="Resources\document_plain_new.png" />
|
||||||
<Resource Include="Resources\exit.png" />
|
<Resource Include="Resources\exit.png" />
|
||||||
<Resource Include="Resources\document_exchange.png" />
|
<Resource Include="Resources\document_exchange.png" />
|
||||||
<Resource Include="Resources\arrival_user.png" />
|
|
||||||
<Resource Include="Resources\arrival_worker.png" />
|
|
||||||
<Resource Include="Resources\departure_user.png" />
|
|
||||||
<Resource Include="Resources\departure_worker.png" />
|
|
||||||
<Resource Include="Resources\clock.png" />
|
|
||||||
<Content Include="Report\Logo.png">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Resource Include="Resources\pencil.png" />
|
|
||||||
<Content Include="x64\SQLite.Interop.dll">
|
<Content Include="x64\SQLite.Interop.dll">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
@ -1082,6 +892,7 @@
|
|||||||
</Content>
|
</Content>
|
||||||
<None Include="bsmdKey.snk" />
|
<None Include="bsmdKey.snk" />
|
||||||
<None Include="ENI2.licenseheader" />
|
<None Include="ENI2.licenseheader" />
|
||||||
|
<None Include="packages.config" />
|
||||||
<None Include="Properties\app.manifest" />
|
<None Include="Properties\app.manifest" />
|
||||||
<None Include="Properties\Settings.settings">
|
<None Include="Properties\Settings.settings">
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
@ -1104,9 +915,9 @@
|
|||||||
<Resource Include="Resources\containership.ico" />
|
<Resource Include="Resources\containership.ico" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<BootstrapperPackage Include=".NETFramework,Version=v4.8">
|
<BootstrapperPackage Include=".NETFramework,Version=v4.5.2">
|
||||||
<Visible>False</Visible>
|
<Visible>False</Visible>
|
||||||
<ProductName>Microsoft .NET Framework 4.8 %28x86 and x64%29</ProductName>
|
<ProductName>Microsoft .NET Framework 4.5.2 %28x86 and x64%29</ProductName>
|
||||||
<Install>true</Install>
|
<Install>true</Install>
|
||||||
</BootstrapperPackage>
|
</BootstrapperPackage>
|
||||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||||
@ -1204,17 +1015,15 @@
|
|||||||
<SignToolPath Condition="'$(SignToolPath)' == '' And '$(SignToolPathBase)' != ''">$(SignToolPathBase)$(Platform)\</SignToolPath>
|
<SignToolPath Condition="'$(SignToolPath)' == '' And '$(SignToolPathBase)' != ''">$(SignToolPathBase)$(Platform)\</SignToolPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>"$(SignToolPath)signtool.exe" sign /f $(ProjectDir)\ENI2_7_TemporaryKey.pfx /p FgrMFUWsTVGQeb6L6i0e /fd SHA256 $(TargetPath)</PostBuildEvent>
|
<PostBuildEvent>"$(SignToolPath)signtool.exe" sign /f $(ProjectDir)\..\misc\codesigning.pfx /p t5bj2dk9ifdIWBPhPra4U $(TargetPath)</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" />
|
<Import Project="packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.117.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.117.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" />
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Error Condition="!Exists('packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets'))" />
|
<Error Condition="!Exists('packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.117.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.117.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets'))" />
|
||||||
<Error Condition="!Exists('packages\System.ValueTuple.4.6.1\build\net471\System.ValueTuple.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\System.ValueTuple.4.6.1\build\net471\System.ValueTuple.targets'))" />
|
|
||||||
</Target>
|
</Target>
|
||||||
<Import Project="packages\System.ValueTuple.4.6.1\build\net471\System.ValueTuple.targets" Condition="Exists('packages\System.ValueTuple.4.6.1\build\net471\System.ValueTuple.targets')" />
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- 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.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
|
|||||||
@ -1,37 +0,0 @@
|
|||||||
<enictrl:EditWindowBase x:Class="ENI2.EditControls.ChangePasswordDialog"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
xmlns:enictrl="clr-namespace:ENI2.Controls"
|
|
||||||
xmlns:p="clr-namespace:ENI2.Properties"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
Title="Change password" Height="243" Width="400" Loaded="EditWindowBase_Loaded" Background="AliceBlue">
|
|
||||||
<Grid>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="28" />
|
|
||||||
<RowDefinition Height="28" />
|
|
||||||
<RowDefinition Height="28" />
|
|
||||||
<RowDefinition Height="28" />
|
|
||||||
<RowDefinition Height="28" />
|
|
||||||
<RowDefinition Height="28" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width=".4*" />
|
|
||||||
<ColumnDefinition Width=".6*" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<Label Grid.Row="0" Grid.Column="0" Content="Name" />
|
|
||||||
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textOldPassword}" />
|
|
||||||
<Label Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textNewPassword}" />
|
|
||||||
<Label Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textRepeatNewPassword}" />
|
|
||||||
<TextBlock Grid.Row="0" Grid.Column="1" x:Name="textBlockName" VerticalAlignment="Center" FontWeight="DemiBold"/>
|
|
||||||
<PasswordBox Grid.Row="1" Grid.Column="1" x:Name="textBoxOldPassword" Margin="2" VerticalContentAlignment="Center" />
|
|
||||||
<PasswordBox Grid.Row="2" Grid.Column="1" x:Name="textBoxNew1Password" Margin="2" VerticalContentAlignment="Center" />
|
|
||||||
<PasswordBox Grid.Row="3" Grid.Column="1" x:Name="textBoxNew2Password" Margin="2" VerticalContentAlignment="Center" />
|
|
||||||
<Label Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textDefaultDisplay}" />
|
|
||||||
<ComboBox x:Name="comboBoxDefaultDisplay" Grid.Column="1" Grid.Row="4" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" IsEditable="False" />
|
|
||||||
<Button Grid.Row="5" Grid.Column="1" Content="Change" Name="buttonChangePassword" Margin="2" Width="80" HorizontalAlignment="Left" Click="buttonChangePassword_Click"/>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
</enictrl:EditWindowBase>
|
|
||||||
@ -1,98 +0,0 @@
|
|||||||
// Copyright (c) 2017- schick Informatik
|
|
||||||
// Description: Users may change their password
|
|
||||||
//
|
|
||||||
|
|
||||||
using bsmd.database;
|
|
||||||
using ENI2.Controls;
|
|
||||||
using System;
|
|
||||||
using System.Windows;
|
|
||||||
using System.Windows.Controls;
|
|
||||||
|
|
||||||
namespace ENI2.EditControls
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interaction logic for ChangePasswordDialog.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class ChangePasswordDialog : EditWindowBase
|
|
||||||
{
|
|
||||||
|
|
||||||
#region Construction
|
|
||||||
|
|
||||||
public ChangePasswordDialog()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Properties
|
|
||||||
|
|
||||||
public ReportingParty CurrentUser { get; set; }
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region event handler
|
|
||||||
|
|
||||||
private void buttonChangePassword_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
bool success = false;
|
|
||||||
string message = "";
|
|
||||||
if (!textBoxOldPassword.Password.IsNullOrEmpty() || !textBoxNew1Password.Password.IsNullOrEmpty() || !textBoxNew2Password.Password.IsNullOrEmpty())
|
|
||||||
{
|
|
||||||
if (!textBoxOldPassword.Password.IsNullOrEmpty())
|
|
||||||
{
|
|
||||||
if (CurrentUser.GetHash(textBoxOldPassword.Password).Equals(CurrentUser.PasswordHash))
|
|
||||||
{
|
|
||||||
if (textBoxNew1Password.Password.IsNullOrEmpty() ||
|
|
||||||
textBoxNew2Password.Password.IsNullOrEmpty() ||
|
|
||||||
!textBoxNew1Password.Password.Equals(textBoxNew2Password.Password))
|
|
||||||
{
|
|
||||||
message = "New passwords are empty or do not match";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (textBoxOldPassword.Password.Equals(textBoxNew1Password.Password))
|
|
||||||
{
|
|
||||||
message = "Old and new password are the same";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CurrentUser.SetPassword(textBoxNew1Password.Password);
|
|
||||||
success = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
message = "Old password is not correct";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
message = "Old password empty";
|
|
||||||
}
|
|
||||||
if (!success)
|
|
||||||
MessageBox.Show(message, "Changing password failed", MessageBoxButton.OK, MessageBoxImage.Error);
|
|
||||||
else
|
|
||||||
MessageBox.Show("Password successfully changed.", "Password changed", MessageBoxButton.OK, MessageBoxImage.Information);
|
|
||||||
}
|
|
||||||
// user may have changed combobox default display value so we are saving anyway here
|
|
||||||
this.CurrentUser.ShipcallDisplayMode = (ReportingParty.ShipcallDisplayModeEnum)Enum.Parse(typeof(ReportingParty.ShipcallDisplayModeEnum), (string)this.comboBoxDefaultDisplay.SelectedValue);
|
|
||||||
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(CurrentUser);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void EditWindowBase_Loaded(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
this.textBlockName.Text = CurrentUser.Logon;
|
|
||||||
this.AddVisible = false;
|
|
||||||
this.OkVisible = false;
|
|
||||||
var cancelButton = (Button)Template.FindName("buttonCancel", this);
|
|
||||||
cancelButton.Content = "Close";
|
|
||||||
this.comboBoxDefaultDisplay.ItemsSource = Util.EnumHelper.GetAllValuesAndDescription(typeof(ReportingParty.ShipcallDisplayModeEnum));
|
|
||||||
this.comboBoxDefaultDisplay.SelectedValue = this.CurrentUser.ShipcallDisplayMode;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -8,7 +8,7 @@
|
|||||||
xmlns:p="clr-namespace:ENI2.Properties"
|
xmlns:p="clr-namespace:ENI2.Properties"
|
||||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="{x:Static p:Resources.textCompareExcel}" Height="260" Width="600" Background="AliceBlue" Icon="/ENI2Test;component/Resources/bullet_ball_grey.ico">
|
Title="{x:Static p:Resources.textCompareExcel}" Height="260" Width="600" Background="AliceBlue" Icon="/ENI2;component/Resources/bullet_ball_grey.ico">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="32" />
|
<RowDefinition Height="32" />
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
xmlns:p="clr-namespace:ENI2.Properties"
|
xmlns:p="clr-namespace:ENI2.Properties"
|
||||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="{x:Static p:Resources.textCopyDeclaration}" Height="326" Width="440" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="NoResize" Icon="/ENI2Test;component/Resources/id_cards.ico">
|
Title="{x:Static p:Resources.textCopyDeclaration}" Height="326" Width="440" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="NoResize" Icon="/ENI2;component/Resources/id_cards.ico">
|
||||||
<Grid Margin="5">
|
<Grid Margin="5">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
@ -60,7 +60,7 @@
|
|||||||
ButtonSpinnerLocation="Right"
|
ButtonSpinnerLocation="Right"
|
||||||
ParsingNumberStyle="Integer"
|
ParsingNumberStyle="Integer"
|
||||||
Watermark="Enter ENI" ValueChanged="doubleUpDownENI_ValueChanged" TextAlignment="Left"/>
|
Watermark="Enter ENI" ValueChanged="doubleUpDownENI_ValueChanged" TextAlignment="Left"/>
|
||||||
<enictrl:LocodeControl Grid.Column="1" Grid.Row="3" Grid.ColumnSpan="2" Width="Auto" x:Name="locodePoC" LocodeSource="OLD" />
|
<enictrl:LocodeControl Grid.Column="1" Grid.Row="3" Grid.ColumnSpan="2" Width="Auto" x:Name="locodePoC" />
|
||||||
<DatePicker Name="datePickerETA" Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" SelectedDateChanged="datePickerETA_SelectedDateChanged" DisplayDateStart="1/1/1900" DisplayDateEnd="12/31/2199">
|
<DatePicker Name="datePickerETA" Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" SelectedDateChanged="datePickerETA_SelectedDateChanged" DisplayDateStart="1/1/1900" DisplayDateEnd="12/31/2199">
|
||||||
<DatePicker.BlackoutDates>
|
<DatePicker.BlackoutDates>
|
||||||
<CalendarDateRange Start="1/1/0001" End="12/31/1799"/>
|
<CalendarDateRange Start="1/1/0001" End="12/31/1799"/>
|
||||||
|
|||||||
@ -57,7 +57,7 @@ namespace ENI2.EditControls
|
|||||||
isComplete &= imo_OR_eni;
|
isComplete &= imo_OR_eni;
|
||||||
|
|
||||||
string locode = this.locodePoC.LocodeValue;
|
string locode = this.locodePoC.LocodeValue;
|
||||||
bool validLocode = (locode?.Length == 5) && (locode.StartsWith("DE") || locode.StartsWith("DK") || locode.Equals("ZZNOK") || locode.Equals("DEWHV"));
|
bool validLocode = (locode?.Length == 5) && (locode.StartsWith("DE") || locode.StartsWith("DK") || locode.Equals("ZZNOK"));
|
||||||
|
|
||||||
isComplete &= validLocode;
|
isComplete &= validLocode;
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||||
xmlns:p="clr-namespace:ENI2.Properties"
|
xmlns:p="clr-namespace:ENI2.Properties"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="{x:Static p:Resources.textCoreStatus}" Height="436" Width="600" WindowStyle="SingleBorderWindow" Background="AliceBlue" Icon="/ENI2Test;component/Resources/bullet_ball_grey.ico" >
|
Title="{x:Static p:Resources.textCoreStatus}" Height="436" Width="600" WindowStyle="SingleBorderWindow" Background="AliceBlue" Icon="/ENI2;component/Resources/bullet_ball_grey.ico" >
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="0.3*"/>
|
<ColumnDefinition Width="0.3*"/>
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
<ColumnDefinition Width="3*" />
|
<ColumnDefinition Width="3*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Label Content="{x:Static p:Resources.textBunkerType}" Grid.Row="0" Grid.Column="0" />
|
<Label Content="{x:Static p:Resources.textBunkerType}" Grid.Row="0" Grid.Column="0" />
|
||||||
<TextBox Grid.Row="0" Grid.Column="1" Width="auto" Name="textBoxBunkerType" Margin="2" MaxLength="25" VerticalContentAlignment="Center"/>
|
<TextBox Grid.Row="0" Grid.Column="1" Width="auto" Name="textBoxBunkerType" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
|
||||||
<Label Content="{x:Static p:Resources.textBunkerQuantity}" Grid.Row="1" Grid.Column="0" />
|
<Label Content="{x:Static p:Resources.textBunkerQuantity}" Grid.Row="1" Grid.Column="0" />
|
||||||
<xctk:DoubleUpDown Grid.Row="1" Grid.Column="1" Name="doubleUpDownBunkerQuantity" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2,2,2,2" FormatString="N1" TextAlignment="Left" />
|
<xctk:DoubleUpDown Grid.Row="1" Grid.Column="1" Name="doubleUpDownBunkerQuantity" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2,2,2,2" FormatString="N1" TextAlignment="Left" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
<Label Name="labelNationality" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textNationality}" />
|
<Label Name="labelNationality" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textNationality}" />
|
||||||
<Label Name="labelDateOfBirth" Grid.Row="3" Grid.Column="2" Content="{x:Static p:Resources.textDateOfBirth}" />
|
<Label Name="labelDateOfBirth" Grid.Row="3" Grid.Column="2" Content="{x:Static p:Resources.textDateOfBirth}" />
|
||||||
<Label Name="labelIdDocType" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textIdDocType}" />
|
<Label Name="labelIdDocType" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textIdDocType}" />
|
||||||
<Label Name="labelCountryOfBirth" Grid.Row="4" Grid.Column="1" Content="{x:Static p:Resources.textCountryOfBirth}" Grid.ColumnSpan="2" Margin="263,0,1,0" />
|
<!--<Label Name="labelCountryOfBirth" Grid.Row="4" Grid.Column="1" Content="{x:Static p:Resources.textCountryOfBirth}" Grid.ColumnSpan="2" Margin="263,0,1,0" />--> <!-- XXX : TODO -->
|
||||||
<Label Name="labelIdDocNumber" Grid.Row="5" Grid.Column="2" Content="{x:Static p:Resources.textIdDocNumber}" />
|
<Label Name="labelIdDocNumber" Grid.Row="5" Grid.Column="2" Content="{x:Static p:Resources.textIdDocNumber}" />
|
||||||
<Label Name="labelVisaNumber" Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textVisaNumber}" />
|
<Label Name="labelVisaNumber" Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textVisaNumber}" />
|
||||||
<Label Name="labelIssuingState" Grid.Row="6" Grid.Column="2" Content="{x:Static p:Resources.textDocumentIssuingState}" />
|
<Label Name="labelIssuingState" Grid.Row="6" Grid.Column="2" Content="{x:Static p:Resources.textDocumentIssuingState}" />
|
||||||
@ -42,29 +42,27 @@
|
|||||||
<!--Label Name="labelEffects" Grid.Row="7" Grid.Column="0" Content="{x:Static p:Resources.textEffects}" /-->
|
<!--Label Name="labelEffects" Grid.Row="7" Grid.Column="0" Content="{x:Static p:Resources.textEffects}" /-->
|
||||||
<TextBox Grid.Row="0" Grid.Column="1" Width="auto" Name="textBoxDuty" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
|
<TextBox Grid.Row="0" Grid.Column="1" Width="auto" Name="textBoxDuty" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
|
||||||
<TextBox Grid.Row="1" Grid.Column="1" Width="auto" Name="textBoxLastName" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
|
<TextBox Grid.Row="1" Grid.Column="1" Width="auto" Name="textBoxLastName" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
|
||||||
<ComboBox Grid.Row="2" Grid.Column="1" Name="comboBoxGender" Margin="2" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" SelectedValuePath="Key" DisplayMemberPath="Value" ContextMenu="{DynamicResource ClearContextMenu}"/>
|
|
||||||
<ComboBox Grid.Row="3" Grid.Column="1" Name="comboBoxNationality" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" ContextMenu="{DynamicResource ClearContextMenu}"/>
|
|
||||||
<ComboBox Grid.Row="4" Grid.Column="1" Name="comboBoxIdDocType" Margin="2" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" SelectedValuePath="Key" DisplayMemberPath="Value" ContextMenu="{DynamicResource ClearContextMenu}" />
|
|
||||||
<TextBox Grid.Row="5" Grid.Column="1" Width="auto" Name="textBoxVisaNumber" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
|
|
||||||
<DatePicker Grid.Row="6" Grid.Column="1" Name="datePickerExpiryDate" Margin="2" DisplayDateStart="1/1/1900" DisplayDateEnd="12/31/2199" PreviewKeyUp="DateTimePicker_PreviewKeyUpDate">
|
|
||||||
<DatePicker.BlackoutDates>
|
|
||||||
<CalendarDateRange Start="1/1/0001" End="12/31/1899"/>
|
|
||||||
<CalendarDateRange Start="1/1/2199" End="1/1/9999"/>
|
|
||||||
</DatePicker.BlackoutDates>
|
|
||||||
</DatePicker>
|
|
||||||
|
|
||||||
<TextBox Grid.Row="1" Grid.Column="3" Width="auto" Name="textBoxFirstName" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
|
<TextBox Grid.Row="1" Grid.Column="3" Width="auto" Name="textBoxFirstName" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
|
||||||
|
<ComboBox Grid.Row="2" Grid.Column="1" Name="comboBoxGender" Margin="2" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" SelectedValuePath="Key" DisplayMemberPath="Value" ContextMenu="{DynamicResource ClearContextMenu}"/>
|
||||||
<TextBox Grid.Row="2" Grid.Column="3" Width="auto" Name="textBoxPlaceOfBirth" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
|
<TextBox Grid.Row="2" Grid.Column="3" Width="auto" Name="textBoxPlaceOfBirth" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
|
||||||
|
<ComboBox Grid.Row="3" Grid.Column="1" Name="comboBoxNationality" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" ContextMenu="{DynamicResource ClearContextMenu}"/>
|
||||||
<DatePicker Grid.Row="3" Grid.Column="3" Name="datePickerDateOfBirth" Margin="2" DisplayDateStart="1/1/1900" DisplayDateEnd="12/31/2199" PreviewKeyUp="DateTimePicker_PreviewKeyUpDate">
|
<DatePicker Grid.Row="3" Grid.Column="3" Name="datePickerDateOfBirth" Margin="2" DisplayDateStart="1/1/1900" DisplayDateEnd="12/31/2199" PreviewKeyUp="DateTimePicker_PreviewKeyUpDate">
|
||||||
<DatePicker.BlackoutDates>
|
<DatePicker.BlackoutDates>
|
||||||
<CalendarDateRange Start="1/1/0001" End="12/31/1899"/>
|
<CalendarDateRange Start="1/1/0001" End="12/31/1899"/>
|
||||||
<CalendarDateRange Start="1/1/2199" End="1/1/9999"/>
|
<CalendarDateRange Start="1/1/2199" End="1/1/9999"/>
|
||||||
</DatePicker.BlackoutDates>
|
</DatePicker.BlackoutDates>
|
||||||
</DatePicker>
|
</DatePicker>
|
||||||
<ComboBox Grid.Row="4" Grid.Column="3" Width="auto" Name="comboBoxCountryOfBirth" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" ContextMenu="{DynamicResource ClearContextMenu}"/>
|
<ComboBox Grid.Row="4" Grid.Column="1" Name="comboBoxIdDocType" Margin="2" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" SelectedValuePath="Key" DisplayMemberPath="Value" ContextMenu="{DynamicResource ClearContextMenu}" />
|
||||||
|
<!-- <ComboBox Grid.Row="4" Grid.Column="3" Width="auto" Name="comboBoxCountryOfBirth" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" ContextMenu="{DynamicResource ClearContextMenu}"/>-->
|
||||||
<TextBox Grid.Row="5" Grid.Column="3" Width="auto" Name="textBoxIdDocNumber" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
<TextBox Grid.Row="5" Grid.Column="3" Width="auto" Name="textBoxIdDocNumber" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
||||||
|
<TextBox Grid.Row="5" Grid.Column="1" Width="auto" Name="textBoxVisaNumber" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
|
||||||
<ComboBox Grid.Row="6" Grid.Column="3" Width="auto" Name="comboBoxIssuingState" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" ContextMenu="{DynamicResource ClearContextMenu}"/>
|
<ComboBox Grid.Row="6" Grid.Column="3" Width="auto" Name="comboBoxIssuingState" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" ContextMenu="{DynamicResource ClearContextMenu}"/>
|
||||||
|
<DatePicker Grid.Row="6" Grid.Column="1" Name="datePickerExpiryDate" Margin="2" DisplayDateStart="1/1/1900" DisplayDateEnd="12/31/2199" PreviewKeyUp="DateTimePicker_PreviewKeyUpDate">
|
||||||
|
<DatePicker.BlackoutDates>
|
||||||
|
<CalendarDateRange Start="1/1/0001" End="12/31/1899"/>
|
||||||
|
<CalendarDateRange Start="1/1/2199" End="1/1/9999"/>
|
||||||
|
</DatePicker.BlackoutDates>
|
||||||
|
</DatePicker>
|
||||||
<!--TextBox Grid.Row="7" Grid.Column="1" Width="auto" Name="textBoxEffects" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/-->
|
<!--TextBox Grid.Row="7" Grid.Column="1" Width="auto" Name="textBoxEffects" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/-->
|
||||||
</Grid>
|
</Grid>
|
||||||
</enictrl:EditWindowBase>
|
</enictrl:EditWindowBase>
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
// Description: CREW Bearbeitungsdialog
|
// Description: CREW Bearbeitungsdialog
|
||||||
//
|
//
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
|
||||||
using bsmd.database;
|
using bsmd.database;
|
||||||
@ -16,7 +15,6 @@ namespace ENI2.EditControls
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class EditCREWDialog : EditWindowBase
|
public partial class EditCREWDialog : EditWindowBase
|
||||||
{
|
{
|
||||||
|
|
||||||
public EditCREWDialog()
|
public EditCREWDialog()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@ -37,39 +35,17 @@ namespace ENI2.EditControls
|
|||||||
this.textBoxPlaceOfBirth.Text = this.CREW.CrewMemberPlaceOfBirth;
|
this.textBoxPlaceOfBirth.Text = this.CREW.CrewMemberPlaceOfBirth;
|
||||||
this.comboBoxNationality.ItemsSource = bsmd.database.CREW.NationalityDict;
|
this.comboBoxNationality.ItemsSource = bsmd.database.CREW.NationalityDict;
|
||||||
this.comboBoxNationality.SelectedValue = this.CREW.CrewMemberNationality;
|
this.comboBoxNationality.SelectedValue = this.CREW.CrewMemberNationality;
|
||||||
if (this.CREW.CrewMemberDateOfBirth > CREW.CLAMPMAXDATE)
|
|
||||||
{
|
|
||||||
this.datePickerDateOfBirth.SelectedDate = CREW.CLAMPMAXDATE;
|
|
||||||
}
|
|
||||||
else if (this.CREW.CrewMemberDateOfBirth < CREW.CLAMPMINDATE)
|
|
||||||
{
|
|
||||||
this.datePickerDateOfBirth.SelectedDate = CREW.CLAMPMINDATE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.datePickerDateOfBirth.SelectedDate = this.CREW.CrewMemberDateOfBirth;
|
this.datePickerDateOfBirth.SelectedDate = this.CREW.CrewMemberDateOfBirth;
|
||||||
}
|
|
||||||
this.comboBoxIdDocType.ItemsSource = GlobalStructures.IDDocTypeDict;
|
this.comboBoxIdDocType.ItemsSource = GlobalStructures.IDDocTypeDict;
|
||||||
this.comboBoxIdDocType.SelectedValue = this.CREW.CrewMemberIdentityDocumentType?.ToString();
|
this.comboBoxIdDocType.SelectedValue = this.CREW.CrewMemberIdentityDocumentType?.ToString();
|
||||||
this.textBoxIdDocNumber.Text = this.CREW.CrewMemberIdentityDocumentId;
|
this.textBoxIdDocNumber.Text = this.CREW.CrewMemberIdentityDocumentId;
|
||||||
this.textBoxVisaNumber.Text = this.CREW.CrewMemberVisaNumber;
|
this.textBoxVisaNumber.Text = this.CREW.CrewMemberVisaNumber;
|
||||||
this.comboBoxIssuingState.ItemsSource = bsmd.database.CREW.NationalityDict;
|
this.comboBoxIssuingState.ItemsSource = bsmd.database.CREW.NationalityDict;
|
||||||
this.comboBoxIssuingState.SelectedValue = this.CREW.CrewMemberIdentityDocumentIssuingState;
|
this.comboBoxIssuingState.SelectedValue = this.CREW.CrewMemberIdentityDocumentIssuingState;
|
||||||
if (this.CREW.CrewMemberIdentityDocumentExpiryDate > CREW.CLAMPMAXDATE)
|
if(this.CREW.CrewMemberIdentityDocumentExpiryDate.HasValue)
|
||||||
{
|
|
||||||
this.datePickerExpiryDate.SelectedDate = CREW.CLAMPMAXDATE;
|
|
||||||
}
|
|
||||||
else if(this.CREW.CrewMemberDateOfBirth < CREW.CLAMPMINDATE)
|
|
||||||
{
|
|
||||||
this.datePickerExpiryDate.SelectedDate = CREW.CLAMPMINDATE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.datePickerExpiryDate.SelectedDate = this.CREW.CrewMemberIdentityDocumentExpiryDate;
|
this.datePickerExpiryDate.SelectedDate = this.CREW.CrewMemberIdentityDocumentExpiryDate;
|
||||||
}
|
// this.comboBoxCountryOfBirth.ItemsSource = bsmd.database.CREW.NationalityDict; // XXX: TODO
|
||||||
|
// this.comboBoxCountryOfBirth.SelectedValue = this.CREW.CrewMemberCountryOfBirth;
|
||||||
this.comboBoxCountryOfBirth.ItemsSource = bsmd.database.CREW.NationalityDict;
|
|
||||||
this.comboBoxCountryOfBirth.SelectedValue = this.CREW.CrewMemberCountryOfBirth;
|
|
||||||
// this.textBoxEffects.Text = this.CREW.Effects;
|
// this.textBoxEffects.Text = this.CREW.Effects;
|
||||||
this.OKClicked += EditCREWDialog_OKClicked;
|
this.OKClicked += EditCREWDialog_OKClicked;
|
||||||
this.AddVisible = true;
|
this.AddVisible = true;
|
||||||
@ -79,7 +55,6 @@ namespace ENI2.EditControls
|
|||||||
{
|
{
|
||||||
// copy back
|
// copy back
|
||||||
this.CREW.CrewMemberDuty = this.textBoxDuty.Text.Trim();
|
this.CREW.CrewMemberDuty = this.textBoxDuty.Text.Trim();
|
||||||
if (this.CREW.CrewMemberDuty.IsNullOrEmpty()) this.CREW.CrewMemberDuty = "unknown";
|
|
||||||
this.CREW.CrewMemberLastName = this.textBoxLastName.Text.Trim();
|
this.CREW.CrewMemberLastName = this.textBoxLastName.Text.Trim();
|
||||||
this.CREW.CrewMemberFirstName = this.textBoxFirstName.Text.Trim();
|
this.CREW.CrewMemberFirstName = this.textBoxFirstName.Text.Trim();
|
||||||
this.CREW.CrewMemberGender = (this.comboBoxGender.SelectedIndex == -1) ? null : (byte?) byte.Parse((string) this.comboBoxGender.SelectedValue);
|
this.CREW.CrewMemberGender = (this.comboBoxGender.SelectedIndex == -1) ? null : (byte?) byte.Parse((string) this.comboBoxGender.SelectedValue);
|
||||||
@ -91,7 +66,7 @@ namespace ENI2.EditControls
|
|||||||
this.CREW.CrewMemberVisaNumber = this.textBoxVisaNumber.Text.Trim();
|
this.CREW.CrewMemberVisaNumber = this.textBoxVisaNumber.Text.Trim();
|
||||||
this.CREW.CrewMemberIdentityDocumentIssuingState = (this.comboBoxIssuingState.SelectedValue == null) ? "" : (string) this.comboBoxIssuingState.SelectedValue;
|
this.CREW.CrewMemberIdentityDocumentIssuingState = (this.comboBoxIssuingState.SelectedValue == null) ? "" : (string) this.comboBoxIssuingState.SelectedValue;
|
||||||
this.CREW.CrewMemberIdentityDocumentExpiryDate = this.datePickerExpiryDate.SelectedDate;
|
this.CREW.CrewMemberIdentityDocumentExpiryDate = this.datePickerExpiryDate.SelectedDate;
|
||||||
this.CREW.CrewMemberCountryOfBirth = (this.comboBoxCountryOfBirth.SelectedValue == null) ? "" : (string)this.comboBoxCountryOfBirth.SelectedValue;
|
// this.CREW.CrewMemberCountryOfBirth = (this.comboBoxCountryOfBirth.SelectedValue == null) ? "" : (string)this.comboBoxCountryOfBirth.SelectedValue;
|
||||||
// this.CREW.Effects = this.textBoxEffects.Text.Trim();
|
// this.CREW.Effects = this.textBoxEffects.Text.Trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -52,7 +52,7 @@
|
|||||||
</DatePicker.BlackoutDates>
|
</DatePicker.BlackoutDates>
|
||||||
</DatePicker>
|
</DatePicker>
|
||||||
<ComboBox Name="comboBoxShipSecurityLevel" Grid.Row="5" Grid.Column="1" Margin="2" />
|
<ComboBox Name="comboBoxShipSecurityLevel" Grid.Row="5" Grid.Column="1" Margin="2" />
|
||||||
<TextBox Name="textBoxGisisCode" Grid.Row="6" Grid.Column="1" Margin="2" MaxLength="4" VerticalContentAlignment="Center" PreviewTextInput="textBoxGisisCode_PreviewTextInput" PreviewKeyDown="textBoxGisisCode_PreviewKeyDown"/>
|
<TextBox Name="textBoxGisisCode" Grid.Row="6" Grid.Column="1" Margin="2" MaxLength="4" VerticalContentAlignment="Center"/>
|
||||||
<TextBox Name="textBoxGisisDescription" Grid.Row="7" Grid.Column="1" Margin="2" IsEnabled="False"/>
|
<TextBox Name="textBoxGisisDescription" Grid.Row="7" Grid.Column="1" Margin="2" IsEnabled="False"/>
|
||||||
<enictrl:LocodeControl x:Name="locodeGISIS" Grid.Row="8" Grid.Column="1" />
|
<enictrl:LocodeControl x:Name="locodeGISIS" Grid.Row="8" Grid.Column="1" />
|
||||||
<TextBox Name="textBoxSecurityMatters" Grid.Row="9" Grid.Column="1" Margin="2" MaxLength="255" />
|
<TextBox Name="textBoxSecurityMatters" Grid.Row="9" Grid.Column="1" Margin="2" MaxLength="255" />
|
||||||
|
|||||||
@ -34,7 +34,7 @@ namespace ENI2.EditControls
|
|||||||
this.comboBoxShipSecurityLevel.ItemsSource = GlobalStructures.ShipSecurityLevels;
|
this.comboBoxShipSecurityLevel.ItemsSource = GlobalStructures.ShipSecurityLevels;
|
||||||
|
|
||||||
if (this.LastTenPortFacilitiesCalled.PortFacilityShipSecurityLevel.HasValue)
|
if (this.LastTenPortFacilitiesCalled.PortFacilityShipSecurityLevel.HasValue)
|
||||||
this.comboBoxShipSecurityLevel.SelectedIndex = this.LastTenPortFacilitiesCalled.PortFacilityShipSecurityLevel.Value - 1;
|
this.comboBoxShipSecurityLevel.SelectedIndex = (this.LastTenPortFacilitiesCalled.PortFacilityShipSecurityLevel.Value - 1);
|
||||||
else
|
else
|
||||||
this.comboBoxShipSecurityLevel.SelectedIndex = -1;
|
this.comboBoxShipSecurityLevel.SelectedIndex = -1;
|
||||||
|
|
||||||
@ -48,33 +48,23 @@ namespace ENI2.EditControls
|
|||||||
public void CopyValuesToEntity()
|
public void CopyValuesToEntity()
|
||||||
{
|
{
|
||||||
this.LastTenPortFacilitiesCalled.PortFacilityPortLoCode = this.locodePort.LocodeValue;
|
this.LastTenPortFacilitiesCalled.PortFacilityPortLoCode = this.locodePort.LocodeValue;
|
||||||
this.LastTenPortFacilitiesCalled.PortFacilityPortName = this.textBoxPortName.Text.Trim();
|
this.LastTenPortFacilitiesCalled.PortFacilityPortName = this.textBoxPortName.Text;
|
||||||
this.LastTenPortFacilitiesCalled.PortFacilityPortCountry = this.textBoxPortCountry.Text.Trim();
|
this.LastTenPortFacilitiesCalled.PortFacilityPortCountry = this.textBoxPortCountry.Text;
|
||||||
this.LastTenPortFacilitiesCalled.PortFacilityDateOfArrival = this.datePickerATA.SelectedDate;
|
this.LastTenPortFacilitiesCalled.PortFacilityDateOfArrival = this.datePickerATA.SelectedDate;
|
||||||
this.LastTenPortFacilitiesCalled.PortFacilityDateOfDeparture = this.datePickerATD.SelectedDate;
|
this.LastTenPortFacilitiesCalled.PortFacilityDateOfDeparture = this.datePickerATD.SelectedDate;
|
||||||
this.LastTenPortFacilitiesCalled.PortFacilityGISISCode = this.textBoxGisisCode.Text.Trim();
|
this.LastTenPortFacilitiesCalled.PortFacilityGISISCode = this.textBoxGisisCode.Text;
|
||||||
|
|
||||||
if (this.comboBoxShipSecurityLevel.SelectedIndex == -1)
|
if (this.comboBoxShipSecurityLevel.SelectedIndex == -1)
|
||||||
this.LastTenPortFacilitiesCalled.PortFacilityShipSecurityLevel = null;
|
this.LastTenPortFacilitiesCalled.PortFacilityShipSecurityLevel = null;
|
||||||
else
|
else
|
||||||
this.LastTenPortFacilitiesCalled.PortFacilityShipSecurityLevel = (byte?) (this.comboBoxShipSecurityLevel.SelectedIndex + 1);
|
this.LastTenPortFacilitiesCalled.PortFacilityShipSecurityLevel = (byte?) (this.comboBoxShipSecurityLevel.SelectedIndex + 1);
|
||||||
this.LastTenPortFacilitiesCalled.PortFacilityGISISCodeLocode = this.locodeGISIS.LocodeValue;
|
this.LastTenPortFacilitiesCalled.PortFacilityGISISCodeLocode = this.locodeGISIS.LocodeValue;
|
||||||
this.LastTenPortFacilitiesCalled.PortFacilitySecurityMattersToReport = this.textBoxSecurityMatters.Text.Trim();
|
this.LastTenPortFacilitiesCalled.PortFacilitySecurityMattersToReport = this.textBoxSecurityMatters.Text;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void EditLast10PortFacilitiesDialog_OKClicked()
|
private void EditLast10PortFacilitiesDialog_OKClicked()
|
||||||
{
|
{
|
||||||
this.CopyValuesToEntity();
|
this.CopyValuesToEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void textBoxGisisCode_PreviewTextInput(object sender, System.Windows.Input.TextCompositionEventArgs e)
|
|
||||||
{
|
|
||||||
e.Handled = !e.Text.IsDigitsOnly();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void textBoxGisisCode_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e)
|
|
||||||
{
|
|
||||||
if(e.Key == System.Windows.Input.Key.Space) e.Handled = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
<Label Name="labelNationality" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textNationality}" />
|
<Label Name="labelNationality" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textNationality}" />
|
||||||
<Label Name="labelDateOfBirth" Grid.Row="2" Grid.Column="2" Content="{x:Static p:Resources.textDateOfBirth}" />
|
<Label Name="labelDateOfBirth" Grid.Row="2" Grid.Column="2" Content="{x:Static p:Resources.textDateOfBirth}" />
|
||||||
<Label Name="labelIdDocType" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textIdDocType}" />
|
<Label Name="labelIdDocType" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textIdDocType}" />
|
||||||
<Label Name="labelCountryOfBirth" Grid.Row="3" Grid.Column="2" Content="{x:Static p:Resources.textCountryOfBirth}" />
|
<!--<Label Name="labelCountryOfBirth" Grid.Row="3" Grid.Column="2" Content="{x:Static p:Resources.textCountryOfBirth}" />-->
|
||||||
<Label Name="labelIdDocNumber" Grid.Row="4" Grid.Column="2" Content="{x:Static p:Resources.textIdDocNumber}" />
|
<Label Name="labelIdDocNumber" Grid.Row="4" Grid.Column="2" Content="{x:Static p:Resources.textIdDocNumber}" />
|
||||||
<Label Name="labelVisaNumber" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textVisaNumber}" />
|
<Label Name="labelVisaNumber" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textVisaNumber}" />
|
||||||
<Label Name="labelPortOfEmbarkation" Grid.Row="5" Grid.Column="2" Content="{x:Static p:Resources.textPortOfEmbarkation}" />
|
<Label Name="labelPortOfEmbarkation" Grid.Row="5" Grid.Column="2" Content="{x:Static p:Resources.textPortOfEmbarkation}" />
|
||||||
@ -42,37 +42,35 @@
|
|||||||
<Label Name="labelTransitPassenger" Grid.Row="6" Grid.Column="2" Content="{x:Static p:Resources.textTransitPassenger}" />
|
<Label Name="labelTransitPassenger" Grid.Row="6" Grid.Column="2" Content="{x:Static p:Resources.textTransitPassenger}" />
|
||||||
<Label Name="labelIssuingState" Grid.Row="6" Grid.Column="0" Content="{x:Static p:Resources.textDocumentIssuingState}" />
|
<Label Name="labelIssuingState" Grid.Row="6" Grid.Column="0" Content="{x:Static p:Resources.textDocumentIssuingState}" />
|
||||||
<Label Name="labelExpiryDate" Grid.Row="7" Grid.Column="2" Content="{x:Static p:Resources.textDocumentExpiryDate}" />
|
<Label Name="labelExpiryDate" Grid.Row="7" Grid.Column="2" Content="{x:Static p:Resources.textDocumentExpiryDate}" />
|
||||||
<Label Name="labelEmergencyCare" Grid.Row="7" Grid.Column="0" Content="{x:Static p:Resources.textEmergencyCare}" />
|
<!--<Label Name="labelEmergencyCare" Grid.Row="7" Grid.Column="0" Content="{x:Static p:Resources.textEmergencyCare}" />
|
||||||
<Label Name="labelEmergencyContactNumber" Grid.Row="8" Grid.Column="0" Content="{x:Static p:Resources.textEmergencyContactNumber}" />
|
<Label Name="labelEmergencyContactNumber" Grid.Row="8" Grid.Column="0" Content="{x:Static p:Resources.textEmergencyContactNumber}" />-->
|
||||||
|
|
||||||
<TextBox Grid.Row="0" Grid.Column="1" Width="auto" Name="textBoxLastName" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
<TextBox Grid.Row="0" Grid.Column="1" Width="auto" Name="textBoxLastName" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
||||||
<ComboBox Grid.Row="1" Grid.Column="1" Name="comboBoxGender" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True"/>
|
|
||||||
<ComboBox Grid.Row="2" Grid.Column="1" Name="comboBoxNationality" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" />
|
|
||||||
<ComboBox Grid.Row="3" Grid.Column="1" Name="comboBoxIdDocType" Margin="2" IsEditable="True" SelectedValuePath="Key" DisplayMemberPath="Value" StaysOpenOnEdit="True" IsTextSearchEnabled="True" />
|
|
||||||
<TextBox Grid.Row="4" Grid.Column="1" Width="auto" Name="textBoxVisaNumber" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
|
||||||
<enictrl:LocodeControl x:Name="locodePortOfDisembarkation" Grid.Row="5" Grid.Column="1" />
|
|
||||||
<ComboBox Grid.Row="6" Grid.Column="1" Name="comboBoxIssuingState" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" />
|
|
||||||
<TextBox Grid.Row="7" Grid.Column="1" Width="auto" Name="textBoxEmergencyCare" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
|
||||||
<TextBox Grid.Row="8" Grid.Column="1" Width="auto" Name="textBoxEmergencyContactNumber" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
|
||||||
|
|
||||||
<TextBox Grid.Row="0" Grid.Column="3" Width="auto" Name="textBoxFirstName" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
<TextBox Grid.Row="0" Grid.Column="3" Width="auto" Name="textBoxFirstName" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
||||||
|
<ComboBox Grid.Row="1" Grid.Column="1" Name="comboBoxGender" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True"/>
|
||||||
<TextBox Grid.Row="1" Grid.Column="3" Width="auto" Name="textBoxPlaceOfBirth" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
<TextBox Grid.Row="1" Grid.Column="3" Width="auto" Name="textBoxPlaceOfBirth" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
||||||
|
<ComboBox Grid.Row="2" Grid.Column="1" Name="comboBoxNationality" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" />
|
||||||
<DatePicker Grid.Row="2" Grid.Column="3" Name="datePickerDateOfBirth" Margin="2" DisplayDateStart="1/1/1900" DisplayDateEnd="12/31/2199" PreviewKeyUp="DateTimePicker_PreviewKeyUpDate">
|
<DatePicker Grid.Row="2" Grid.Column="3" Name="datePickerDateOfBirth" Margin="2" DisplayDateStart="1/1/1900" DisplayDateEnd="12/31/2199" PreviewKeyUp="DateTimePicker_PreviewKeyUpDate">
|
||||||
<DatePicker.BlackoutDates>
|
<DatePicker.BlackoutDates>
|
||||||
<CalendarDateRange Start="1/1/0001" End="12/31/1899"/>
|
<CalendarDateRange Start="1/1/0001" End="12/31/1899"/>
|
||||||
<CalendarDateRange Start="1/1/2199" End="1/1/9999"/>
|
<CalendarDateRange Start="1/1/2199" End="1/1/9999"/>
|
||||||
</DatePicker.BlackoutDates>
|
</DatePicker.BlackoutDates>
|
||||||
</DatePicker>
|
</DatePicker>
|
||||||
<ComboBox Grid.Row="3" Grid.Column="3" Name="comboBoxCountryOfBirth" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" />
|
<ComboBox Grid.Row="3" Grid.Column="1" Name="comboBoxIdDocType" Margin="2" IsEditable="True" SelectedValuePath="Key" DisplayMemberPath="Value" StaysOpenOnEdit="True" IsTextSearchEnabled="True" />
|
||||||
|
<!--<ComboBox Grid.Row="3" Grid.Column="3" Name="comboBoxCountryOfBirth" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" />-->
|
||||||
<TextBox Grid.Row="4" Grid.Column="3" Width="auto" Name="textBoxIdDocNumber" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
<TextBox Grid.Row="4" Grid.Column="3" Width="auto" Name="textBoxIdDocNumber" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
||||||
|
<TextBox Grid.Row="4" Grid.Column="1" Width="auto" Name="textBoxVisaNumber" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
||||||
<enictrl:LocodeControl x:Name="locodePortOfEmbarkation" Grid.Row="5" Grid.Column="3" />
|
<enictrl:LocodeControl x:Name="locodePortOfEmbarkation" Grid.Row="5" Grid.Column="3" />
|
||||||
|
<enictrl:LocodeControl x:Name="locodePortOfDisembarkation" Grid.Row="5" Grid.Column="1" />
|
||||||
<CheckBox Name="checkBoxTransitPassenger" Grid.Row="6" Grid.Column="3" VerticalAlignment="Center" Margin="2"/>
|
<CheckBox Name="checkBoxTransitPassenger" Grid.Row="6" Grid.Column="3" VerticalAlignment="Center" Margin="2"/>
|
||||||
|
<ComboBox Grid.Row="6" Grid.Column="1" Name="comboBoxIssuingState" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" />
|
||||||
<DatePicker Grid.Row="7" Grid.Column="3" Name="datePickerExpiryDate" Margin="2" DisplayDateStart="1/1/1900" DisplayDateEnd="12/31/2199" PreviewKeyUp="DateTimePicker_PreviewKeyUpDate">
|
<DatePicker Grid.Row="7" Grid.Column="3" Name="datePickerExpiryDate" Margin="2" DisplayDateStart="1/1/1900" DisplayDateEnd="12/31/2199" PreviewKeyUp="DateTimePicker_PreviewKeyUpDate">
|
||||||
<DatePicker.BlackoutDates>
|
<DatePicker.BlackoutDates>
|
||||||
<CalendarDateRange Start="1/1/0001" End="12/31/1899"/>
|
<CalendarDateRange Start="1/1/0001" End="12/31/1899"/>
|
||||||
<CalendarDateRange Start="1/1/2199" End="1/1/9999"/>
|
<CalendarDateRange Start="1/1/2199" End="1/1/9999"/>
|
||||||
</DatePicker.BlackoutDates>
|
</DatePicker.BlackoutDates>
|
||||||
</DatePicker>
|
</DatePicker>
|
||||||
|
<!--<TextBox Grid.Row="7" Grid.Column="1" Width="auto" Name="textBoxEmergencyCare" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
||||||
|
<TextBox Grid.Row="8" Grid.Column="1" Width="auto" Name="textBoxEmergencyContactNumber" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />-->
|
||||||
</Grid>
|
</Grid>
|
||||||
</enictrl:EditWindowBase>
|
</enictrl:EditWindowBase>
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
// Description: PAS Bearbeitungsdialog
|
// Description: PAS Bearbeitungsdialog
|
||||||
//
|
//
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
|
||||||
using bsmd.database;
|
using bsmd.database;
|
||||||
@ -16,7 +15,6 @@ namespace ENI2.EditControls
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class EditPASDialog : EditWindowBase
|
public partial class EditPASDialog : EditWindowBase
|
||||||
{
|
{
|
||||||
|
|
||||||
public EditPASDialog()
|
public EditPASDialog()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@ -36,18 +34,7 @@ namespace ENI2.EditControls
|
|||||||
this.textBoxPlaceOfBirth.Text = this.PAS.PassengerPlaceOfBirth;
|
this.textBoxPlaceOfBirth.Text = this.PAS.PassengerPlaceOfBirth;
|
||||||
this.comboBoxNationality.ItemsSource = bsmd.database.CREW.NationalityDict;
|
this.comboBoxNationality.ItemsSource = bsmd.database.CREW.NationalityDict;
|
||||||
this.comboBoxNationality.SelectedValue = this.PAS.PassengerNationality;
|
this.comboBoxNationality.SelectedValue = this.PAS.PassengerNationality;
|
||||||
if (this.PAS.PassengerDateOfBirth > CREW.CLAMPMAXDATE)
|
|
||||||
{
|
|
||||||
this.datePickerDateOfBirth.SelectedDate = CREW.CLAMPMAXDATE;
|
|
||||||
}
|
|
||||||
else if (this.PAS.PassengerDateOfBirth < CREW.CLAMPMINDATE)
|
|
||||||
{
|
|
||||||
this.datePickerDateOfBirth.SelectedDate = CREW.CLAMPMINDATE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.datePickerDateOfBirth.SelectedDate = this.PAS.PassengerDateOfBirth;
|
this.datePickerDateOfBirth.SelectedDate = this.PAS.PassengerDateOfBirth;
|
||||||
}
|
|
||||||
this.comboBoxIdDocType.ItemsSource = GlobalStructures.IDDocTypeDict;
|
this.comboBoxIdDocType.ItemsSource = GlobalStructures.IDDocTypeDict;
|
||||||
this.comboBoxIdDocType.SelectedValue = this.PAS.PassengerIdentityDocumentType?.ToString();
|
this.comboBoxIdDocType.SelectedValue = this.PAS.PassengerIdentityDocumentType?.ToString();
|
||||||
this.textBoxIdDocNumber.Text = this.PAS.PassengerIdentityDocumentId;
|
this.textBoxIdDocNumber.Text = this.PAS.PassengerIdentityDocumentId;
|
||||||
@ -57,24 +44,13 @@ namespace ENI2.EditControls
|
|||||||
this.checkBoxTransitPassenger.IsChecked = this.PAS.PassengerInTransit;
|
this.checkBoxTransitPassenger.IsChecked = this.PAS.PassengerInTransit;
|
||||||
this.comboBoxIssuingState.ItemsSource = bsmd.database.CREW.NationalityDict;
|
this.comboBoxIssuingState.ItemsSource = bsmd.database.CREW.NationalityDict;
|
||||||
this.comboBoxIssuingState.SelectedValue = this.PAS.PassengerIdentityDocumentIssuingState;
|
this.comboBoxIssuingState.SelectedValue = this.PAS.PassengerIdentityDocumentIssuingState;
|
||||||
|
if(this.PAS.PassengerIdentityDocumentExpiryDate.HasValue)
|
||||||
if (this.PAS.PassengerIdentityDocumentExpiryDate > CREW.CLAMPMAXDATE)
|
|
||||||
{
|
|
||||||
this.datePickerExpiryDate.SelectedDate = CREW.CLAMPMAXDATE;
|
|
||||||
}
|
|
||||||
else if (this.PAS.PassengerIdentityDocumentExpiryDate < CREW.CLAMPMINDATE)
|
|
||||||
{
|
|
||||||
this.datePickerExpiryDate.SelectedDate = CREW.CLAMPMINDATE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.datePickerExpiryDate.SelectedDate = this.PAS.PassengerIdentityDocumentExpiryDate;
|
this.datePickerExpiryDate.SelectedDate = this.PAS.PassengerIdentityDocumentExpiryDate;
|
||||||
}
|
// XXX : TODO
|
||||||
|
//this.comboBoxCountryOfBirth.ItemsSource = bsmd.database.CREW.NationalityDict;
|
||||||
this.comboBoxCountryOfBirth.ItemsSource = bsmd.database.CREW.NationalityDict;
|
//this.comboBoxCountryOfBirth.SelectedValue = this.PAS.PassengerCountryOfBirth;
|
||||||
this.comboBoxCountryOfBirth.SelectedValue = this.PAS.PassengerCountryOfBirth;
|
//this.textBoxEmergencyCare.Text = this.PAS.EmergencyCare;
|
||||||
this.textBoxEmergencyCare.Text = this.PAS.EmergencyCare;
|
//this.textBoxEmergencyContactNumber.Text = this.PAS.EmergencyContactNumber;
|
||||||
this.textBoxEmergencyContactNumber.Text = this.PAS.EmergencyContactNumber;
|
|
||||||
|
|
||||||
this.OKClicked += EditPasDialog_OKClicked;
|
this.OKClicked += EditPasDialog_OKClicked;
|
||||||
this.AddVisible = true;
|
this.AddVisible = true;
|
||||||
@ -97,10 +73,10 @@ namespace ENI2.EditControls
|
|||||||
this.PAS.PassengerInTransit = this.checkBoxTransitPassenger.IsChecked;
|
this.PAS.PassengerInTransit = this.checkBoxTransitPassenger.IsChecked;
|
||||||
this.PAS.PassengerIdentityDocumentIssuingState = (this.comboBoxIssuingState.SelectedValue == null) ? "" : (string)this.comboBoxIssuingState.SelectedValue;
|
this.PAS.PassengerIdentityDocumentIssuingState = (this.comboBoxIssuingState.SelectedValue == null) ? "" : (string)this.comboBoxIssuingState.SelectedValue;
|
||||||
this.PAS.PassengerIdentityDocumentExpiryDate = this.datePickerExpiryDate.SelectedDate;
|
this.PAS.PassengerIdentityDocumentExpiryDate = this.datePickerExpiryDate.SelectedDate;
|
||||||
|
// XXX : TODO
|
||||||
this.PAS.PassengerCountryOfBirth = (this.comboBoxCountryOfBirth.SelectedValue == null) ? "" : (string)this.comboBoxCountryOfBirth.SelectedValue;
|
// this.PAS.PassengerCountryOfBirth = (this.comboBoxCountryOfBirth.SelectedValue == null) ? "" : (string)this.comboBoxCountryOfBirth.SelectedValue;
|
||||||
this.PAS.EmergencyCare = this.textBoxEmergencyCare.Text.Trim();
|
//this.PAS.EmergencyCare = this.textBoxEmergencyCare.Text.Trim();
|
||||||
this.PAS.EmergencyContactNumber = this.textBoxEmergencyContactNumber.Text.Trim();
|
//this.PAS.EmergencyContactNumber = this.textBoxEmergencyContactNumber.Text.Trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void EditPasDialog_OKClicked()
|
private void EditPasDialog_OKClicked()
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||||
xmlns:p="clr-namespace:ENI2.Properties"
|
xmlns:p="clr-namespace:ENI2.Properties"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="{x:Static p:Resources.textReportingParty}" Height="378" Width="800" WindowStyle="SingleBorderWindow" Background="AliceBlue">
|
Title="{x:Static p:Resources.textReportingParty}" Height="350" Width="800" WindowStyle="SingleBorderWindow" Background="AliceBlue">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
@ -21,7 +21,6 @@
|
|||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
<RowDefinition Height="28" />
|
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*" />
|
<ColumnDefinition Width="2*" />
|
||||||
@ -47,11 +46,10 @@
|
|||||||
<Label Name="labelUserEMail" Grid.Row="7" Grid.Column="0" Content="{x:Static p:Resources.textEMail}" HorizontalContentAlignment="Right" />
|
<Label Name="labelUserEMail" Grid.Row="7" Grid.Column="0" Content="{x:Static p:Resources.textEMail}" HorizontalContentAlignment="Right" />
|
||||||
<Label Name="labelAdmin" Grid.Row="7" Grid.Column="2" Content="{x:Static p:Resources.textAdministrator}" HorizontalContentAlignment="Right" />
|
<Label Name="labelAdmin" Grid.Row="7" Grid.Column="2" Content="{x:Static p:Resources.textAdministrator}" HorizontalContentAlignment="Right" />
|
||||||
<Label Name="labelArchived" Grid.Row="8" Grid.Column="0" Content="{x:Static p:Resources.textArchived}" HorizontalContentAlignment="Right" />
|
<Label Name="labelArchived" Grid.Row="8" Grid.Column="0" Content="{x:Static p:Resources.textArchived}" HorizontalContentAlignment="Right" />
|
||||||
|
<Label Name="labelCreated" Grid.Row="9" Grid.Column="0" Content="{x:Static p:Resources.textCreated}" HorizontalContentAlignment="Right" />
|
||||||
|
<Label Name="labelChanged" Grid.Row="9" Grid.Column="2" Content="{x:Static p:Resources.textChanged}" HorizontalContentAlignment="Right" />
|
||||||
<Label Name="labelEditor" Grid.Row="8" Grid.Column="2" Content="{x:Static p:Resources.textEditor}" HorizontalContentAlignment="Right" />
|
<Label Name="labelEditor" Grid.Row="8" Grid.Column="2" Content="{x:Static p:Resources.textEditor}" HorizontalContentAlignment="Right" />
|
||||||
|
|
||||||
<Label Name="labelCreated" Grid.Row="10" Grid.Column="0" Content="{x:Static p:Resources.textCreated}" HorizontalContentAlignment="Right" />
|
|
||||||
<Label Name="labelChanged" Grid.Row="10" Grid.Column="2" Content="{x:Static p:Resources.textChanged}" HorizontalContentAlignment="Right" />
|
|
||||||
|
|
||||||
<TextBox Grid.Row="0" Grid.Column="1" Width="auto" Name="textBoxName" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
<TextBox Grid.Row="0" Grid.Column="1" Width="auto" Name="textBoxName" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
||||||
<TextBox Grid.Row="0" Grid.Column="3" Width="auto" Name="textBoxEMail" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
<TextBox Grid.Row="0" Grid.Column="3" Width="auto" Name="textBoxEMail" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
||||||
<TextBox Grid.Row="1" Grid.Column="1" Width="auto" Name="textBoxFirstName" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
<TextBox Grid.Row="1" Grid.Column="1" Width="auto" Name="textBoxFirstName" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
||||||
@ -69,8 +67,9 @@
|
|||||||
<CheckBox Grid.Row="7" Grid.Column="3" VerticalAlignment="Center" Name="checkBoxAdministrator" Margin="2" />
|
<CheckBox Grid.Row="7" Grid.Column="3" VerticalAlignment="Center" Name="checkBoxAdministrator" Margin="2" />
|
||||||
<CheckBox Grid.Row="8" Grid.Column="3" VerticalAlignment="Center" Name="checkBoxEditor" Margin="2" />
|
<CheckBox Grid.Row="8" Grid.Column="3" VerticalAlignment="Center" Name="checkBoxEditor" Margin="2" />
|
||||||
<CheckBox Grid.Row="8" Grid.Column="1" VerticalAlignment="Center" Name="checkBoxArchived" Margin="2" />
|
<CheckBox Grid.Row="8" Grid.Column="1" VerticalAlignment="Center" Name="checkBoxArchived" Margin="2" />
|
||||||
<Label Grid.Row="10" Grid.Column="1" Name="dateTimePickerCreated" FontStyle="Italic" />
|
|
||||||
<Label Grid.Row="10" Grid.Column="3" Name="dateTimePickerChanged" FontStyle="Italic" />
|
<Label Grid.Row="9" Grid.Column="1" Name="dateTimePickerCreated" FontStyle="Italic" />
|
||||||
|
<Label Grid.Row="9" Grid.Column="3" Name="dateTimePickerChanged" FontStyle="Italic" />
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</enictrl:EditWindowBase>
|
</enictrl:EditWindowBase>
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
// Description: Reporting party Bearbeitungsdialog
|
// Description: Reporting party Bearbeitungsdialog
|
||||||
//
|
//
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
|
||||||
using bsmd.database;
|
using bsmd.database;
|
||||||
@ -25,7 +24,6 @@ namespace ENI2.EditControls
|
|||||||
|
|
||||||
private void EditReportingPartyDialog_Loaded(object sender, RoutedEventArgs e)
|
private void EditReportingPartyDialog_Loaded(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
this.textBoxCity.Text = this.ReportingParty.City;
|
this.textBoxCity.Text = this.ReportingParty.City;
|
||||||
this.textBoxCountry.Text = this.ReportingParty.Country;
|
this.textBoxCountry.Text = this.ReportingParty.Country;
|
||||||
this.textBoxEMail.Text = this.ReportingParty.EMail;
|
this.textBoxEMail.Text = this.ReportingParty.EMail;
|
||||||
@ -43,7 +41,6 @@ namespace ENI2.EditControls
|
|||||||
this.checkBoxArchived.IsChecked = this.ReportingParty.IsArchived;
|
this.checkBoxArchived.IsChecked = this.ReportingParty.IsArchived;
|
||||||
this.checkBoxEditor.IsChecked = this.ReportingParty.IsEditor;
|
this.checkBoxEditor.IsChecked = this.ReportingParty.IsEditor;
|
||||||
|
|
||||||
|
|
||||||
this.dateTimePickerChanged.Content = this.ReportingParty.Changed.HasValue ? this.ReportingParty.Changed.ToString() : "";
|
this.dateTimePickerChanged.Content = this.ReportingParty.Changed.HasValue ? this.ReportingParty.Changed.ToString() : "";
|
||||||
this.dateTimePickerCreated.Content = this.ReportingParty.Created.HasValue ? this.ReportingParty.Created.ToString() : "";
|
this.dateTimePickerCreated.Content = this.ReportingParty.Created.HasValue ? this.ReportingParty.Created.ToString() : "";
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||||
xmlns:p="clr-namespace:ENI2.Properties"
|
xmlns:p="clr-namespace:ENI2.Properties"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="{x:Static p:Resources.textEditRules}" Height="402" Width="800" WindowStyle="SingleBorderWindow" Background="AliceBlue" Icon="/ENI2Test;component/Resources/mail_forward.png">
|
Title="{x:Static p:Resources.textEditRules}" Height="402" Width="800" WindowStyle="SingleBorderWindow" Background="AliceBlue" Icon="/ENI2;component/Resources/mail_forward.png">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="32" />
|
<RowDefinition Height="32" />
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// Copyright (c) 2017 schick Informatik
|
// Copyright (c) 2017 schick Informatik
|
||||||
// Description: Edit SERV and SERV_template entities
|
// Description:
|
||||||
//
|
//
|
||||||
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
@ -14,60 +14,24 @@ namespace ENI2.EditControls
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class EditSERVDialog : EditWindowBase
|
public partial class EditSERVDialog : EditWindowBase
|
||||||
{
|
{
|
||||||
|
|
||||||
#region Construction
|
|
||||||
|
|
||||||
public EditSERVDialog()
|
public EditSERVDialog()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Loaded += EditSERVDialog_Loaded;
|
Loaded += EditSERVDialog_Loaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Properties
|
|
||||||
|
|
||||||
public SERV SERV { get; set; }
|
|
||||||
|
|
||||||
public SERV_Template SERV_Template { get; set; }
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region event handler
|
|
||||||
|
|
||||||
private void EditSERVDialog_Loaded(object sender, RoutedEventArgs e)
|
private void EditSERVDialog_Loaded(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
this.OKClicked += EditSERVDialog_OKClicked;
|
this.OKClicked += EditSERVDialog_OKClicked;
|
||||||
|
|
||||||
// copy into fields
|
// copy into fields
|
||||||
if (this.SERV != null)
|
|
||||||
{
|
|
||||||
this.textBoxServiceName.Text = this.SERV.ServiceName;
|
this.textBoxServiceName.Text = this.SERV.ServiceName;
|
||||||
this.textBoxServiceBeneficiary.Text = this.SERV.ServiceBeneficiary;
|
this.textBoxServiceBeneficiary.Text = this.SERV.ServiceBeneficiary;
|
||||||
this.textBoxServiceInvoiceRecipient.Text = this.SERV.ServiceInvoiceRecipient;
|
this.textBoxServiceInvoiceRecipient.Text = this.SERV.ServiceInvoiceRecipient;
|
||||||
this.AddVisible = true;
|
this.AddVisible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.SERV_Template != null)
|
|
||||||
{
|
|
||||||
this.textBoxServiceName.Text = this.SERV_Template.ServiceName;
|
|
||||||
this.textBoxServiceBeneficiary.Text = this.SERV_Template.ServiceBeneficiary;
|
|
||||||
this.textBoxServiceInvoiceRecipient.Text = this.SERV_Template.ServiceInvoiceRecipient;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private void EditSERVDialog_OKClicked()
|
|
||||||
{
|
|
||||||
this.CopyValuesToEntity();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public methods
|
|
||||||
|
|
||||||
public void CopyValuesToEntity()
|
public void CopyValuesToEntity()
|
||||||
{
|
|
||||||
|
|
||||||
if (this.SERV != null)
|
|
||||||
{
|
{
|
||||||
// copy back
|
// copy back
|
||||||
this.SERV.ServiceName = this.textBoxServiceName.Text.Trim();
|
this.SERV.ServiceName = this.textBoxServiceName.Text.Trim();
|
||||||
@ -75,17 +39,11 @@ namespace ENI2.EditControls
|
|||||||
this.SERV.ServiceInvoiceRecipient = this.textBoxServiceInvoiceRecipient.Text.Trim();
|
this.SERV.ServiceInvoiceRecipient = this.textBoxServiceInvoiceRecipient.Text.Trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.SERV_Template != null)
|
private void EditSERVDialog_OKClicked()
|
||||||
{
|
{
|
||||||
// copy back
|
this.CopyValuesToEntity();
|
||||||
this.SERV_Template.ServiceName = this.textBoxServiceName.Text.Trim();
|
|
||||||
this.SERV_Template.ServiceBeneficiary = this.textBoxServiceBeneficiary.Text.Trim();
|
|
||||||
this.SERV_Template.ServiceInvoiceRecipient = this.textBoxServiceInvoiceRecipient.Text.Trim();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
public SERV SERV { get; set; }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,11 +38,11 @@
|
|||||||
<Label Name="labelWasteCodeText" Grid.Row="0" Grid.Column="2" />
|
<Label Name="labelWasteCodeText" Grid.Row="0" Grid.Column="2" />
|
||||||
<TextBox Name="textBoxDescription" Grid.Row="1" Grid.Column="1" Margin="2" Grid.ColumnSpan="2" Width="auto" MaxLength="99" TextWrapping="Wrap" />
|
<TextBox Name="textBoxDescription" Grid.Row="1" Grid.Column="1" Margin="2" Grid.ColumnSpan="2" Width="auto" MaxLength="99" TextWrapping="Wrap" />
|
||||||
|
|
||||||
<xctk:DoubleUpDown Grid.Row="2" Grid.Column="1" Name="doubleUpDownAmountDisposed" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left" Maximum="9999.999" />
|
<xctk:DoubleUpDown Grid.Row="2" Grid.Column="1" Name="doubleUpDownAmountDisposed" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left"/>
|
||||||
<xctk:DoubleUpDown Grid.Row="3" Grid.Column="1" Name="doubleUpDownMaxCapacity" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left" Maximum="9999.999"/>
|
<xctk:DoubleUpDown Grid.Row="3" Grid.Column="1" Name="doubleUpDownMaxCapacity" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left"/>
|
||||||
<xctk:DoubleUpDown Grid.Row="4" Grid.Column="1" Name="doubleUpDownAmountRetained" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left" Maximum="9999.999"/>
|
<xctk:DoubleUpDown Grid.Row="4" Grid.Column="1" Name="doubleUpDownAmountRetained" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left"/>
|
||||||
<enictrl:LocodeControl Grid.Row="5" Grid.Column="1" x:Name="locodePortOfDeliveryRemainingWaste" LocodeSource="SSN" />
|
<enictrl:LocodeControl Grid.Row="5" Grid.Column="1" x:Name="locodePortOfDeliveryRemainingWaste" LocodeSource="SSN" />
|
||||||
<xctk:DoubleUpDown Grid.Row="6" Grid.Column="1" Name="doubleUpDownAmountGeneratedTilNextPort" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left" Maximum="9999.999"/>
|
<xctk:DoubleUpDown Grid.Row="6" Grid.Column="1" Name="doubleUpDownAmountGeneratedTilNextPort" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left"/>
|
||||||
|
|
||||||
<Label Content="{x:Static p:Resources.textCubicMeters}" Grid.Row = "2" Grid.Column="2" />
|
<Label Content="{x:Static p:Resources.textCubicMeters}" Grid.Row = "2" Grid.Column="2" />
|
||||||
<Label Content="{x:Static p:Resources.textCubicMeters}" Grid.Row = "3" Grid.Column="2" />
|
<Label Content="{x:Static p:Resources.textCubicMeters}" Grid.Row = "3" Grid.Column="2" />
|
||||||
|
|||||||
@ -14,7 +14,6 @@
|
|||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
<RowDefinition Height="28" />
|
|
||||||
<RowDefinition Height="56" />
|
<RowDefinition Height="56" />
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
@ -31,48 +30,16 @@
|
|||||||
<Label Name="labelIdentificationNumber" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textIdentificationNumber}" />
|
<Label Name="labelIdentificationNumber" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textIdentificationNumber}" />
|
||||||
<Label Name="labelPortReceptionFacilityName" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textPortReceptionFacilityName}" />
|
<Label Name="labelPortReceptionFacilityName" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textPortReceptionFacilityName}" />
|
||||||
<Label Name="labelPortReceptionFacilityProviderName" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textPortReceptionFacilityProviderName}" />
|
<Label Name="labelPortReceptionFacilityProviderName" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textPortReceptionFacilityProviderName}" />
|
||||||
<Label Name="labelTemplate" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textAgentTemplate}" />
|
<Label Name="labelTreatmentFacilityProvider" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textTreatmentFacilityProviderDisplay}" />
|
||||||
<Label Name="labelTreatmentFacilityProvider" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textTreatmentFacilityProviderDisplay}" />
|
<Label Name="labelWasteDeliveryDateFrom" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textWasteDeliveryDateFrom}" />
|
||||||
<Label Name="labelWasteDeliveryDateFrom" Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textWasteDeliveryDateFrom}" />
|
<Label Name="labelWasteDeliveryDateTo" Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textWasteDeliveryDateTo}" />
|
||||||
<Label Name="labelWasteDeliveryDateTo" Grid.Row="6" Grid.Column="0" Content="{x:Static p:Resources.textWasteDeliveryDateTo}" />
|
|
||||||
|
|
||||||
<TextBox Name="textIdentificationNumber" Grid.Row="0" Grid.Column="1" Width="auto" MaxLength="20" TextWrapping="Wrap" Margin="2" VerticalContentAlignment="Center"/>
|
<TextBox Name="textIdentificationNumber" Grid.Row="0" Grid.Column="1" Width="auto" MaxLength="20" TextWrapping="Wrap" Margin="2" VerticalContentAlignment="Center"/>
|
||||||
<TextBox Name="textBoxPortReceptionFacilityName" Grid.Row="1" Grid.Column="1" Width="auto" MaxLength="70" TextWrapping="Wrap" Margin="2" VerticalContentAlignment="Center"/>
|
<TextBox Name="textBoxPortReceptionFacilityName" Grid.Row="1" Grid.Column="1" Width="auto" MaxLength="70" TextWrapping="Wrap" Margin="2" VerticalContentAlignment="Center"/>
|
||||||
<TextBox Name="textBoxPortReceptionFacilityProviderName" Grid.Row="2" Grid.Column="1" Width="auto" MaxLength="70" TextWrapping="Wrap" Margin="2" VerticalContentAlignment="Center"/>
|
<TextBox Name="textBoxPortReceptionFacilityProviderName" Grid.Row="2" Grid.Column="1" Width="auto" MaxLength="70" TextWrapping="Wrap" Margin="2" VerticalContentAlignment="Center"/>
|
||||||
<Grid Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="1" Name="gridTemplateControls" Visibility="Visible">
|
<TextBox Name="textBoxTreatmentFacilityProvider" Grid.Row="3" Grid.Column="1" Height="56" VerticalContentAlignment="Top" Margin="2"/>
|
||||||
<Grid.ColumnDefinitions>
|
<xctk:DateTimePicker Grid.Row="4" Grid.Column="1" Name="dateTimePickerWasteDeliveryDateFrom" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00" PreviewKeyUp="DateTimePicker_PreviewKeyUp"/>
|
||||||
<ColumnDefinition Width=".5*"/>
|
<xctk:DateTimePicker Grid.Row="5" Grid.Column="1" Name="dateTimePickerWasteDeliveryDateTo" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00" PreviewKeyUp="DateTimePicker_PreviewKeyUp"/>
|
||||||
<ColumnDefinition Width=".5*"/>
|
|
||||||
<!-- Name -->
|
|
||||||
<ColumnDefinition Width="26"/>
|
|
||||||
<!-- Save button -->
|
|
||||||
<ColumnDefinition Width="26"/>
|
|
||||||
<!-- Delete button -->
|
|
||||||
<ColumnDefinition Width="52"/>
|
|
||||||
<!-- Undo button -->
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<ComboBox Grid.Column="0" Name="comboBox_WSDPTemplate" Margin="2" SelectedValuePath="Id" DisplayMemberPath="Remark" SelectionChanged="comboBox_WSDPTemplate_SelectionChanged" />
|
|
||||||
<TextBox Grid.Column="1" Margin="2" Name="textBoxTemplateTitle" VerticalContentAlignment="Center"/>
|
|
||||||
<Button Name="buttonSaveTemplate" Grid.Column="2" Grid.Row="0" Margin="2" Click="buttonSaveTemplate_Click" BorderThickness="0" Background="Transparent" ToolTip="Save template">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<Image Source="../Resources/floppy_disk_blue.png" Margin="0,0,0,0" Height="20" Width="20" />
|
|
||||||
</StackPanel>
|
|
||||||
</Button>
|
|
||||||
<Button Name="buttonDeleteTemplate" Grid.Column="3" Grid.Row="0" Margin="2" Click="buttonDeleteTemplate_Click" BorderThickness="0" Background="Transparent" ToolTip="Delete template" IsEnabled="False">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<Image Source="../Resources/delete.png" Margin="0,0,0,0" Height="20" Width="20" />
|
|
||||||
</StackPanel>
|
|
||||||
</Button>
|
|
||||||
<Button Name="buttonUndoTemplate" Grid.Column="4" Grid.Row="0" Margin="22,2,2,2" Click="buttonUndoTemplate_Click" BorderThickness="0" Background="Transparent" ToolTip="Undo last overwrite" IsEnabled="False">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<Image Source="../Resources/undo.png" Margin="0,0,0,0" Height="20" Width="20" />
|
|
||||||
</StackPanel>
|
|
||||||
</Button>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<TextBox Name="textBoxTreatmentFacilityProvider" Grid.Row="4" Grid.Column="1" Height="56" VerticalContentAlignment="Top" Margin="2"/>
|
|
||||||
<xctk:DateTimePicker Grid.Row="5" Grid.Column="1" Name="dateTimePickerWasteDeliveryDateFrom" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00" PreviewKeyUp="DateTimePicker_PreviewKeyUp"/>
|
|
||||||
<xctk:DateTimePicker Grid.Row="6" Grid.Column="1" Name="dateTimePickerWasteDeliveryDateTo" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00" PreviewKeyUp="DateTimePicker_PreviewKeyUp"/>
|
|
||||||
|
|
||||||
<!--Button x:Name="buttonAddEntries" Grid.Column="1" Grid.Row="7" Margin="2" Click="buttonAddEntries_Click" Width="170" Content="Add waste received entries" HorizontalAlignment="Left"/-->
|
<!--Button x:Name="buttonAddEntries" Grid.Column="1" Grid.Row="7" Margin="2" Click="buttonAddEntries_Click" Width="170" Content="Add waste received entries" HorizontalAlignment="Left"/-->
|
||||||
|
|
||||||
|
|||||||
@ -3,8 +3,6 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
|
||||||
using bsmd.database;
|
using bsmd.database;
|
||||||
@ -17,13 +15,6 @@ namespace ENI2.EditControls
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class EditWasteReceiptDialog : EditWindowBase
|
public partial class EditWasteReceiptDialog : EditWindowBase
|
||||||
{
|
{
|
||||||
|
|
||||||
// TODO: "unstatic" the templates and take care they are synchronized between controls
|
|
||||||
|
|
||||||
private List<WasteDisposalServiceProvider_Template> _wsdpTemplates = null;
|
|
||||||
private WasteDisposalServiceProvider_Template _currentTemplate;
|
|
||||||
private string _undoTemplate;
|
|
||||||
|
|
||||||
public EditWasteReceiptDialog()
|
public EditWasteReceiptDialog()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@ -33,7 +24,7 @@ namespace ENI2.EditControls
|
|||||||
|
|
||||||
public WAS_RCPT WAS_RCPT { get; set; }
|
public WAS_RCPT WAS_RCPT { get; set; }
|
||||||
|
|
||||||
private async void EditWasteReceiptDialog_Loaded(object sender, RoutedEventArgs e)
|
private void EditWasteReceiptDialog_Loaded(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
this.textIdentificationNumber.Text = this.WAS_RCPT.IdentificationNumber;
|
this.textIdentificationNumber.Text = this.WAS_RCPT.IdentificationNumber;
|
||||||
this.textBoxPortReceptionFacilityName.Text = this.WAS_RCPT.PortReceptionFacilityName;
|
this.textBoxPortReceptionFacilityName.Text = this.WAS_RCPT.PortReceptionFacilityName;
|
||||||
@ -44,12 +35,6 @@ namespace ENI2.EditControls
|
|||||||
|
|
||||||
OKClicked += EditWasteReceiptDialog_OKClicked;
|
OKClicked += EditWasteReceiptDialog_OKClicked;
|
||||||
this.AddVisible = true;
|
this.AddVisible = true;
|
||||||
|
|
||||||
_wsdpTemplates = await DBManagerAsync.GetWasteDisposalServiceProviderTemplatesAsync();
|
|
||||||
_wsdpTemplates.Sort();
|
|
||||||
Trace.WriteLine($"{_wsdpTemplates.Count} WSDP templates loaded");
|
|
||||||
|
|
||||||
this.comboBox_WSDPTemplate.ItemsSource = _wsdpTemplates;
|
|
||||||
}
|
}
|
||||||
public void CopyValuesToEntity()
|
public void CopyValuesToEntity()
|
||||||
{
|
{
|
||||||
@ -67,87 +52,10 @@ namespace ENI2.EditControls
|
|||||||
this.CopyValuesToEntity();
|
this.CopyValuesToEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void comboBox_WSDPTemplate_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
|
||||||
{
|
|
||||||
Trace.WriteLine("WSDP combo selection changed");
|
|
||||||
if (this.comboBox_WSDPTemplate.SelectedItem is WasteDisposalServiceProvider_Template wdsp_t)
|
|
||||||
{
|
|
||||||
this.textBoxTemplateTitle.Text = wdsp_t.Remark;
|
|
||||||
this.buttonDeleteTemplate.IsEnabled = true;
|
|
||||||
this._currentTemplate = wdsp_t;
|
|
||||||
this._undoTemplate = this.textBoxPortReceptionFacilityProviderName.Text.Trim();
|
|
||||||
this.buttonUndoTemplate.IsEnabled = this._undoTemplate.Length > 0;
|
|
||||||
this.textBoxPortReceptionFacilityProviderName.Text = wdsp_t.WasteDisposalServiceProviderName;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private async void buttonSaveTemplate_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
string currentWSDPProviderName = this.textBoxPortReceptionFacilityProviderName.Text.Trim();
|
|
||||||
string currentRemark = this.textBoxTemplateTitle.Text.Trim();
|
|
||||||
|
|
||||||
if ((currentWSDPProviderName.Length == 0) || (currentRemark.Length == 0)) return;
|
|
||||||
|
|
||||||
WasteDisposalServiceProvider_Template existingTemplate = null;
|
|
||||||
foreach (WasteDisposalServiceProvider_Template wdsp_template in _wsdpTemplates)
|
|
||||||
{
|
|
||||||
// bei gefundenem Match wird ggf. der Remark überschrieben
|
|
||||||
if (wdsp_template.Remark.Equals(currentRemark))
|
|
||||||
{
|
|
||||||
existingTemplate = wdsp_template;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (existingTemplate != null)
|
|
||||||
{
|
|
||||||
if (MessageBox.Show("A template with this name already exists, overwrite?", "Confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.No)
|
|
||||||
return;
|
|
||||||
|
|
||||||
existingTemplate.WasteDisposalServiceProviderName = currentWSDPProviderName;
|
|
||||||
await DBManagerAsync.SaveAsync(existingTemplate);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
WasteDisposalServiceProvider_Template newTemplate = new WasteDisposalServiceProvider_Template();
|
|
||||||
newTemplate.WasteDisposalServiceProviderName = currentWSDPProviderName;
|
|
||||||
newTemplate.Remark = currentRemark;
|
|
||||||
await DBManagerAsync.SaveAsync(newTemplate);
|
|
||||||
|
|
||||||
comboBox_WSDPTemplate.ItemsSource = null;
|
|
||||||
_wsdpTemplates.Add(newTemplate);
|
|
||||||
_wsdpTemplates.Sort();
|
|
||||||
comboBox_WSDPTemplate.ItemsSource = _wsdpTemplates;
|
|
||||||
MessageBox.Show("Template saved", "OK", MessageBoxButton.OK, MessageBoxImage.Information);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void buttonDeleteTemplate_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (_currentTemplate != null)
|
|
||||||
{
|
|
||||||
if (MessageBox.Show("Delete this template?", "Confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.Yes)
|
|
||||||
{
|
|
||||||
this.comboBox_WSDPTemplate.SelectedItem = null;
|
|
||||||
this.comboBox_WSDPTemplate.ItemsSource = null;
|
|
||||||
DBManager.Instance.Delete(_currentTemplate);
|
|
||||||
_wsdpTemplates.Remove(_currentTemplate);
|
|
||||||
this.textBoxTemplateTitle.Text = null;
|
|
||||||
this.buttonDeleteTemplate.IsEnabled = false;
|
|
||||||
this.comboBox_WSDPTemplate.ItemsSource = _wsdpTemplates;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void buttonUndoTemplate_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (this._undoTemplate != null)
|
|
||||||
{
|
|
||||||
this.textBoxPortReceptionFacilityProviderName.Text = this._undoTemplate;
|
|
||||||
this.buttonUndoTemplate.IsEnabled = false;
|
|
||||||
this._undoTemplate = null;
|
|
||||||
this.comboBox_WSDPTemplate.SelectedItem = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// private void buttonAddEntries_Click(object sender, RoutedEventArgs e)
|
||||||
|
// {
|
||||||
|
// this.WAS_RCPT.AddMissingWasteReceived();
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
<ComboBox Name="comboBoxWasteCode" Grid.Row="0" Grid.Column="1" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" />
|
<ComboBox Name="comboBoxWasteCode" Grid.Row="0" Grid.Column="1" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" />
|
||||||
<TextBox Name="textBoxDescription" Grid.Row="1" Margin="2" Grid.Column="1" Width="auto" MaxLength="99" TextWrapping="Wrap" />
|
<TextBox Name="textBoxDescription" Grid.Row="1" Margin="2" Grid.Column="1" Width="auto" MaxLength="99" TextWrapping="Wrap" />
|
||||||
<xctk:DoubleUpDown Grid.Row="2" Grid.Column="1" Name="doubleUpDownAmountReceived" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left" Maximum="9999.999"/>
|
<xctk:DoubleUpDown Grid.Row="2" Grid.Column="1" Name="doubleUpDownAmountReceived" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</enictrl:EditWindowBase>
|
</enictrl:EditWindowBase>
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
xmlns:p="clr-namespace:ENI2.Properties"
|
xmlns:p="clr-namespace:ENI2.Properties"
|
||||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="{x:Static p:Resources.textErrors}" Height="300" Width="600" Background="AliceBlue" Icon="/ENI2Test;component/Resources/bullet_ball_red.ico" Topmost="False">
|
Title="{x:Static p:Resources.textErrors}" Height="300" Width="600" Background="AliceBlue" Icon="/ENI2;component/Resources/bullet_ball_red.ico" Topmost="False">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
xmlns:enictrl="clr-namespace:ENI2.Controls"
|
xmlns:enictrl="clr-namespace:ENI2.Controls"
|
||||||
xmlns:p="clr-namespace:ENI2.Properties"
|
xmlns:p="clr-namespace:ENI2.Properties"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="{x:Static p:Resources.textMessageHistory}" Height="450" Width="800" Background="AliceBlue" Icon="/ENI2Test;component/Resources/clock_history.ico">
|
Title="{x:Static p:Resources.textMessageHistory}" Height="450" Width="800" Background="AliceBlue" Icon="/ENI2;component/Resources/clock_history.ico">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="{x:Static p:Resources.textNewDGItem}" Height="350" Width="600" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="CanResize"
|
Title="{x:Static p:Resources.textNewDGItem}" Height="350" Width="600" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="CanResize"
|
||||||
Icon="/ENI2Test;component/Resources/bullet_ball_yellow.ico" Loaded="EditWindowBase_Loaded">
|
Icon="/ENI2;component/Resources/bullet_ball_yellow.ico" Loaded="EditWindowBase_Loaded">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
|
|||||||
@ -18,7 +18,7 @@ namespace ENI2.EditControls
|
|||||||
public partial class NewDGItemDialog : EditWindowBase
|
public partial class NewDGItemDialog : EditWindowBase
|
||||||
{
|
{
|
||||||
private List<HAZPosTemplate> _data = null;
|
private List<HAZPosTemplate> _data = null;
|
||||||
private static readonly object filterLock = new object();
|
private static object filterLock = new object();
|
||||||
|
|
||||||
public NewDGItemDialog()
|
public NewDGItemDialog()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
xmlns:p="clr-namespace:ENI2.Properties"
|
xmlns:p="clr-namespace:ENI2.Properties"
|
||||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="{x:Static p:Resources.textNewWithId}" Height="220" Width="350" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="NoResize" Icon="/ENI2Test;component/Resources/id_card_add.ico">
|
Title="{x:Static p:Resources.textNewWithId}" Height="220" Width="350" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="NoResize" Icon="/ENI2;component/Resources/id_card_add.ico">
|
||||||
|
|
||||||
<Grid Margin="4">
|
<Grid Margin="4">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
|
|||||||
@ -1,32 +0,0 @@
|
|||||||
<enictrl:EditWindowBase x:Class="ENI2.EditControls.SelectCrewMemberDialog"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:enictrl="clr-namespace:ENI2.Controls"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
xmlns:local="clr-namespace:ENI2.EditControls"
|
|
||||||
xmlns:p="clr-namespace:ENI2.Properties"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
Title="{x:Static p:Resources.textSelectCrewMember}" Height="160" Width="400" Background="AliceBlue">
|
|
||||||
<Grid>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width=".5*" />
|
|
||||||
<ColumnDefinition Width=".5*" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="28"/>
|
|
||||||
<RowDefinition Height="28"/>
|
|
||||||
<RowDefinition Height="28"/>
|
|
||||||
<RowDefinition Height="28"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<Label Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textLastName}" />
|
|
||||||
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textFirstName}" />
|
|
||||||
<Label Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textCrewFunctionOnBoard}" />
|
|
||||||
|
|
||||||
<TextBlock Text="{Binding CrewMemberLastName}" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" />
|
|
||||||
<TextBlock Text="{Binding CrewMemberFirstName}" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" />
|
|
||||||
<TextBlock Text="{Binding CrewMemberDuty}" Grid.Row="2" Grid.Column="1" VerticalAlignment="Center" />
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
</enictrl:EditWindowBase>
|
|
||||||
@ -1,41 +0,0 @@
|
|||||||
// Copyright (c) 2017- schick Informatik
|
|
||||||
// Description:
|
|
||||||
//
|
|
||||||
|
|
||||||
using bsmd.database;
|
|
||||||
using ENI2.Controls;
|
|
||||||
using System.Windows;
|
|
||||||
|
|
||||||
namespace ENI2.EditControls
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interaction logic for SelectCrewMemberDialog.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class SelectCrewMemberDialog : EditWindowBase
|
|
||||||
{
|
|
||||||
public SelectCrewMemberDialog()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
Loaded += SelectCrewMemberDialog_Loaded;
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Properties
|
|
||||||
|
|
||||||
public CREW CREW { get; set; }
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region event handler
|
|
||||||
|
|
||||||
private void SelectCrewMemberDialog_Loaded(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (CREW != null)
|
|
||||||
{
|
|
||||||
this.DataContext = CREW;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -8,7 +8,7 @@
|
|||||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||||
xmlns:p="clr-namespace:ENI2.Properties"
|
xmlns:p="clr-namespace:ENI2.Properties"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="{x:Static p:Resources.textSelectImportClasses}" Height="660" Width="250" Background="AliceBlue">
|
Title="{x:Static p:Resources.textSelectImportClasses}" Height="600" Width="250" Background="AliceBlue">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="1*" />
|
<RowDefinition Height="1*" />
|
||||||
|
|||||||
@ -1,13 +1,14 @@
|
|||||||
// Copyright (c) 2017-today schick Informatik
|
// Copyright (c) 2017-today schick Informatik
|
||||||
// Description: Select classes for import via Excel or for sending them once completed
|
// Description: Select classes for import
|
||||||
// Returns: Array of selected classes as property
|
// Returns: Array of selected classes as property
|
||||||
|
|
||||||
using bsmd.database;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
|
||||||
|
using bsmd.database;
|
||||||
|
|
||||||
namespace ENI2.EditControls
|
namespace ENI2.EditControls
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -16,8 +17,7 @@ namespace ENI2.EditControls
|
|||||||
public partial class SelectImportClassesDialog : ENI2.Controls.EditWindowBase
|
public partial class SelectImportClassesDialog : ENI2.Controls.EditWindowBase
|
||||||
{
|
{
|
||||||
private readonly List<SelectClass> _selectClasses = new List<SelectClass>();
|
private readonly List<SelectClass> _selectClasses = new List<SelectClass>();
|
||||||
private readonly List<Message.NotificationClass> _selectedClasses = new List<Message.NotificationClass>();
|
private readonly List<bsmd.database.Message.NotificationClass> _selectedClasses = new List<Message.NotificationClass>();
|
||||||
private readonly List<Message.NotificationClass> _preselectedClasses = new List<Message.NotificationClass>();
|
|
||||||
|
|
||||||
public SelectImportClassesDialog()
|
public SelectImportClassesDialog()
|
||||||
{
|
{
|
||||||
@ -25,61 +25,35 @@ namespace ENI2.EditControls
|
|||||||
this.Loaded += SelectImportClassesDialog_Loaded;
|
this.Loaded += SelectImportClassesDialog_Loaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// List of all message classes that are available for selection
|
|
||||||
/// </summary>
|
|
||||||
public List<Message.NotificationClass> SelectedClasses
|
public List<Message.NotificationClass> SelectedClasses
|
||||||
{
|
{
|
||||||
get { return _selectedClasses; }
|
get { return _selectedClasses; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Classes that should be checked already when the dialog is opened (relevant for send mode)
|
|
||||||
/// </summary>
|
|
||||||
public List<Message.NotificationClass > PreselectedClasses
|
|
||||||
{
|
|
||||||
get { return _preselectedClasses; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// These messages are needed to derive message classes from, already sorted in the right manner
|
/// These messages are needed to derive message classes from, already sorted in the right manner
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<Message> Messages { get; set; }
|
public List<Message> Messages { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Flag to reduce selection amount in case of transit
|
|
||||||
/// </summary>
|
|
||||||
public bool IsTransit { get; set; }
|
public bool IsTransit { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Flag if dialog is used in import mode (default true). Set false for send all mode.
|
|
||||||
/// </summary>
|
|
||||||
public bool IsImportMode { get; set; } = true;
|
|
||||||
|
|
||||||
private void SelectImportClassesDialog_Loaded(object sender, RoutedEventArgs e)
|
private void SelectImportClassesDialog_Loaded(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
foreach(Message aMessage in this.Messages)
|
foreach(Message aMessage in this.Messages)
|
||||||
{
|
{
|
||||||
// these are of no interest
|
|
||||||
if ((aMessage.MessageNotificationClass == Message.NotificationClass.VISIT) ||
|
if ((aMessage.MessageNotificationClass == Message.NotificationClass.VISIT) ||
|
||||||
(aMessage.MessageNotificationClass == Message.NotificationClass.TRANSIT) ||
|
(aMessage.MessageNotificationClass == Message.NotificationClass.TRANSIT) ||
|
||||||
(aMessage.MessageNotificationClass == Message.NotificationClass.STO))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// these are neither imported nor sent by the Send all function
|
|
||||||
|
|
||||||
if ((aMessage.MessageNotificationClass == Message.NotificationClass.ATA) ||
|
|
||||||
(aMessage.MessageNotificationClass == Message.NotificationClass.ATD))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
|
|
||||||
// filter out messages not relevant for transit
|
|
||||||
if (IsTransit && (
|
|
||||||
(aMessage.MessageNotificationClass == Message.NotificationClass.ATA) ||
|
(aMessage.MessageNotificationClass == Message.NotificationClass.ATA) ||
|
||||||
(aMessage.MessageNotificationClass == Message.NotificationClass.ATD) ||
|
(aMessage.MessageNotificationClass == Message.NotificationClass.ATD) ||
|
||||||
(aMessage.MessageNotificationClass == Message.NotificationClass.BKRD) ||
|
(aMessage.MessageNotificationClass == Message.NotificationClass.STO) ||
|
||||||
|
(aMessage.MessageNotificationClass == Message.NotificationClass.CREWD) || // XXX : TODO remove
|
||||||
|
(aMessage.MessageNotificationClass == Message.NotificationClass.PASD)
|
||||||
|
) continue;
|
||||||
|
|
||||||
|
if (IsTransit &&
|
||||||
|
((aMessage.MessageNotificationClass == Message.NotificationClass.BKRD) ||
|
||||||
|
(aMessage.MessageNotificationClass == Message.NotificationClass.BPOL) ||
|
||||||
(aMessage.MessageNotificationClass == Message.NotificationClass.HAZD) ||
|
(aMessage.MessageNotificationClass == Message.NotificationClass.HAZD) ||
|
||||||
(aMessage.MessageNotificationClass == Message.NotificationClass.INFO) ||
|
(aMessage.MessageNotificationClass == Message.NotificationClass.INFO) ||
|
||||||
(aMessage.MessageNotificationClass == Message.NotificationClass.LADG) ||
|
(aMessage.MessageNotificationClass == Message.NotificationClass.LADG) ||
|
||||||
@ -93,13 +67,12 @@ namespace ENI2.EditControls
|
|||||||
)) continue;
|
)) continue;
|
||||||
|
|
||||||
SelectClass sc = new SelectClass();
|
SelectClass sc = new SelectClass();
|
||||||
sc.Name = Enum.GetName(typeof(Message.NotificationClass), aMessage.MessageNotificationClass);
|
sc.Name = Enum.GetName(typeof(bsmd.database.Message.NotificationClass), aMessage.MessageNotificationClass);
|
||||||
sc.Class = aMessage.MessageNotificationClass;
|
sc.Class = aMessage.MessageNotificationClass;
|
||||||
sc.IsSelected = this._preselectedClasses.Contains(sc.Class);
|
sc.IsSelected = false;
|
||||||
_selectClasses.Add(sc);
|
_selectClasses.Add(sc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
this.checkListBoxClasses.ItemsSource = _selectClasses;
|
this.checkListBoxClasses.ItemsSource = _selectClasses;
|
||||||
this.OKClicked += SelectImportClassesDialog_OKClicked;
|
this.OKClicked += SelectImportClassesDialog_OKClicked;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,53 +0,0 @@
|
|||||||
<enictrl:EditWindowBase x:Class="ENI2.EditControls.SelectPortAreaDialog"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
|
||||||
xmlns:enictrl="clr-namespace:ENI2.Controls"
|
|
||||||
xmlns:local="clr-namespace:ENI2.EditControls"
|
|
||||||
xmlns:p="clr-namespace:ENI2.Properties"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
Title="Search port area" Height="400" Width="600" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="CanResize" Icon="/ENI2Test;component/Resources/bullet_ball_yellow.ico" Loaded="Window_Loaded">
|
|
||||||
<Grid>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="28" />
|
|
||||||
<RowDefinition Height="84" />
|
|
||||||
<RowDefinition Height="28" />
|
|
||||||
<RowDefinition Height="28" />
|
|
||||||
<RowDefinition Height="28" />
|
|
||||||
<RowDefinition Height="28" />
|
|
||||||
<RowDefinition Height="90" />
|
|
||||||
<RowDefinition Height="28" />
|
|
||||||
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="80" />
|
|
||||||
<ColumnDefinition Width="2*" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Label Grid.Row="1" Content="Select" />
|
|
||||||
<Label Grid.Row="0" x:Name="labelLocode" Content="ZZUKN" />
|
|
||||||
<ListBox Name="listBoxAreas" Grid.Column="1" Grid.Row="1" Margin="2" SelectionChanged="comboBoxType_SelectionChanged" />
|
|
||||||
<xctk:WatermarkTextBox Margin="2" Watermark="{x:Static p:Resources.textSearch}" Name="textBoxSearchDescription" Grid.Row="0" Grid.Column="1" TextChanged="textBoxSearchDescription_TextChanged" />
|
|
||||||
<Label Grid.Row="2" Content="Agency" />
|
|
||||||
<Label Grid.Row="3" Content="Ships" />
|
|
||||||
<Label Grid.Row="4" Content="Berth" />
|
|
||||||
<Label Grid.Row="5" Content="PortArea" />
|
|
||||||
<Label Grid.Row="6" Content="Remark" />
|
|
||||||
<Border BorderThickness="1" Grid.Column="1" Grid.Row="2" Grid.RowSpan="1" BorderBrush="Black" Margin="2">
|
|
||||||
<TextBlock Name="textBlockAgency" Margin="2,1,2,3" Background="LightGray" TextWrapping="Wrap"/>
|
|
||||||
</Border>
|
|
||||||
<Border BorderThickness="1" Grid.Column="1" Grid.Row="3" Grid.RowSpan="1" BorderBrush="Black" Margin="2">
|
|
||||||
<TextBlock Name="textBlockShips" Margin="2,1,2,3" Background="LightGray" TextWrapping="Wrap"/>
|
|
||||||
</Border>
|
|
||||||
<Border BorderThickness="1" Grid.Column="1" Grid.Row="4" Grid.RowSpan="1" BorderBrush="Black" Margin="2">
|
|
||||||
<TextBlock Name="textBlockBerth" Margin="2,1,2,3" Background="LightGray" TextWrapping="Wrap"/>
|
|
||||||
</Border>
|
|
||||||
<Border BorderThickness="1" Grid.Column="1" Grid.Row="5" Grid.RowSpan="1" BorderBrush="Black" Margin="2">
|
|
||||||
<TextBlock Name="textBlockPortArea" Margin="2,1,2,3" Background="LightGray" TextWrapping="Wrap"/>
|
|
||||||
</Border>
|
|
||||||
<Border BorderThickness="1" Grid.Column="1" Grid.Row="6" Grid.RowSpan="1" BorderBrush="Black" Margin="2">
|
|
||||||
<TextBlock Name="textBlockRemarks" Margin="2,1,2,3" Background="LightGray" TextWrapping="Wrap"/>
|
|
||||||
</Border>
|
|
||||||
</Grid>
|
|
||||||
</enictrl:EditWindowBase>
|
|
||||||
@ -1,86 +0,0 @@
|
|||||||
// Copyright (c) 2023- schick Informatik
|
|
||||||
// Description: Helper search window to
|
|
||||||
//
|
|
||||||
|
|
||||||
using bsmd.database;
|
|
||||||
using ENI2.Controls;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Windows;
|
|
||||||
|
|
||||||
namespace ENI2.EditControls
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interaction logic for SelectPortAreaDialog.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class SelectPortAreaDialog : EditWindowBase
|
|
||||||
{
|
|
||||||
|
|
||||||
#region Fields
|
|
||||||
|
|
||||||
private readonly string _poc = null;
|
|
||||||
private List<PortAreaInfo> _portAreas;
|
|
||||||
private static readonly object filterLock = new object();
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Construction
|
|
||||||
|
|
||||||
public SelectPortAreaDialog(string poc)
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
_poc = poc;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Properties
|
|
||||||
|
|
||||||
public string SelectedArea { get; private set; }
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region event handler
|
|
||||||
|
|
||||||
private void Window_Loaded(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if(LocalizedLookup.getPortAreaInfos().ContainsKey(this._poc))
|
|
||||||
_portAreas = LocalizedLookup.getPortAreaInfos()[this._poc];
|
|
||||||
this.labelLocode.Content = this._poc;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void comboBoxType_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
|
||||||
{
|
|
||||||
if (this.listBoxAreas.SelectedItem is PortAreaInfo pai)
|
|
||||||
{
|
|
||||||
this.textBlockAgency.Text = pai.Agency;
|
|
||||||
this.textBlockBerth.Text = pai.Berth;
|
|
||||||
this.textBlockPortArea.Text = pai.PortArea;
|
|
||||||
this.textBlockShips.Text = pai.Ships;
|
|
||||||
this.textBlockRemarks.Text = pai.Remark;
|
|
||||||
this.SelectedArea = pai.PortAreaCode;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void textBoxSearchDescription_TextChanged(object sender, System.Windows.Controls.TextChangedEventArgs e)
|
|
||||||
{
|
|
||||||
string searchText = this.textBoxSearchDescription.Text.Trim();
|
|
||||||
if (_portAreas == null) return;
|
|
||||||
lock (filterLock)
|
|
||||||
{
|
|
||||||
IEnumerable<PortAreaInfo> filtered = _portAreas;
|
|
||||||
if (searchText.Length > 0)
|
|
||||||
{
|
|
||||||
filtered = _portAreas.Where(elem => (elem.Remark != null && elem.Remark.ToUpperInvariant().Contains(searchText.ToUpperInvariant())) ||
|
|
||||||
(elem.Agency != null && elem.Agency.ToUpperInvariant().Contains(searchText.ToUpperInvariant())) ||
|
|
||||||
(elem.Berth != null && elem.Berth.ToUpperInvariant().Contains(searchText.ToUpperInvariant())) ||
|
|
||||||
(elem.PortArea != null && elem.PortArea.ToUpperInvariant().Contains(searchText.ToUpperInvariant())));
|
|
||||||
}
|
|
||||||
this.listBoxAreas.ItemsSource = filtered;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -8,7 +8,7 @@
|
|||||||
xmlns:p="clr-namespace:ENI2.Properties"
|
xmlns:p="clr-namespace:ENI2.Properties"
|
||||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="{x:Static p:Resources.textViolations}" Height="300" Width="600" Background="AliceBlue" Icon="/ENI2Test;component/Resources/bullet_ball_yellow.ico" Topmost="False">
|
Title="{x:Static p:Resources.textViolations}" Height="300" Width="600" Background="AliceBlue" Icon="/ENI2;component/Resources/bullet_ball_yellow.ico" Topmost="False">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
xmlns:p="clr-namespace:ENI2.Properties"
|
xmlns:p="clr-namespace:ENI2.Properties"
|
||||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="{x:Static p:Resources.textNewVisitTransitId}" Height="220" Width="350" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="NoResize" Icon="/ENI2Test;component/Resources/id_card_new.ico">
|
Title="{x:Static p:Resources.textNewVisitTransitId}" Height="220" Width="350" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="NoResize" Icon="/ENI2;component/Resources/id_card_new.ico">
|
||||||
<Grid Margin="4">
|
<Grid Margin="4">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
@ -52,7 +52,7 @@
|
|||||||
ButtonSpinnerLocation="Right"
|
ButtonSpinnerLocation="Right"
|
||||||
ParsingNumberStyle="Integer"
|
ParsingNumberStyle="Integer"
|
||||||
Watermark="Enter ENI" ValueChanged="doubleUpDownENI_ValueChanged" TextAlignment="Left"/>
|
Watermark="Enter ENI" ValueChanged="doubleUpDownENI_ValueChanged" TextAlignment="Left"/>
|
||||||
<enictrl:LocodeControl Grid.Column="1" Grid.Row="2" Width="Auto" x:Name="locodePoC" LocodeValue="{Binding PoC, Mode=TwoWay}" LocodeSource="OLD" />
|
<enictrl:LocodeControl Grid.Column="1" Grid.Row="2" Width="Auto" x:Name="locodePoC" LocodeValue="{Binding PoC, Mode=TwoWay}" />
|
||||||
<DatePicker Name="datePickerETA" Grid.Row="3" Grid.Column="1" Margin="2" SelectedDateChanged="datePickerETA_SelectedDateChanged" DisplayDateStart="1/1/1900" DisplayDateEnd="12/31/2199" PreviewKeyUp="DateTimePicker_PreviewKeyUpDate">
|
<DatePicker Name="datePickerETA" Grid.Row="3" Grid.Column="1" Margin="2" SelectedDateChanged="datePickerETA_SelectedDateChanged" DisplayDateStart="1/1/1900" DisplayDateEnd="12/31/2199" PreviewKeyUp="DateTimePicker_PreviewKeyUpDate">
|
||||||
<DatePicker.BlackoutDates>
|
<DatePicker.BlackoutDates>
|
||||||
<CalendarDateRange Start="1/1/0001" End="12/31/1799"/>
|
<CalendarDateRange Start="1/1/0001" End="12/31/1799"/>
|
||||||
|
|||||||
@ -133,7 +133,7 @@ namespace ENI2.EditControls
|
|||||||
isComplete &= imo_OR_eni;
|
isComplete &= imo_OR_eni;
|
||||||
|
|
||||||
string locode = this.locodePoC.LocodeValue;
|
string locode = this.locodePoC.LocodeValue;
|
||||||
bool validLocode = (locode != null) && (locode.Length == 5) && (locode.StartsWith("DE") || locode.StartsWith("DK") || locode.Equals("ZZNOK") || locode.Equals("DEWHV"));
|
bool validLocode = (locode != null) && (locode.Length == 5) && (locode.StartsWith("DE") || locode.StartsWith("DK") || locode.Equals("ZZNOK"));
|
||||||
|
|
||||||
isComplete &= validLocode;
|
isComplete &= validLocode;
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using bsmd.database;
|
using bsmd.database;
|
||||||
|
|
||||||
namespace ENI2.Excel
|
namespace ENI2.Excel
|
||||||
@ -74,7 +74,7 @@ namespace ENI2.Excel
|
|||||||
{ if (ScanBKRD(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
{ if (ScanBKRD(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
||||||
if ((message.MessageNotificationClass == Message.NotificationClass.BPOL) && notificationClasses.Contains(Message.NotificationClass.BPOL))
|
if ((message.MessageNotificationClass == Message.NotificationClass.BPOL) && notificationClasses.Contains(Message.NotificationClass.BPOL))
|
||||||
{ if (ScanBPOL(message, reader)) ExcelReader.SaveMessage(message); }
|
{ if (ScanBPOL(message, reader)) ExcelReader.SaveMessage(message); }
|
||||||
if ((message.MessageNotificationClass == Message.NotificationClass.CREWA) && notificationClasses.Contains(Message.NotificationClass.CREWA))
|
if ((message.MessageNotificationClass == Message.NotificationClass.CREW) && notificationClasses.Contains(Message.NotificationClass.CREW))
|
||||||
{ if (ScanCREW(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
{ if (ScanCREW(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
||||||
if ((message.MessageNotificationClass == Message.NotificationClass.CREWD) && notificationClasses.Contains(Message.NotificationClass.CREWD))
|
if ((message.MessageNotificationClass == Message.NotificationClass.CREWD) && notificationClasses.Contains(Message.NotificationClass.CREWD))
|
||||||
{ if (ScanCREWD(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
{ if (ScanCREWD(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
||||||
@ -83,7 +83,7 @@ namespace ENI2.Excel
|
|||||||
if ((message.MessageNotificationClass == Message.NotificationClass.HAZD) && notificationClasses.Contains(Message.NotificationClass.HAZD))
|
if ((message.MessageNotificationClass == Message.NotificationClass.HAZD) && notificationClasses.Contains(Message.NotificationClass.HAZD))
|
||||||
{ if (ScanHAZD(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
{ if (ScanHAZD(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
||||||
if ((message.MessageNotificationClass == Message.NotificationClass.INFO) && notificationClasses.Contains(Message.NotificationClass.INFO))
|
if ((message.MessageNotificationClass == Message.NotificationClass.INFO) && notificationClasses.Contains(Message.NotificationClass.INFO))
|
||||||
{ if (ScanINFO(message, messageCore, reader)) ExcelReader.SaveMessage(message); continue; }
|
{ if (ScanINFO(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
||||||
if ((message.MessageNotificationClass == Message.NotificationClass.LADG) && notificationClasses.Contains(Message.NotificationClass.LADG))
|
if ((message.MessageNotificationClass == Message.NotificationClass.LADG) && notificationClasses.Contains(Message.NotificationClass.LADG))
|
||||||
{ if (ScanLADG(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
{ if (ScanLADG(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
||||||
if ((message.MessageNotificationClass == Message.NotificationClass.MDH) && notificationClasses.Contains(Message.NotificationClass.MDH))
|
if ((message.MessageNotificationClass == Message.NotificationClass.MDH) && notificationClasses.Contains(Message.NotificationClass.MDH))
|
||||||
@ -92,8 +92,8 @@ namespace ENI2.Excel
|
|||||||
{ if (ScanNAME(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
{ if (ScanNAME(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
||||||
if ((message.MessageNotificationClass == Message.NotificationClass.NOA_NOD) && notificationClasses.Contains(Message.NotificationClass.NOA_NOD))
|
if ((message.MessageNotificationClass == Message.NotificationClass.NOA_NOD) && notificationClasses.Contains(Message.NotificationClass.NOA_NOD))
|
||||||
{ if (ScanNOA_NOD(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
{ if (ScanNOA_NOD(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
||||||
if ((message.MessageNotificationClass == Message.NotificationClass.PASA) && notificationClasses.Contains(Message.NotificationClass.PASA))
|
if ((message.MessageNotificationClass == Message.NotificationClass.PAS) && notificationClasses.Contains(Message.NotificationClass.PAS))
|
||||||
{ if (ScanPASA(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
{ if (ScanPAS(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
||||||
if ((message.MessageNotificationClass == Message.NotificationClass.PASD) && notificationClasses.Contains(Message.NotificationClass.PASD))
|
if ((message.MessageNotificationClass == Message.NotificationClass.PASD) && notificationClasses.Contains(Message.NotificationClass.PASD))
|
||||||
{ if (ScanPASD(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
{ if (ScanPASD(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
||||||
if ((message.MessageNotificationClass == Message.NotificationClass.POBA) && notificationClasses.Contains(Message.NotificationClass.POBA))
|
if ((message.MessageNotificationClass == Message.NotificationClass.POBA) && notificationClasses.Contains(Message.NotificationClass.POBA))
|
||||||
@ -726,61 +726,48 @@ namespace ENI2.Excel
|
|||||||
pas = new PASD();
|
pas = new PASD();
|
||||||
pas.Identifier = (i + 1).ToString();
|
pas.Identifier = (i + 1).ToString();
|
||||||
pas.MessageHeader = pasdMessage;
|
pas.MessageHeader = pasdMessage;
|
||||||
pas.IsDeparture = true;
|
|
||||||
pasdMessage.Elements.Add(pas);
|
pasdMessage.Elements.Add(pas);
|
||||||
}
|
}
|
||||||
|
|
||||||
// these two are not working, since the lookup field is a combobox where reading text always yields empty string
|
pas.NotificationSchengen = reader.ReadCellAsBool("passenger departure", "C10");
|
||||||
// if there is time we should do the solution suggested in this question
|
pas.NotificationPAX = reader.ReadCellAsBool("passenger departure", "C11");
|
||||||
// https://stackoverflow.com/questions/46752911/how-to-read-comboboxes-value-from-excel-using-c-sharp
|
|
||||||
|
|
||||||
pas.NotificationSchengen = true;
|
|
||||||
pas.NotificationPAX = reader.ReadCellAsBool("passenger departure", "C11") ?? false;
|
|
||||||
|
|
||||||
pas.PassengerLastName = lastName;
|
pas.PassengerLastName = lastName;
|
||||||
pas.PassengerFirstName = reader.ReadCellAsText("passenger departure", string.Format("C{0}", i + 16));
|
pas.PassengerFirstName = reader.ReadCellAsText("passenger departure", string.Format("C{0}", i + 16));
|
||||||
pas.PassengerPlaceOfBirth = reader.ReadCellAsText("passenger departure", string.Format("D{0}", i + 16));
|
pas.PassengerPlaceOfBirth = reader.ReadCellAsText("passenger departure", string.Format("D{0}", i + 16));
|
||||||
pas.PassengerCountryOfBirth = ExcelUtil.ReadNationality(reader.ReadCellAsText("passenger departure", string.Format("E{0}", i + 16)), out bool canceled, false);
|
pas.PassengerCountryOfBirth = reader.ReadCellAsText("passenger departure", string.Format("E{0}", i + 16));
|
||||||
if (canceled) return false;
|
|
||||||
pas.PassengerDateOfBirth = reader.ReadCellAsDateTime("passenger departure", string.Format("F{0}", i + 16));
|
pas.PassengerDateOfBirth = reader.ReadCellAsDateTime("passenger departure", string.Format("F{0}", i + 16));
|
||||||
pas.PassengerGender = ParseGender(reader.ReadCellAsText("passenger departure", string.Format("G{0}", i + 16)));
|
pas.PassengerGender = ParseGender(reader.ReadCellAsText("passenger departure", string.Format("G{0}", i + 16)));
|
||||||
pas.PassengerNationality = ExcelUtil.ReadNationality(reader.ReadCellAsText("passenger departure", string.Format("H{0}", i + 16)), out canceled);
|
pas.PassengerNationality = reader.ReadCellAsText("passenger departure", string.Format("H{0}", i + 16));
|
||||||
if (canceled) return false;
|
pas.PassengerIdentityDocumentIssuingState = reader.ReadCellAsText("passenger departure", string.Format("O{0}", i + 16));
|
||||||
pas.PassengerIdentityDocumentIssuingState = ExcelUtil.ReadNationality(reader.ReadCellAsText("passenger departure", string.Format("O{0}", i + 16)), out canceled);
|
|
||||||
if (canceled) return false;
|
|
||||||
pas.PassengerIdentityDocumentExpiryDate = reader.ReadCellAsDateTime("passenger departure", string.Format("P{0}", i + 16));
|
pas.PassengerIdentityDocumentExpiryDate = reader.ReadCellAsDateTime("passenger departure", string.Format("P{0}", i + 16));
|
||||||
|
|
||||||
|
if (pas.NotificationPAX ?? false)
|
||||||
|
{
|
||||||
pas.EmergencyCare = reader.ReadCellAsText("passenger departure", string.Format("Q{0}", i + 16));
|
pas.EmergencyCare = reader.ReadCellAsText("passenger departure", string.Format("Q{0}", i + 16));
|
||||||
pas.EmergencyContactNumber = reader.ReadCellAsText("passenger departure", string.Format("R{0}", i + 16));
|
pas.EmergencyContactNumber = reader.ReadCellAsText("passenger departure", string.Format("R{0}", i + 16));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pas.NotificationSchengen ?? false)
|
||||||
|
{
|
||||||
pas.PassengerIdentityDocumentType = ParseDocumentType(reader.ReadCellAsText("passenger departure", string.Format("I{0}", i + 16)));
|
pas.PassengerIdentityDocumentType = ParseDocumentType(reader.ReadCellAsText("passenger departure", string.Format("I{0}", i + 16)));
|
||||||
pas.PassengerIdentityDocumentId = reader.ReadCellAsText("passenger departure", string.Format("J{0}", i + 16));
|
pas.PassengerIdentityDocumentId = reader.ReadCellAsText("passenger departure", string.Format("J{0}", i + 16));
|
||||||
pas.PassengerVisaNumber = reader.ReadCellAsText("passenger departure", string.Format("K{0}", i + 16));
|
pas.PassengerVisaNumber = reader.ReadCellAsText("passenger departure", string.Format("K{0}", i + 16));
|
||||||
pas.PassengerPortOfEmbarkation = reader.ReadCellAsText("passenger departure", string.Format("L{0}", i + 16));
|
pas.PassengerPortOfEmbarkation = reader.ReadCellAsText("passenger departure", string.Format("L{0}", i + 16));
|
||||||
pas.PassengerPortOfDisembarkation = reader.ReadCellAsText("passenger departure", string.Format("M{0}", i + 16));
|
pas.PassengerPortOfDisembarkation = reader.ReadCellAsText("passenger departure", string.Format("M{0}", i + 16));
|
||||||
pas.PassengerInTransit = reader.ReadCellAsBool("passenger departure", string.Format("N{0}", i + 16));
|
pas.PassengerInTransit = reader.ReadCellAsBool("passenger departure", string.Format("N{0}", i + 16));
|
||||||
|
|
||||||
// if (pas.HasSchengenDetails) pas.NotificationSchengen = true;
|
|
||||||
// if (pas.HasPAXDetails) pas.NotificationPAX = true;
|
|
||||||
|
|
||||||
result = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool mustPAX = pasdMessage.Elements.Count >= 12;
|
result = true;
|
||||||
if (mustPAX)
|
|
||||||
{
|
|
||||||
foreach (PASD pasd in pasdMessage.Elements.Cast<PASD>())
|
|
||||||
pasd.NotificationPAX = mustPAX;
|
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region PASA
|
#region PAS
|
||||||
|
|
||||||
private static bool ScanPASA(Message pasMessage, ExcelReader reader)
|
private static bool ScanPAS(Message pasMessage, ExcelReader reader)
|
||||||
{
|
{
|
||||||
bool result = false;
|
bool result = false;
|
||||||
for (int i = 0; i < 1000; i++)
|
for (int i = 0; i < 1000; i++)
|
||||||
@ -796,46 +783,37 @@ namespace ENI2.Excel
|
|||||||
pasMessage.Elements.Add(pas);
|
pasMessage.Elements.Add(pas);
|
||||||
}
|
}
|
||||||
|
|
||||||
pas.NotificationSchengen = true;
|
pas.NotificationSchengen = reader.ReadCellAsBool("passenger arrival", "C10");
|
||||||
pas.NotificationPAX = reader.ReadCellAsBool("passenger arrival", "C11") ?? false;
|
pas.NotificationPAX = reader.ReadCellAsBool("passenger arrival", "C11");
|
||||||
|
|
||||||
pas.PassengerLastName = lastName;
|
pas.PassengerLastName = lastName;
|
||||||
pas.PassengerFirstName = reader.ReadCellAsText("passenger arrival", string.Format("C{0}", i + 16));
|
pas.PassengerFirstName = reader.ReadCellAsText("passenger arrival", string.Format("C{0}", i + 16));
|
||||||
pas.PassengerPlaceOfBirth = reader.ReadCellAsText("passenger arrival", string.Format("D{0}", i + 16));
|
pas.PassengerPlaceOfBirth = reader.ReadCellAsText("passenger arrival", string.Format("D{0}", i + 16));
|
||||||
pas.PassengerCountryOfBirth = ExcelUtil.ReadNationality(reader.ReadCellAsText("passenger arrival", string.Format("E{0}", i + 16)), out bool canceled, false);
|
pas.PassengerCountryOfBirth = reader.ReadCellAsText("passenger arrival", string.Format("E{0}", i + 16));
|
||||||
if (canceled) return false;
|
|
||||||
pas.PassengerDateOfBirth = reader.ReadCellAsDateTime("passenger arrival", string.Format("F{0}", i + 16));
|
pas.PassengerDateOfBirth = reader.ReadCellAsDateTime("passenger arrival", string.Format("F{0}", i + 16));
|
||||||
pas.PassengerGender = ParseGender(reader.ReadCellAsText("passenger arrival", string.Format("G{0}", i + 16)));
|
pas.PassengerGender = ParseGender(reader.ReadCellAsText("passenger arrival", string.Format("G{0}", i + 16)));
|
||||||
pas.PassengerNationality = ExcelUtil.ReadNationality(reader.ReadCellAsText("passenger arrival", string.Format("H{0}", i + 16)), out canceled);
|
pas.PassengerNationality = reader.ReadCellAsText("passenger arrival", string.Format("H{0}", i + 16));
|
||||||
if(canceled) return false;
|
pas.PassengerIdentityDocumentIssuingState = reader.ReadCellAsText("passenger arrival", string.Format("O{0}", i + 16));
|
||||||
pas.PassengerIdentityDocumentIssuingState = ExcelUtil.ReadNationality(reader.ReadCellAsText("passenger arrival", string.Format("O{0}", i + 16)), out canceled);
|
|
||||||
if (canceled) return false;
|
|
||||||
pas.PassengerIdentityDocumentExpiryDate = reader.ReadCellAsDateTime("passenger arrival", string.Format("P{0}", i + 16));
|
pas.PassengerIdentityDocumentExpiryDate = reader.ReadCellAsDateTime("passenger arrival", string.Format("P{0}", i + 16));
|
||||||
|
|
||||||
|
//if(pas.NotificationPAX ?? false)
|
||||||
|
//{
|
||||||
pas.EmergencyCare = reader.ReadCellAsText("passenger arrival", string.Format("Q{0}", i + 16));
|
pas.EmergencyCare = reader.ReadCellAsText("passenger arrival", string.Format("Q{0}", i + 16));
|
||||||
pas.EmergencyContactNumber = reader.ReadCellAsText("passenger arrival", string.Format("R{0}", i + 16));
|
pas.EmergencyContactNumber = reader.ReadCellAsText("passenger arrival", string.Format("R{0}", i + 16));
|
||||||
|
//}
|
||||||
|
|
||||||
|
//if(pas.NotificationSchengen ?? false)
|
||||||
|
//{
|
||||||
pas.PassengerIdentityDocumentType = ParseDocumentType(reader.ReadCellAsText("passenger arrival", string.Format("I{0}", i + 16)));
|
pas.PassengerIdentityDocumentType = ParseDocumentType(reader.ReadCellAsText("passenger arrival", string.Format("I{0}", i + 16)));
|
||||||
pas.PassengerIdentityDocumentId = reader.ReadCellAsText("passenger arrival", string.Format("J{0}", i + 16));
|
pas.PassengerIdentityDocumentId = reader.ReadCellAsText("passenger arrival", string.Format("J{0}", i + 16));
|
||||||
pas.PassengerVisaNumber = reader.ReadCellAsText("passenger arrival", string.Format("K{0}", i + 16));
|
pas.PassengerVisaNumber = reader.ReadCellAsText("passenger arrival", string.Format("K{0}", i + 16));
|
||||||
pas.PassengerPortOfEmbarkation = reader.ReadCellAsText("passenger arrival", string.Format("L{0}", i + 16));
|
pas.PassengerPortOfEmbarkation = reader.ReadCellAsText("passenger arrival", string.Format("L{0}", i + 16));
|
||||||
pas.PassengerPortOfDisembarkation = reader.ReadCellAsText("passenger arrival", string.Format("M{0}", i + 16));
|
pas.PassengerPortOfDisembarkation = reader.ReadCellAsText("passenger arrival", string.Format("M{0}", i + 16));
|
||||||
pas.PassengerInTransit = reader.ReadCellAsBool("passenger arrival", string.Format("N{0}", i + 16));
|
pas.PassengerInTransit = reader.ReadCellAsBool("passenger arrival", string.Format("N{0}", i + 16));
|
||||||
|
//}
|
||||||
|
|
||||||
// if (pas.HasSchengenDetails) pas.NotificationSchengen = true;
|
|
||||||
// if (pas.HasPAXDetails) pas.NotificationPAX = true;
|
|
||||||
|
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool mustPAX = pasMessage.Elements.Count >= 12;
|
|
||||||
if (mustPAX)
|
|
||||||
{
|
|
||||||
foreach (PAS pasa in pasMessage.Elements.Cast<PAS>())
|
|
||||||
pasa.NotificationPAX = mustPAX;
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1117,7 +1095,7 @@ namespace ENI2.Excel
|
|||||||
|
|
||||||
#region INFO
|
#region INFO
|
||||||
|
|
||||||
private static bool ScanINFO(Message infoMessage, MessageCore core, ExcelReader reader)
|
private static bool ScanINFO(Message infoMessage, ExcelReader reader)
|
||||||
{
|
{
|
||||||
if (infoMessage.Elements.Count == 0)
|
if (infoMessage.Elements.Count == 0)
|
||||||
{
|
{
|
||||||
@ -1144,25 +1122,6 @@ namespace ENI2.Excel
|
|||||||
else
|
else
|
||||||
info.PortArea = "";
|
info.PortArea = "";
|
||||||
|
|
||||||
// März 2024: Spezialfall für Abrechnungsabteilung Bremenports: Feld wird markiert (falls genügend Platz)
|
|
||||||
// falls das Schiff nach DEBRE oder DEBHV geht:
|
|
||||||
|
|
||||||
if (core.PoC.Equals("DEBRE") || core.PoC.Equals("DEBRV"))
|
|
||||||
{
|
|
||||||
if (info.SpecialRequirementsOfShipAtBerth == null)
|
|
||||||
{
|
|
||||||
info.SpecialRequirementsOfShipAtBerth = "NSW by BSMD";
|
|
||||||
}
|
|
||||||
else if (info.SpecialRequirementsOfShipAtBerth.Length <= 241) // we have enough space
|
|
||||||
{
|
|
||||||
if (info.SpecialRequirementsOfShipAtBerth.Length > 0) // if there is text already add a separator
|
|
||||||
{
|
|
||||||
info.SpecialRequirementsOfShipAtBerth += " | ";
|
|
||||||
}
|
|
||||||
info.SpecialRequirementsOfShipAtBerth += "NSW by BSMD";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1197,34 +1156,32 @@ namespace ENI2.Excel
|
|||||||
crew = new CREWD();
|
crew = new CREWD();
|
||||||
crew.Identifier = (i + 1).ToString();
|
crew.Identifier = (i + 1).ToString();
|
||||||
crew.MessageHeader = crewMessage;
|
crew.MessageHeader = crewMessage;
|
||||||
crew.IsDeparture = true;
|
|
||||||
crewMessage.Elements.Add(crew);
|
crewMessage.Elements.Add(crew);
|
||||||
}
|
}
|
||||||
|
|
||||||
crew.NotificationSchengen = true;
|
crew.NotificationSchengen = reader.ReadCellAsBool("crew departure", "C10");
|
||||||
crew.NotificationPAX = reader.ReadCellAsBool("crew departure", "C11");
|
crew.NotificationPAX = reader.ReadCellAsBool("crew departure", "C11");
|
||||||
|
|
||||||
crew.CrewMemberLastName = lastName;
|
crew.CrewMemberLastName = lastName;
|
||||||
crew.CrewMemberFirstName = reader.ReadCellAsText("crew departure", string.Format("C{0}", i + 15));
|
crew.CrewMemberFirstName = reader.ReadCellAsText("crew departure", string.Format("C{0}", i + 15));
|
||||||
crew.CrewMemberPlaceOfBirth = reader.ReadCellAsText("crew departure", string.Format("D{0}", i + 15));
|
crew.CrewMemberPlaceOfBirth = reader.ReadCellAsText("crew departure", string.Format("D{0}", i + 15));
|
||||||
crew.CrewMemberCountryOfBirth = ExcelUtil.ReadNationality(reader.ReadCellAsText("crew departure", string.Format("E{0}", i + 15)), out bool canceled, false);
|
crew.CrewMemberCountryOfBirth = reader.ReadCellAsText("crew departure", string.Format("E{0}", i + 15));
|
||||||
if (canceled) return false;
|
|
||||||
crew.CrewMemberDateOfBirth = reader.ReadCellAsDateTime("crew departure", string.Format("F{0}", i + 15));
|
crew.CrewMemberDateOfBirth = reader.ReadCellAsDateTime("crew departure", string.Format("F{0}", i + 15));
|
||||||
string gender = reader.ReadCellAsText("crew departure", string.Format("G{0}", i + 15));
|
string gender = reader.ReadCellAsText("crew departure", string.Format("G{0}", i + 15));
|
||||||
crew.CrewMemberGender = ParseGender(gender);
|
crew.CrewMemberGender = ParseGender(gender);
|
||||||
crew.CrewMemberNationality = ExcelUtil.ReadNationality(reader.ReadCellAsText("crew departure", string.Format("H{0}", i + 15)), out canceled);
|
crew.CrewMemberNationality = reader.ReadCellAsText("crew departure", string.Format("H{0}", i + 15));
|
||||||
if (canceled) return false;
|
|
||||||
|
|
||||||
|
if (crew.NotificationSchengen ?? false)
|
||||||
|
{
|
||||||
string idDocType = reader.ReadCellAsText("crew departure", string.Format("I{0}", i + 15));
|
string idDocType = reader.ReadCellAsText("crew departure", string.Format("I{0}", i + 15));
|
||||||
crew.CrewMemberIdentityDocumentType = ParseDocumentType(idDocType);
|
crew.CrewMemberIdentityDocumentType = ParseDocumentType(idDocType);
|
||||||
crew.CrewMemberIdentityDocumentId = reader.ReadCellAsText("crew departure", string.Format("J{0}", i + 15));
|
crew.CrewMemberIdentityDocumentId = reader.ReadCellAsText("crew departure", string.Format("J{0}", i + 15));
|
||||||
crew.CrewMemberVisaNumber = reader.ReadCellAsText("crew departure", string.Format("K{0}", i + 15));
|
crew.CrewMemberVisaNumber = reader.ReadCellAsText("crew departure", string.Format("K{0}", i + 15));
|
||||||
crew.CrewMemberIdentityDocumentIssuingState = ExcelUtil.ReadNationality(reader.ReadCellAsText("crew departure", string.Format("M{0}", i + 15)), out canceled);
|
crew.CrewMemberIdentityDocumentIssuingState = reader.ReadCellAsText("crew departure", string.Format("M{0}", i + 15));
|
||||||
if (canceled) return false;
|
|
||||||
crew.CrewMemberIdentityDocumentExpiryDate = reader.ReadCellAsDateTime("crew departure", string.Format("N{0}", i + 15));
|
crew.CrewMemberIdentityDocumentExpiryDate = reader.ReadCellAsDateTime("crew departure", string.Format("N{0}", i + 15));
|
||||||
|
}
|
||||||
|
|
||||||
crew.CrewMemberDuty = reader.ReadCellAsText("crew departure", string.Format("L{0}", i + 15));
|
crew.CrewMemberDuty = reader.ReadCellAsText("crew departure", string.Format("L{0}", i + 15));
|
||||||
if (crew.CrewMemberDuty.IsNullOrEmpty()) crew.CrewMemberDuty = "unknown";
|
|
||||||
|
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
@ -1233,7 +1190,7 @@ namespace ENI2.Excel
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region CREWA
|
#region CREW
|
||||||
|
|
||||||
private static bool ScanCREW(Message crewMessage, ExcelReader reader)
|
private static bool ScanCREW(Message crewMessage, ExcelReader reader)
|
||||||
{
|
{
|
||||||
@ -1251,30 +1208,29 @@ namespace ENI2.Excel
|
|||||||
crewMessage.Elements.Add(crew);
|
crewMessage.Elements.Add(crew);
|
||||||
}
|
}
|
||||||
|
|
||||||
crew.NotificationSchengen = true;
|
crew.NotificationSchengen = reader.ReadCellAsBool("crew arrival", "C10");
|
||||||
crew.NotificationPAX = reader.ReadCellAsBool("crew arrival", "C11") ?? false;
|
crew.NotificationPAX = reader.ReadCellAsBool("crew arrival", "C11");
|
||||||
|
|
||||||
crew.CrewMemberLastName = lastName;
|
crew.CrewMemberLastName = lastName;
|
||||||
crew.CrewMemberFirstName = reader.ReadCellAsText("crew arrival", string.Format("C{0}", i + 15));
|
crew.CrewMemberFirstName = reader.ReadCellAsText("crew arrival", string.Format("C{0}", i + 15));
|
||||||
crew.CrewMemberPlaceOfBirth = reader.ReadCellAsText("crew arrival", string.Format("D{0}", i + 15));
|
crew.CrewMemberPlaceOfBirth = reader.ReadCellAsText("crew arrival", string.Format("D{0}", i + 15));
|
||||||
crew.CrewMemberCountryOfBirth = ExcelUtil.ReadNationality(reader.ReadCellAsText("crew arrival", string.Format("E{0}", i + 15)), out bool canceled, false);
|
crew.CrewMemberCountryOfBirth = reader.ReadCellAsText("crew arrival", string.Format("E{0}", i + 15));
|
||||||
if (canceled) return false;
|
|
||||||
crew.CrewMemberDateOfBirth = reader.ReadCellAsDateTime("crew arrival", string.Format("F{0}", i + 15));
|
crew.CrewMemberDateOfBirth = reader.ReadCellAsDateTime("crew arrival", string.Format("F{0}", i + 15));
|
||||||
string gender = reader.ReadCellAsText("crew arrival", string.Format("G{0}", i + 15));
|
string gender = reader.ReadCellAsText("crew arrival", string.Format("G{0}", i + 15));
|
||||||
crew.CrewMemberGender = ParseGender(gender);
|
crew.CrewMemberGender = ParseGender(gender);
|
||||||
crew.CrewMemberNationality = ExcelUtil.ReadNationality(reader.ReadCellAsText("crew arrival", string.Format("H{0}", i + 15)), out canceled);
|
crew.CrewMemberNationality = reader.ReadCellAsText("crew arrival", string.Format("H{0}", i + 15));
|
||||||
if (canceled) return false;
|
|
||||||
|
|
||||||
|
//if(crew.NotificationSchengen ?? false)
|
||||||
|
//{
|
||||||
string idDocType = reader.ReadCellAsText("crew arrival", string.Format("I{0}", i + 15));
|
string idDocType = reader.ReadCellAsText("crew arrival", string.Format("I{0}", i + 15));
|
||||||
crew.CrewMemberIdentityDocumentType = ParseDocumentType(idDocType);
|
crew.CrewMemberIdentityDocumentType = ParseDocumentType(idDocType);
|
||||||
crew.CrewMemberIdentityDocumentId = reader.ReadCellAsText("crew arrival", string.Format("J{0}", i + 15));
|
crew.CrewMemberIdentityDocumentId = reader.ReadCellAsText("crew arrival", string.Format("J{0}", i + 15));
|
||||||
crew.CrewMemberVisaNumber = reader.ReadCellAsText("crew arrival", string.Format("K{0}", i + 15));
|
crew.CrewMemberVisaNumber = reader.ReadCellAsText("crew arrival", string.Format("K{0}", i + 15));
|
||||||
crew.CrewMemberIdentityDocumentIssuingState = ExcelUtil.ReadNationality(reader.ReadCellAsText("crew arrival", string.Format("M{0}", i + 15)), out canceled);
|
crew.CrewMemberIdentityDocumentIssuingState = reader.ReadCellAsText("crew arrival", string.Format("M{0}", i + 15));
|
||||||
if (canceled) return false;
|
|
||||||
crew.CrewMemberIdentityDocumentExpiryDate = reader.ReadCellAsDateTime("crew arrival", string.Format("N{0}", i + 15));
|
crew.CrewMemberIdentityDocumentExpiryDate = reader.ReadCellAsDateTime("crew arrival", string.Format("N{0}", i + 15));
|
||||||
|
//}
|
||||||
|
|
||||||
crew.CrewMemberDuty = reader.ReadCellAsText("crew arrival", string.Format("L{0}", i + 15));
|
crew.CrewMemberDuty = reader.ReadCellAsText("crew arrival", string.Format("L{0}", i + 15));
|
||||||
if (crew.CrewMemberDuty.IsNullOrEmpty()) crew.CrewMemberDuty = "unknown";
|
|
||||||
|
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,6 @@ using Microsoft.Office.Interop.Excel;
|
|||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using log4net;
|
using log4net;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
|
|
||||||
namespace ENI2.Excel
|
namespace ENI2.Excel
|
||||||
{
|
{
|
||||||
@ -106,20 +105,6 @@ namespace ENI2.Excel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static double? ParseAnyDouble(string val)
|
|
||||||
{
|
|
||||||
double? result = null;
|
|
||||||
if (double.TryParse(val, NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite,
|
|
||||||
CultureInfo.InvariantCulture, out double tmpDouble))
|
|
||||||
result = tmpDouble;
|
|
||||||
if (result == null)
|
|
||||||
{
|
|
||||||
if (double.TryParse(val, out tmpDouble)) // current language style (==GER, mit , statt .)
|
|
||||||
result = tmpDouble;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal double? ReadNumber(string lookup)
|
internal double? ReadNumber(string lookup)
|
||||||
{
|
{
|
||||||
double? result = null;
|
double? result = null;
|
||||||
@ -129,17 +114,15 @@ namespace ENI2.Excel
|
|||||||
{
|
{
|
||||||
var val = _nameDict[lookup].RefersToRange.Value;
|
var val = _nameDict[lookup].RefersToRange.Value;
|
||||||
if (val is double) result = val;
|
if (val is double) result = val;
|
||||||
if ((val is string) && (val.Length > 0))
|
if (val is string)
|
||||||
{
|
{
|
||||||
result = ParseAnyDouble(val);
|
if (double.TryParse(val, NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite,
|
||||||
|
CultureInfo.InvariantCulture, out double tmpDouble))
|
||||||
|
result = tmpDouble;
|
||||||
if (result == null)
|
if (result == null)
|
||||||
{
|
{
|
||||||
Match m = Regex.Match(val, "([0-9\\.\\,]+)([a-zA-Z]*)");
|
if (double.TryParse(val, out tmpDouble)) // current language style (==GER, mit , statt .)
|
||||||
if (m.Success)
|
result = tmpDouble;
|
||||||
{
|
|
||||||
result = ParseAnyDouble(m.Groups[1].Value);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -49,14 +49,9 @@ namespace ENI2.Excel
|
|||||||
{
|
{
|
||||||
message.CreatedBy = "EXCEL";
|
message.CreatedBy = "EXCEL";
|
||||||
if (message.MessageNotificationClass == Message.NotificationClass.STO)
|
if (message.MessageNotificationClass == Message.NotificationClass.STO)
|
||||||
{
|
|
||||||
message.InternalStatus = Message.BSMDStatus.PREPARE;
|
message.InternalStatus = Message.BSMDStatus.PREPARE;
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
message.InternalStatus = Message.BSMDStatus.EXCEL;
|
message.InternalStatus = Message.BSMDStatus.EXCEL;
|
||||||
message.ChangedBy = ReportingParty.CurrentReportingParty?.Logon;
|
|
||||||
}
|
|
||||||
message.UnsentMessageWarningShown = false;
|
message.UnsentMessageWarningShown = false;
|
||||||
DBManager.Instance.Save(message);
|
DBManager.Instance.Save(message);
|
||||||
message.SaveElements();
|
message.SaveElements();
|
||||||
@ -128,7 +123,7 @@ namespace ENI2.Excel
|
|||||||
if (portName.IsNullOrEmpty())
|
if (portName.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
_log.WarnFormat("unknown Locode {0}", val);
|
_log.WarnFormat("unknown Locode {0}", val);
|
||||||
val = null;
|
val = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
@ -636,20 +631,14 @@ namespace ENI2.Excel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal string ReadCellAsText(string sheetName, string range, int? maxLength = null)
|
internal string ReadCellAsText(string sheetName, string range)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Worksheet workSheet = (Worksheet)_workBook.Worksheets[sheetName];
|
Worksheet workSheet = (Worksheet)_workBook.Worksheets[sheetName];
|
||||||
string result = workSheet.Range[range].Text.ToString();
|
string result = workSheet.Range[range].Text.ToString();
|
||||||
if (!result.IsNullOrEmpty())
|
if (!result.IsNullOrEmpty())
|
||||||
{
|
|
||||||
result = result.Trim().Clean();
|
result = result.Trim().Clean();
|
||||||
if(maxLength.HasValue && result.Length > maxLength.Value)
|
|
||||||
{
|
|
||||||
result = result.Substring(0, maxLength.Value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|||||||
@ -15,7 +15,6 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace ENI2.Excel
|
namespace ENI2.Excel
|
||||||
@ -58,7 +57,7 @@ namespace ENI2.Excel
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Task.Run(async () => await ValueMapping.LoadDicts()); // reload all messaging dicts (also removes "temporary" entries from last run)
|
ValueMapping.LoadDicts(); // reload all messaging dicts (also removes "temporary" entries from last run)
|
||||||
|
|
||||||
// load messages if already present
|
// load messages if already present
|
||||||
List<Message> messages = DBManager.Instance.GetMessagesForCore(messageCore, DBManager.MessageLoad.ALL);
|
List<Message> messages = DBManager.Instance.GetMessagesForCore(messageCore, DBManager.MessageLoad.ALL);
|
||||||
@ -85,7 +84,7 @@ namespace ENI2.Excel
|
|||||||
{ if (ScanBKRD(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
{ if (ScanBKRD(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
||||||
if ((message.MessageNotificationClass == Message.NotificationClass.BPOL) && notificationClasses.Contains(Message.NotificationClass.BPOL))
|
if ((message.MessageNotificationClass == Message.NotificationClass.BPOL) && notificationClasses.Contains(Message.NotificationClass.BPOL))
|
||||||
{ if (ScanBPOL(message, messages, messageCore, reader)) ExcelReader.SaveMessage(message); }
|
{ if (ScanBPOL(message, messages, messageCore, reader)) ExcelReader.SaveMessage(message); }
|
||||||
if ((message.MessageNotificationClass == Message.NotificationClass.CREWA) && notificationClasses.Contains(Message.NotificationClass.CREWA))
|
if ((message.MessageNotificationClass == Message.NotificationClass.CREW) && notificationClasses.Contains(Message.NotificationClass.CREW))
|
||||||
{ if (ScanCREW(message, reader, isOldVersion)) ExcelReader.SaveMessage(message); continue; }
|
{ if (ScanCREW(message, reader, isOldVersion)) ExcelReader.SaveMessage(message); continue; }
|
||||||
if ((message.MessageNotificationClass == Message.NotificationClass.CREWD) && notificationClasses.Contains(Message.NotificationClass.CREWD))
|
if ((message.MessageNotificationClass == Message.NotificationClass.CREWD) && notificationClasses.Contains(Message.NotificationClass.CREWD))
|
||||||
{ if (ScanCREWD(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
{ if (ScanCREWD(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
||||||
@ -94,7 +93,7 @@ namespace ENI2.Excel
|
|||||||
if ((message.MessageNotificationClass == Message.NotificationClass.HAZD) && notificationClasses.Contains(Message.NotificationClass.HAZD))
|
if ((message.MessageNotificationClass == Message.NotificationClass.HAZD) && notificationClasses.Contains(Message.NotificationClass.HAZD))
|
||||||
{ if (ScanHAZD(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
{ if (ScanHAZD(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
||||||
if ((message.MessageNotificationClass == Message.NotificationClass.INFO) && notificationClasses.Contains(Message.NotificationClass.INFO))
|
if ((message.MessageNotificationClass == Message.NotificationClass.INFO) && notificationClasses.Contains(Message.NotificationClass.INFO))
|
||||||
{ if (ScanINFO(message, messageCore, reader)) ExcelReader.SaveMessage(message); continue; }
|
{ if (ScanINFO(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
||||||
if ((message.MessageNotificationClass == Message.NotificationClass.LADG) && notificationClasses.Contains(Message.NotificationClass.LADG))
|
if ((message.MessageNotificationClass == Message.NotificationClass.LADG) && notificationClasses.Contains(Message.NotificationClass.LADG))
|
||||||
{ if (ScanLADG(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
{ if (ScanLADG(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
||||||
if ((message.MessageNotificationClass == Message.NotificationClass.MDH) && notificationClasses.Contains(Message.NotificationClass.MDH))
|
if ((message.MessageNotificationClass == Message.NotificationClass.MDH) && notificationClasses.Contains(Message.NotificationClass.MDH))
|
||||||
@ -103,7 +102,7 @@ namespace ENI2.Excel
|
|||||||
{ if (ScanNAME(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
{ if (ScanNAME(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
||||||
if ((message.MessageNotificationClass == Message.NotificationClass.NOA_NOD) && notificationClasses.Contains(Message.NotificationClass.NOA_NOD))
|
if ((message.MessageNotificationClass == Message.NotificationClass.NOA_NOD) && notificationClasses.Contains(Message.NotificationClass.NOA_NOD))
|
||||||
{ if (ScanNOA_NOD(message, messageCore, reader)) ExcelReader.SaveMessage(message); continue; }
|
{ if (ScanNOA_NOD(message, messageCore, reader)) ExcelReader.SaveMessage(message); continue; }
|
||||||
if ((message.MessageNotificationClass == Message.NotificationClass.PASA) && notificationClasses.Contains(Message.NotificationClass.PASA))
|
if ((message.MessageNotificationClass == Message.NotificationClass.PAS) && notificationClasses.Contains(Message.NotificationClass.PAS))
|
||||||
{ if (ScanPAS(message, reader, isOldVersion)) ExcelReader.SaveMessage(message); continue; }
|
{ if (ScanPAS(message, reader, isOldVersion)) ExcelReader.SaveMessage(message); continue; }
|
||||||
if ((message.MessageNotificationClass == Message.NotificationClass.PASD) && notificationClasses.Contains(Message.NotificationClass.PASD))
|
if ((message.MessageNotificationClass == Message.NotificationClass.PASD) && notificationClasses.Contains(Message.NotificationClass.PASD))
|
||||||
{ if (ScanPASD(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
{ if (ScanPASD(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
||||||
@ -944,7 +943,7 @@ namespace ENI2.Excel
|
|||||||
|
|
||||||
#region INFO
|
#region INFO
|
||||||
|
|
||||||
private static bool ScanINFO(Message infoMessage, MessageCore core, ExcelReader reader)
|
private static bool ScanINFO(Message infoMessage, ExcelReader reader)
|
||||||
{
|
{
|
||||||
if (infoMessage.Elements.Count == 0)
|
if (infoMessage.Elements.Count == 0)
|
||||||
{
|
{
|
||||||
@ -957,39 +956,14 @@ namespace ENI2.Excel
|
|||||||
|
|
||||||
string portArea = reader.ReadText("INFO.PortArea")?.ToUpper();
|
string portArea = reader.ReadText("INFO.PortArea")?.ToUpper();
|
||||||
if (!portArea.IsNullOrEmpty() && DBManager.Instance.GetPortAreaDict().ContainsKey(portArea))
|
if (!portArea.IsNullOrEmpty() && DBManager.Instance.GetPortAreaDict().ContainsKey(portArea))
|
||||||
{
|
|
||||||
info.PortArea = portArea;
|
info.PortArea = portArea;
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
info.PortArea = "";
|
info.PortArea = "";
|
||||||
if (!portArea.IsNullOrEmpty() && info.RequestedPositionInPortOfCall.IsNullOrEmpty())
|
|
||||||
info.RequestedPositionInPortOfCall = portArea;
|
|
||||||
}
|
|
||||||
|
|
||||||
info.ShippingArea = reader.ReadShippingArea("INFO.ShippingArea"); // enum read func
|
info.ShippingArea = reader.ReadShippingArea("INFO.ShippingArea"); // enum read func
|
||||||
bool? fumigatedBulkCargo = reader.ReadBoolean("INFO.FumigatedBulkCargo");
|
bool? fumigatedBulkCargo = reader.ReadBoolean("INFO.FumigatedBulkCargo");
|
||||||
info.FumigatedBulkCargo = (byte)((fumigatedBulkCargo ?? false) ? 1 : 0);
|
info.FumigatedBulkCargo = (byte)((fumigatedBulkCargo ?? false) ? 1 : 0);
|
||||||
|
|
||||||
// März 2024: Spezialfall für Abrechnungsabteilung Bremenports: Feld wird markiert (falls genügend Platz)
|
|
||||||
// falls das Schiff nach DEBRE oder DEBHV geht:
|
|
||||||
|
|
||||||
if(core.PoC.Equals("DEBRE") || core.PoC.Equals("DEBRV"))
|
|
||||||
{
|
|
||||||
if(info.SpecialRequirementsOfShipAtBerth == null)
|
|
||||||
{
|
|
||||||
info.SpecialRequirementsOfShipAtBerth = "NSW by BSMD";
|
|
||||||
}
|
|
||||||
else if(info.SpecialRequirementsOfShipAtBerth.Length <= 241) // we have enough space
|
|
||||||
{
|
|
||||||
if(info.SpecialRequirementsOfShipAtBerth.Length > 0) // if there is text already add a separator
|
|
||||||
{
|
|
||||||
info.SpecialRequirementsOfShipAtBerth += " | ";
|
|
||||||
}
|
|
||||||
info.SpecialRequirementsOfShipAtBerth += "NSW by BSMD";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1008,8 +982,6 @@ namespace ENI2.Excel
|
|||||||
STAT stat = statMessage.Elements[0] as STAT;
|
STAT stat = statMessage.Elements[0] as STAT;
|
||||||
ScanMessage(stat, reader);
|
ScanMessage(stat, reader);
|
||||||
|
|
||||||
if (!messageCore.IsTransit) // let's not do this for transit messages
|
|
||||||
{
|
|
||||||
foreach (Message preMessage in messages)
|
foreach (Message preMessage in messages)
|
||||||
{
|
{
|
||||||
if (preMessage.MessageNotificationClass == Message.NotificationClass.PRE72H)
|
if (preMessage.MessageNotificationClass == Message.NotificationClass.PRE72H)
|
||||||
@ -1022,7 +994,6 @@ namespace ENI2.Excel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!stat.Flag.IsNullOrEmpty()) stat.Flag = stat.Flag.ToUpper();
|
if (!stat.Flag.IsNullOrEmpty()) stat.Flag = stat.Flag.ToUpper();
|
||||||
if (!stat.PortOfRegistry.IsNullOrEmpty()) stat.PortOfRegistry = stat.PortOfRegistry.ToUpper();
|
if (!stat.PortOfRegistry.IsNullOrEmpty()) stat.PortOfRegistry = stat.PortOfRegistry.ToUpper();
|
||||||
@ -1244,7 +1215,6 @@ namespace ENI2.Excel
|
|||||||
if ((reader.Mode == ExcelReader.CountryMode.DE) && waste.IsDashWasteCode)
|
if ((reader.Mode == ExcelReader.CountryMode.DE) && waste.IsDashWasteCode)
|
||||||
{
|
{
|
||||||
waste.WasteDescription = "-";
|
waste.WasteDescription = "-";
|
||||||
// NOP
|
|
||||||
}
|
}
|
||||||
else if (reader.Mode == ExcelReader.CountryMode.DK)
|
else if (reader.Mode == ExcelReader.CountryMode.DK)
|
||||||
{
|
{
|
||||||
@ -1284,19 +1254,18 @@ namespace ENI2.Excel
|
|||||||
if (waste.WasteType == 2309) waste.WasteType = 507;
|
if (waste.WasteType == 2309) waste.WasteType = 507;
|
||||||
if (waste.WasteType == 3000) waste.WasteType = 401;
|
if (waste.WasteType == 3000) waste.WasteType = 401;
|
||||||
|
|
||||||
waste.WasteDisposalAmount_MTQ = reader.ReadNumber(wasteAmount);
|
waste.WasteDisposalAmount_MTQ = reader.ReadNumberDefaultZero(wasteAmount);
|
||||||
if (!waste.WasteDisposalAmount_MTQ.HasValue && reader.ReadText(wasteAmount).IsNullOrEmpty()) waste.WasteDisposalAmount_MTQ = 0;
|
waste.WasteCapacity_MTQ = reader.ReadNumberDefaultZero(wasteCapacity);
|
||||||
waste.WasteCapacity_MTQ = reader.ReadNumber(wasteCapacity);
|
waste.WasteAmountRetained_MTQ = reader.ReadNumberDefaultZero(wasteRetained);
|
||||||
if (!waste.WasteCapacity_MTQ.HasValue && reader.ReadText(wasteCapacity).IsNullOrEmpty()) waste.WasteCapacity_MTQ = 0;
|
|
||||||
waste.WasteAmountRetained_MTQ = reader.ReadNumber(wasteRetained);
|
|
||||||
if (!waste.WasteAmountRetained_MTQ.HasValue && reader.ReadText(wasteRetained).IsNullOrEmpty()) waste.WasteAmountRetained_MTQ = 0;
|
|
||||||
|
|
||||||
waste.WasteDisposalPort = reader.ReadSSNLocode(wastePort); // aka RemainingWasteDisposalPort
|
waste.WasteDisposalPort = reader.ReadSSNLocode(wastePort); // aka RemainingWasteDisposalPort
|
||||||
|
|
||||||
if ((waste.WasteDisposalPort == null) && reader.ReadText(wastePort).IsNullOrEmpty()) waste.WasteDisposalPort = "ZZUKN";
|
if (waste.WasteDisposalPort.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
waste.WasteDisposalPort = "ZZUKN";
|
||||||
|
}
|
||||||
|
|
||||||
waste.WasteAmountGeneratedTillNextPort_MTQ = reader.ReadNumber(amountGen);
|
waste.WasteAmountGeneratedTillNextPort_MTQ = reader.ReadNumberDefaultZero(amountGen);
|
||||||
if (!waste.WasteAmountGeneratedTillNextPort_MTQ.HasValue && reader.ReadText(amountGen).IsNullOrEmpty()) waste.WasteAmountGeneratedTillNextPort_MTQ = 0;
|
|
||||||
|
|
||||||
if (!waste.WasteType.HasValue || (waste.WasteType > 999))
|
if (!waste.WasteType.HasValue || (waste.WasteType > 999))
|
||||||
{
|
{
|
||||||
@ -1304,8 +1273,7 @@ namespace ENI2.Excel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
was.AddMissingWaste(false);
|
was.AddMissingWaste();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1375,7 +1343,7 @@ namespace ENI2.Excel
|
|||||||
wr.WasteCode.Equals("204") || wr.WasteCode.Equals("510") || wr.WasteCode.Equals("511"))
|
wr.WasteCode.Equals("204") || wr.WasteCode.Equals("510") || wr.WasteCode.Equals("511"))
|
||||||
wr.WasteDescription = "-";
|
wr.WasteDescription = "-";
|
||||||
}
|
}
|
||||||
wr.AmountWasteReceived_MTQ = reader.ReadNumber(wAmount); // ?? (double?)0; // Default ist 0, nicht nix ;-) // Update: wir wollen doch einen Fehler
|
wr.AmountWasteReceived_MTQ = reader.ReadNumber(wAmount) ?? (double?)0; // Default ist 0, nicht nix ;-)
|
||||||
}
|
}
|
||||||
|
|
||||||
// only add message when an identification number was given
|
// only add message when an identification number was given
|
||||||
@ -1425,10 +1393,10 @@ namespace ENI2.Excel
|
|||||||
int i = 1;
|
int i = 1;
|
||||||
foreach (LastTenPortFacilitiesCalled ltpfc in sec.LastTenPortFacilitesCalled)
|
foreach (LastTenPortFacilitiesCalled ltpfc in sec.LastTenPortFacilitesCalled)
|
||||||
{
|
{
|
||||||
if (!(mdh.GetSublistElementWithIdentifier((i).ToString()) is PortOfCallLast30Days poc30d))
|
if (!(mdh.GetSublistElementWithIdentifier((i + 1).ToString()) is PortOfCallLast30Days poc30d))
|
||||||
{
|
{
|
||||||
poc30d = new PortOfCallLast30Days();
|
poc30d = new PortOfCallLast30Days();
|
||||||
poc30d.Identifier = (i).ToString();
|
poc30d.Identifier = (i + 1).ToString();
|
||||||
poc30d.MDH = mdh;
|
poc30d.MDH = mdh;
|
||||||
mdh.PortOfCallLast30Days.Add(poc30d);
|
mdh.PortOfCallLast30Days.Add(poc30d);
|
||||||
}
|
}
|
||||||
@ -1442,15 +1410,15 @@ namespace ENI2.Excel
|
|||||||
}
|
}
|
||||||
else // "normal mode", aus den Zellen lesen
|
else // "normal mode", aus den Zellen lesen
|
||||||
{
|
{
|
||||||
|
|
||||||
string sheetTitle = "1. VOYAGE";
|
|
||||||
// 4.8.25: Changed this area to work like reading from a Dakosy Sheet (by values in rows, not cell names)
|
|
||||||
if (reader.HasWorksheetNamed(sheetTitle))
|
|
||||||
{
|
|
||||||
|
|
||||||
// POC last 30 days
|
// POC last 30 days
|
||||||
for (int i = 0; i < mdh.NumberOfExcelRows; i++)
|
for (int i = 0; i < mdh.NumberOfExcelRows; i++)
|
||||||
{
|
{
|
||||||
|
string portName = string.Format("MDH.PortOfCallLast30DaysPort_{0}", i + 1);
|
||||||
|
string portCountry = string.Format("MDH.PortOfCallLast30DaysCountry_{0}", i + 1);
|
||||||
|
string locode = string.Format("MDH.PortOfCallLast30DaysLocode_{0}", i + 1);
|
||||||
|
string crewJoined = string.Format("MDH.PortOfCallLast30DaysCrewMembersJoined_{0}", i + 1);
|
||||||
|
string crewName = string.Format("MDH.PortOfCallLast30DaysCrewJoinedShipName_{0}", i + 1);
|
||||||
|
string depDate = string.Format("MDH.PortOfCallLast30DaysDateOfDeparture_{0}", i + 1);
|
||||||
|
|
||||||
if (!(mdh.GetSublistElementWithIdentifier((i + 1).ToString()) is PortOfCallLast30Days poc30d))
|
if (!(mdh.GetSublistElementWithIdentifier((i + 1).ToString()) is PortOfCallLast30Days poc30d))
|
||||||
{
|
{
|
||||||
@ -1460,24 +1428,19 @@ namespace ENI2.Excel
|
|||||||
mdh.PortOfCallLast30Days.Add(poc30d);
|
mdh.PortOfCallLast30Days.Add(poc30d);
|
||||||
}
|
}
|
||||||
|
|
||||||
string pName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", 82 + i));
|
string pName = reader.ReadText(portName);
|
||||||
string pCountry = reader.ReadCellAsText(sheetTitle, string.Format("E{0}", 82 + i));
|
string pCountry = reader.ReadText(portCountry);
|
||||||
|
|
||||||
poc30d.PortOfCallLast30DaysDateOfDeparture = reader.ReadCellAsDateTime(sheetTitle, string.Format("G{0}", 82 + i));
|
poc30d.PortOfCallLast30DaysDateOfDeparture = reader.ReadDate(depDate);
|
||||||
poc30d.PortOfCallLast30DaysLocode = reader.ReadCellAsText(sheetTitle, string.Format("F{0}", 82 + i));
|
poc30d.PortOfCallLast30DaysLocode = reader.ReadLoCode(locode);
|
||||||
if (LocodeDB.PortNameFromLocode(poc30d.PortOfCallLast30DaysLocode).IsNullOrEmpty()) poc30d.PortOfCallLast30DaysLocode = "";
|
|
||||||
|
|
||||||
// Verbesserungsvorschlag Jul/21: CrewMembersJoined Häkchen abhängig von den Namen in der Spalte
|
// Verbesserungsvorschlag Jul/21: CrewMembersJoined Häkchen abhängig von den Namen in der Spalte
|
||||||
bool? PortOfCallLast30DaysCrewMembersJoinedFlag = reader.ReadCellAsBool(sheetTitle, string.Format("H{0}", 82 + i));
|
bool? PortOfCallLast30DaysCrewMembersJoinedFlag = reader.ReadBoolean(crewJoined);
|
||||||
|
|
||||||
string crewNameString = reader.ReadCellAsText(sheetTitle, string.Format("I{0}", 82 + i));
|
string crewNameString = reader.ReadText(crewName);
|
||||||
poc30d.PortOfCallLast30DaysCrewMembersJoined = !crewNameString.IsNullOrEmpty() && (crewNameString.Length > 1);
|
poc30d.PortOfCallLast30DaysCrewMembersJoined = !crewNameString.IsNullOrEmpty();
|
||||||
|
|
||||||
// if crew members joined is set explicitly to true and the name is empty, still set the field to true
|
if (poc30d.PortOfCallLast30DaysCrewMembersJoined ?? false)
|
||||||
if (!(poc30d.PortOfCallLast30DaysCrewMembersJoined ?? false) && (PortOfCallLast30DaysCrewMembersJoinedFlag ?? false))
|
|
||||||
poc30d.PortOfCallLast30DaysCrewMembersJoined = true;
|
|
||||||
|
|
||||||
if (!crewNameString.IsNullOrEmpty() && (poc30d.PortOfCallLast30DaysCrewMembersJoined ?? false))
|
|
||||||
{
|
{
|
||||||
// try different separators
|
// try different separators
|
||||||
string[] crew = crewNameString.Split(';');
|
string[] crew = crewNameString.Split(';');
|
||||||
@ -1499,11 +1462,10 @@ namespace ENI2.Excel
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Leer/def. Zeilen entfernen
|
// Leer/def. Zeilen entfernen
|
||||||
if (!poc30d.PortOfCallLast30DaysDateOfDeparture.HasValue && (poc30d.PortOfCallLast30DaysLocode.IsNullOrEmpty()))
|
if (!poc30d.PortOfCallLast30DaysDateOfDeparture.HasValue && (poc30d.PortOfCallLast30DaysLocode == null))
|
||||||
mdh.PortOfCallLast30Days.Remove(poc30d);
|
mdh.PortOfCallLast30Days.Remove(poc30d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#endregion PoC last 30 days
|
#endregion PoC last 30 days
|
||||||
|
|
||||||
@ -1614,9 +1576,6 @@ namespace ENI2.Excel
|
|||||||
}
|
}
|
||||||
|
|
||||||
SEC sec = secMessage.Elements[0] as SEC;
|
SEC sec = secMessage.Elements[0] as SEC;
|
||||||
|
|
||||||
((ISublistContainer)sec).DeleteElements();
|
|
||||||
|
|
||||||
ScanMessage(sec, reader);
|
ScanMessage(sec, reader);
|
||||||
|
|
||||||
reader.ReadBoolean("SEC.AreMatterToReport"); // das berücksichtigen wir derzeit nicht in der DB (implizit)
|
reader.ReadBoolean("SEC.AreMatterToReport"); // das berücksichtigen wir derzeit nicht in der DB (implizit)
|
||||||
@ -1667,32 +1626,33 @@ namespace ENI2.Excel
|
|||||||
if (!sec.KielCanalPassagePlannedIncomming.HasValue && !sec.KielCanalPassagePlannedOutgoing.HasValue)
|
if (!sec.KielCanalPassagePlannedIncomming.HasValue && !sec.KielCanalPassagePlannedOutgoing.HasValue)
|
||||||
sec.KielCanalPassagePlanned = false;
|
sec.KielCanalPassagePlanned = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
string sheetTitle = "1. VOYAGE";
|
|
||||||
// 4.8.25: Changed this area to work like reading from a Dakosy Sheet (by values in rows, not cell names)
|
|
||||||
if (reader.HasWorksheetNamed(sheetTitle))
|
|
||||||
{
|
|
||||||
// Last10PortFacilitesCalled
|
// Last10PortFacilitesCalled
|
||||||
for (int i = 0; i < 10; i++)
|
for (int i = 1; i <= 10; i++)
|
||||||
{
|
{
|
||||||
|
string portName = string.Format("SEC.PortFacilityPortName_{0}", i);
|
||||||
|
string portCountry = string.Format("SEC.PortFacilityPortCountry_{0}", i);
|
||||||
|
string portLocode = string.Format("SEC.PortFacilityPortLoCode_{0}", i);
|
||||||
|
string portDateOfArrival = string.Format("SEC.PortFacilityDateOfArrival_{0}", i);
|
||||||
|
string portDateOfDeparture = string.Format("SEC.PortFacilityDateOfDeparture_{0}", i);
|
||||||
|
string portShipSecLevel = string.Format("SEC.PortFacilityShipSecurityLevel_{0}", i);
|
||||||
|
string portGISISCode = string.Format("SEC.PortFacilityGISISCode_{0}", i);
|
||||||
|
string portSecMatters = string.Format("SEC.PortFacilitySecurityMattersToReport_{0}", i);
|
||||||
|
|
||||||
if (!(sec.GetPortFacilityWithIdentifier((i + 1).ToString()) is LastTenPortFacilitiesCalled l10fc))
|
if (!(sec.GetPortFacilityWithIdentifier(i.ToString()) is LastTenPortFacilitiesCalled l10fc))
|
||||||
{
|
{
|
||||||
l10fc = new LastTenPortFacilitiesCalled();
|
l10fc = new LastTenPortFacilitiesCalled();
|
||||||
l10fc.Identifier = (i + 1).ToString();
|
l10fc.Identifier = i.ToString();
|
||||||
l10fc.SEC = sec;
|
l10fc.SEC = sec;
|
||||||
sec.LastTenPortFacilitesCalled.Add(l10fc);
|
sec.LastTenPortFacilitesCalled.Add(l10fc);
|
||||||
}
|
}
|
||||||
|
|
||||||
l10fc.PortFacilityPortName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", 54 + i), 99);
|
l10fc.PortFacilityPortName = reader.ReadText(portName);
|
||||||
l10fc.PortFacilityPortCountry = reader.ReadCellAsText(sheetTitle, string.Format("E{0}", 54 + i), 99);
|
l10fc.PortFacilityPortCountry = reader.ReadText(portCountry);
|
||||||
l10fc.PortFacilityPortLoCode = reader.ReadCellAsText(sheetTitle, string.Format("F{0}", 54 + i), 5);
|
l10fc.PortFacilityPortLoCode = reader.ReadLoCode(portLocode);
|
||||||
if (LocodeDB.PortNameFromLocode(l10fc.PortFacilityPortLoCode).IsNullOrEmpty()) l10fc.PortFacilityPortLoCode = "";
|
l10fc.PortFacilityDateOfArrival = reader.ReadDate(portDateOfArrival);
|
||||||
l10fc.PortFacilityDateOfArrival = reader.ReadCellAsDateTime(sheetTitle, string.Format("G{0}", 54 + i));
|
l10fc.PortFacilityDateOfDeparture = reader.ReadDate(portDateOfDeparture);
|
||||||
l10fc.PortFacilityDateOfDeparture = reader.ReadCellAsDateTime(sheetTitle, string.Format("H{0}", 54 + i));
|
|
||||||
|
|
||||||
string sLevel = reader.ReadCellAsText(sheetTitle, string.Format("I{0}", 54 + i));
|
string sLevel = reader.ReadText(portShipSecLevel);
|
||||||
if (!sLevel.IsNullOrEmpty())
|
if (!sLevel.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
if (sLevel.Contains('1')) l10fc.PortFacilityShipSecurityLevel = 1;
|
if (sLevel.Contains('1')) l10fc.PortFacilityShipSecurityLevel = 1;
|
||||||
@ -1700,11 +1660,16 @@ namespace ENI2.Excel
|
|||||||
if (sLevel.Contains('3')) l10fc.PortFacilityShipSecurityLevel = 3;
|
if (sLevel.Contains('3')) l10fc.PortFacilityShipSecurityLevel = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
string s = reader.ReadCellAsText(sheetTitle, string.Format("J{0}", 54 + i));
|
l10fc.PortFacilityGISISCode = reader.ReadTextNoWhitespace(portGISISCode);
|
||||||
// All invalid codes become "0000", Oct/25
|
|
||||||
l10fc.PortFacilityGISISCode = (s != null) && Regex.IsMatch(s.Trim(), @"^\d{4}$") ? s.Trim() : "0000";
|
|
||||||
|
|
||||||
l10fc.PortFacilitySecurityMattersToReport = reader.ReadCellAsText(sheetTitle, string.Format("K{0}", 54 + i), 255);
|
if (l10fc.PortFacilityGISISCode.IsNullOrEmpty() || l10fc.PortFacilityGISISCode == "0")
|
||||||
|
l10fc.PortFacilityGISISCode = "0000";
|
||||||
|
if (l10fc.PortFacilityGISISCode?.Length < 4)
|
||||||
|
{
|
||||||
|
while (l10fc.PortFacilityGISISCode.Length < 4) l10fc.PortFacilityGISISCode = "0" + l10fc.PortFacilityGISISCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
l10fc.PortFacilitySecurityMattersToReport = reader.ReadText(portSecMatters);
|
||||||
|
|
||||||
// keinen "leeren" Hafen anlegen, wenn der Eintrag leer war (trifft anscheinend bei Neubauten zu, siehe E-Mail Christin vom 20./22.6.17
|
// keinen "leeren" Hafen anlegen, wenn der Eintrag leer war (trifft anscheinend bei Neubauten zu, siehe E-Mail Christin vom 20./22.6.17
|
||||||
if (l10fc.PortFacilityPortName.IsNullOrEmpty() && l10fc.PortFacilityPortLoCode.IsNullOrEmpty() && l10fc.PortFacilityPortCountry.IsNullOrEmpty())
|
if (l10fc.PortFacilityPortName.IsNullOrEmpty() && l10fc.PortFacilityPortLoCode.IsNullOrEmpty() && l10fc.PortFacilityPortCountry.IsNullOrEmpty())
|
||||||
@ -1712,39 +1677,46 @@ namespace ENI2.Excel
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Ship2ShipActivities
|
// Ship2ShipActivities
|
||||||
for (int i = 0; i < 10; i++)
|
for (int i = 1; i <= 10; i++)
|
||||||
{
|
{
|
||||||
|
string s2sName = string.Format("SEC.ShipToShipActivityLocationName_{0}", i);
|
||||||
|
string s2sLocode = string.Format("SEC.ShipToShipActivityLocationLoCode_{0}", i);
|
||||||
|
string s2sLatitude = string.Format("SEC.ShipToShipActivityLocationCoordinatesLatitude_{0}", i);
|
||||||
|
string s2sLongitude = string.Format("SEC.ShipToShipActivityLocationCoordinatesLongitude_{0}", i);
|
||||||
|
string s2sFromDate = string.Format("SEC.ShipToShipActivityDateFrom_{0}", i);
|
||||||
|
string s2sToDate = string.Format("SEC.ShipToShipActivityDateTo_{0}", i);
|
||||||
|
string s2sSec = string.Format("SEC.ShipToShipActivitySecurityMattersToReport_{0}", i);
|
||||||
|
string s2sActivityString = string.Format("SEC.ShipToShipActivityType_{0}", i);
|
||||||
|
|
||||||
if (!(sec.GetShipToShipWithIdentifier((i + 1).ToString()) is ShipToShipActivitiesDuringLastTenPortFacilitiesCalled s2sActivity))
|
|
||||||
|
if (!(sec.GetShipToShipWithIdentifier(i.ToString()) is ShipToShipActivitiesDuringLastTenPortFacilitiesCalled s2sActivity))
|
||||||
{
|
{
|
||||||
s2sActivity = new ShipToShipActivitiesDuringLastTenPortFacilitiesCalled();
|
s2sActivity = new ShipToShipActivitiesDuringLastTenPortFacilitiesCalled();
|
||||||
s2sActivity.Identifier = (i + 1).ToString();
|
s2sActivity.Identifier = i.ToString();
|
||||||
s2sActivity.SEC = sec;
|
s2sActivity.SEC = sec;
|
||||||
sec.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled.Add(s2sActivity);
|
sec.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled.Add(s2sActivity);
|
||||||
}
|
}
|
||||||
|
|
||||||
s2sActivity.ShipToShipActivityLocationName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", 68 + i), 255);
|
s2sActivity.ShipToShipActivityLocationName = reader.ReadText(s2sName);
|
||||||
if (s2sActivity.ShipToShipActivityLocationName.IsNullOrEmpty())
|
if (s2sActivity.ShipToShipActivityLocationName.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
sec.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled.Remove(s2sActivity);
|
sec.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled.Remove(s2sActivity);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
s2sActivity.ShipToShipActivityLocationLoCode = reader.ReadCellAsText(sheetTitle, string.Format("E{0}", 68 + i), 5);
|
s2sActivity.ShipToShipActivityLocationLoCode = reader.ReadLoCode(s2sLocode);
|
||||||
if (LocodeDB.PortNameFromLocode(s2sActivity.ShipToShipActivityLocationLoCode).IsNullOrEmpty()) s2sActivity.ShipToShipActivityLocationLoCode = "";
|
s2sActivity.ShipToShipActivityLocationCoordinatesLatitude = (int?)reader.ReadNumber(s2sLatitude);
|
||||||
|
|
||||||
s2sActivity.ShipToShipActivityLocationCoordinatesLatitude = (int?) reader.ReadCellAsDecimal(sheetTitle, string.Format("F{0}", 68 + i));
|
|
||||||
// keine "0" (d.h. fehlerhafte Koordinaten) ins ANSW übergeben falls im Sheet nichts ist aber der Reader das aus irgendeinem Grund liest
|
// keine "0" (d.h. fehlerhafte Koordinaten) ins ANSW übergeben falls im Sheet nichts ist aber der Reader das aus irgendeinem Grund liest
|
||||||
if (s2sActivity.ShipToShipActivityLocationCoordinatesLatitude == 0)
|
if (s2sActivity.ShipToShipActivityLocationCoordinatesLatitude == 0)
|
||||||
s2sActivity.ShipToShipActivityLocationCoordinatesLatitude = null;
|
s2sActivity.ShipToShipActivityLocationCoordinatesLatitude = null;
|
||||||
s2sActivity.ShipToShipActivityLocationCoordinatesLongitude = (int?)reader.ReadCellAsDecimal(sheetTitle, string.Format("G{0}", 68 + i));
|
s2sActivity.ShipToShipActivityLocationCoordinatesLongitude = (int?)reader.ReadNumber(s2sLongitude);
|
||||||
if (s2sActivity.ShipToShipActivityLocationCoordinatesLongitude == 0)
|
if (s2sActivity.ShipToShipActivityLocationCoordinatesLongitude == 0)
|
||||||
s2sActivity.ShipToShipActivityLocationCoordinatesLongitude = null;
|
s2sActivity.ShipToShipActivityLocationCoordinatesLongitude = null;
|
||||||
s2sActivity.ShipToShipActivityDateFrom = reader.ReadCellAsDateTime(sheetTitle, string.Format("H{0}", 68 + i));
|
s2sActivity.ShipToShipActivityDateFrom = reader.ReadDate(s2sFromDate);
|
||||||
s2sActivity.ShipToShipActivityDateTo = reader.ReadCellAsDateTime(sheetTitle, string.Format("I{0}", 68 + i));
|
s2sActivity.ShipToShipActivityDateTo = reader.ReadDate(s2sToDate);
|
||||||
s2sActivity.ShipToShipActivityTypeCode = (int?)reader.ReadCellAsDecimal(sheetTitle, string.Format("J{0}", 68 + i));
|
s2sActivity.ShipToShipActivityTypeCode = (int?)reader.ReadNumber(s2sActivityString);
|
||||||
s2sActivity.ShipToShipActivitySecurityMattersToReport = reader.ReadCellAsText(sheetTitle, string.Format("K{0}", 68 + i), 255);
|
reader.ReadShip2ShipActivityType(s2sActivityString); // 24.8.21 nicht Code dem Klartext zuordnen, nur das Feld kolorieren
|
||||||
}
|
s2sActivity.ShipToShipActivitySecurityMattersToReport = reader.ReadText(s2sSec);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -1897,6 +1869,8 @@ namespace ENI2.Excel
|
|||||||
string tLen = string.Format("TOWD.TowageOnDepartureLengthOverall_MTR_{0}", i);
|
string tLen = string.Format("TOWD.TowageOnDepartureLengthOverall_MTR_{0}", i);
|
||||||
string tBeam = string.Format("TOWD.TowageOnDepartureBeam_MTR_{0}", i);
|
string tBeam = string.Format("TOWD.TowageOnDepartureBeam_MTR_{0}", i);
|
||||||
string tOp = string.Format("TOWD.TowageOnDepartureOperatorCompanyName_{0}", i);
|
string tOp = string.Format("TOWD.TowageOnDepartureOperatorCompanyName_{0}", i);
|
||||||
|
string tPoc = string.Format("TOWD.TowageOnArrivalPurposeOfCall_{0}", i);
|
||||||
|
string tgt = string.Format("TOWD.TowageOnArrivalGrossTonnage_{0}", i);
|
||||||
|
|
||||||
string towageName = reader.ReadText(tName);
|
string towageName = reader.ReadText(tName);
|
||||||
if (towageName.IsNullOrEmpty()) continue;
|
if (towageName.IsNullOrEmpty()) continue;
|
||||||
@ -2092,7 +2066,7 @@ namespace ENI2.Excel
|
|||||||
|
|
||||||
#endregion LADG
|
#endregion LADG
|
||||||
|
|
||||||
#region CREWA
|
#region CREW
|
||||||
|
|
||||||
private static bool ScanCREW(Message crewMessage, ExcelReader reader, bool isOldVersion)
|
private static bool ScanCREW(Message crewMessage, ExcelReader reader, bool isOldVersion)
|
||||||
{
|
{
|
||||||
@ -2102,13 +2076,13 @@ namespace ENI2.Excel
|
|||||||
// 5.9.22: Changed this area to work like reading from a Dakosy Sheet (by values in rows, not cell names)
|
// 5.9.22: Changed this area to work like reading from a Dakosy Sheet (by values in rows, not cell names)
|
||||||
if (reader.HasWorksheetNamed(sheetTitle))
|
if (reader.HasWorksheetNamed(sheetTitle))
|
||||||
{
|
{
|
||||||
// bool? notificationSchengen = reader.ReadBoolean("CREW.NotificationSchengen");
|
bool? notificationSchengen = reader.ReadBoolean("CREW.NotificationSchengen");
|
||||||
bool? notificationPax = reader.ReadBoolean("CREW.NotificationPAX");
|
bool? notificationPax = reader.ReadBoolean("CREW.NotificationPAX");
|
||||||
|
|
||||||
for (int i = 0; i < 5000; i++)
|
for (int i = 0; i < 5000; i++)
|
||||||
{
|
{
|
||||||
string lastName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", i + 18), 100);
|
string lastName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", i + 18));
|
||||||
string firstName = reader.ReadCellAsText(sheetTitle, string.Format("D{0}", i + 18), 100);
|
string firstName = reader.ReadCellAsText(sheetTitle, string.Format("D{0}", i + 18));
|
||||||
if (lastName.IsNullOrEmpty() && firstName.IsNullOrEmpty()) break;
|
if (lastName.IsNullOrEmpty() && firstName.IsNullOrEmpty()) break;
|
||||||
|
|
||||||
if (!(crewMessage.GetSublistElementWithIdentifier((i + 1).ToString()) is CREW crew))
|
if (!(crewMessage.GetSublistElementWithIdentifier((i + 1).ToString()) is CREW crew))
|
||||||
@ -2119,37 +2093,40 @@ namespace ENI2.Excel
|
|||||||
crewMessage.Elements.Add(crew);
|
crewMessage.Elements.Add(crew);
|
||||||
}
|
}
|
||||||
|
|
||||||
crew.NotificationSchengen = true;
|
crew.NotificationSchengen = notificationSchengen;
|
||||||
crew.NotificationPAX = notificationPax ?? false;
|
crew.NotificationPAX = notificationPax;
|
||||||
crew.CrewMemberLastName = lastName;
|
crew.CrewMemberLastName = lastName;
|
||||||
crew.CrewMemberFirstName = firstName;
|
crew.CrewMemberFirstName = firstName;
|
||||||
|
|
||||||
crew.CrewMemberGender = ReadGender(reader.ReadCellAsText(sheetTitle, string.Format("E{0}", i + 18)), out bool canceled);
|
crew.CrewMemberGender = ReadGender(reader.ReadCellAsText(sheetTitle, string.Format("E{0}", i + 18)), out bool canceled);
|
||||||
if (canceled) return true;
|
if (canceled) return true;
|
||||||
|
|
||||||
crew.CrewMemberDuty = reader.ReadCellAsText(sheetTitle, string.Format("F{0}", i + 18), 100);
|
crew.CrewMemberDuty = reader.ReadCellAsText(sheetTitle, string.Format("F{0}", i + 18));
|
||||||
if (crew.CrewMemberDuty.IsNullOrEmpty()) crew.CrewMemberDuty = "unknown";
|
|
||||||
crew.CrewMemberNationality = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("G{0}", i + 18)), out canceled);
|
crew.CrewMemberNationality = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("G{0}", i + 18)), out canceled);
|
||||||
if (canceled) return true;
|
if (canceled) return true;
|
||||||
crew.CrewMemberPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("H{0}", i + 18), 100);
|
crew.CrewMemberPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("H{0}", i + 18));
|
||||||
crew.CrewMemberCountryOfBirth = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("I{0}", i + 18)), out _, false);
|
crew.CrewMemberCountryOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("G{0}", i + 18));
|
||||||
|
if ((crew.CrewMemberCountryOfBirth != null) && (crew.CrewMemberCountryOfBirth.Length > 2)) crew.CrewMemberCountryOfBirth = null;
|
||||||
|
|
||||||
crew.CrewMemberDateOfBirth = reader.ReadCellAsDateTime(sheetTitle, string.Format("J{0}", i + 18));
|
crew.CrewMemberDateOfBirth = reader.ReadCellAsDateTime(sheetTitle, string.Format("J{0}", i + 18));
|
||||||
|
|
||||||
crew.CrewMemberIdentityDocumentType = ReadDocumentType(reader.ReadCellAsText(sheetTitle, string.Format("K{0}", i + 18)), out canceled);
|
crew.CrewMemberIdentityDocumentType = ReadDocumentType(reader.ReadCellAsText(sheetTitle, string.Format("K{0}", i + 18)), out canceled);
|
||||||
if (canceled) return true;
|
if (canceled) return true;
|
||||||
|
|
||||||
crew.CrewMemberIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("L{0}", i + 18), 100);
|
crew.CrewMemberIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("L{0}", i + 18));
|
||||||
crew.CrewMemberVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("O{0}", i + 18), 100);
|
crew.CrewMemberVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("O{0}", i + 18));
|
||||||
crew.CrewMemberIdentityDocumentIssuingState = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("M{0}", i + 18)), out canceled);
|
crew.CrewMemberIdentityDocumentIssuingState = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("M{0}", i + 18)), out canceled);
|
||||||
if (canceled) return true;
|
if (canceled) return true;
|
||||||
if (crew.CrewMemberIdentityDocumentIssuingState.IsNullOrEmpty() && isOldVersion)
|
if (crew.CrewMemberIdentityDocumentIssuingState.IsNullOrEmpty() && isOldVersion)
|
||||||
crew.CrewMemberIdentityDocumentIssuingState = "XX";
|
crew.CrewMemberIdentityDocumentIssuingState = "XX";
|
||||||
crew.CrewMemberIdentityDocumentExpiryDate = reader.ReadCellAsDateTime(sheetTitle, string.Format("N{0}", i + 18)) ?? (DateTime?)new DateTime(2100, 12, 31);
|
crew.CrewMemberIdentityDocumentExpiryDate = reader.ReadCellAsDateTime(sheetTitle, string.Format("N{0}", i + 18));
|
||||||
if (!crew.CrewMemberIdentityDocumentExpiryDate.HasValue && isOldVersion)
|
if (!crew.CrewMemberIdentityDocumentExpiryDate.HasValue && isOldVersion)
|
||||||
crew.CrewMemberIdentityDocumentExpiryDate = new DateTime(2100, 12, 31);
|
crew.CrewMemberIdentityDocumentExpiryDate = new DateTime(2100, 12, 31);
|
||||||
|
|
||||||
crew.Effects = reader.ReadCellAsText("2. PORT", string.Format("C{0}", i + 142), 256);
|
crew.Effects = reader.ReadCellAsText("2. PORT", string.Format("C{0}", i + 142));
|
||||||
|
if (crew.Effects.Length > 256)
|
||||||
|
crew.Effects = crew.Effects.Substring(0, 256);
|
||||||
|
|
||||||
|
|
||||||
Util.UIHelper.SetBusyState(); // dialog might reset busy state
|
Util.UIHelper.SetBusyState(); // dialog might reset busy state
|
||||||
}
|
}
|
||||||
@ -2173,9 +2150,6 @@ namespace ENI2.Excel
|
|||||||
crewMessage.Elements.Add(crew);
|
crewMessage.Elements.Add(crew);
|
||||||
}
|
}
|
||||||
|
|
||||||
crew.NotificationSchengen = true;
|
|
||||||
crew.NotificationPAX = false;
|
|
||||||
|
|
||||||
crew.CrewMemberLastName = lastName;
|
crew.CrewMemberLastName = lastName;
|
||||||
crew.CrewMemberFirstName = firstName;
|
crew.CrewMemberFirstName = firstName;
|
||||||
|
|
||||||
@ -2183,7 +2157,6 @@ namespace ENI2.Excel
|
|||||||
if (canceled) return true;
|
if (canceled) return true;
|
||||||
|
|
||||||
crew.CrewMemberDuty = reader.ReadCellAsText(sheetTitle, string.Format("G{0}", i + 13));
|
crew.CrewMemberDuty = reader.ReadCellAsText(sheetTitle, string.Format("G{0}", i + 13));
|
||||||
if (crew.CrewMemberDuty.IsNullOrEmpty()) crew.CrewMemberDuty = "unknown";
|
|
||||||
crew.CrewMemberNationality = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("F{0}", i + 13)), out canceled);
|
crew.CrewMemberNationality = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("F{0}", i + 13)), out canceled);
|
||||||
if (canceled) return true;
|
if (canceled) return true;
|
||||||
crew.CrewMemberPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("H{0}", i + 13));
|
crew.CrewMemberPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("H{0}", i + 13));
|
||||||
@ -2209,10 +2182,6 @@ namespace ENI2.Excel
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region CREWD
|
|
||||||
|
|
||||||
private static bool ScanCREWD(Message crewdMessage, ExcelReader reader)
|
private static bool ScanCREWD(Message crewdMessage, ExcelReader reader)
|
||||||
{
|
{
|
||||||
crewdMessage.DeleteElements();
|
crewdMessage.DeleteElements();
|
||||||
@ -2220,52 +2189,51 @@ namespace ENI2.Excel
|
|||||||
// CREW DEPARTURE
|
// CREW DEPARTURE
|
||||||
if (reader.HasWorksheetNamed(sheetTitle))
|
if (reader.HasWorksheetNamed(sheetTitle))
|
||||||
{
|
{
|
||||||
// bool? notificationSchengen = reader.ReadBoolean("CREWD.NotificationSchengen");
|
bool? notificationSchengen = reader.ReadBoolean("CREWD.NotificationSchengen");
|
||||||
bool? notificationPax = reader.ReadBoolean("CREWD.NotificationPAX");
|
bool? notificationPax = reader.ReadBoolean("CREWD.NotificationPAX");
|
||||||
|
|
||||||
for (int i = 0; i < 5000; i++)
|
for (int i = 0; i < 5000; i++)
|
||||||
{
|
{
|
||||||
string lastName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", i + 18), 100);
|
string lastName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", i + 18));
|
||||||
string firstName = reader.ReadCellAsText(sheetTitle, string.Format("D{0}", i + 18), 100);
|
if (lastName.IsNullOrEmpty()) break;
|
||||||
if (lastName.IsNullOrEmpty() && firstName.IsNullOrEmpty()) break;
|
|
||||||
|
|
||||||
if (!(crewdMessage.GetSublistElementWithIdentifier((i + 1).ToString()) is CREWD crewd))
|
if (!(crewdMessage.GetSublistElementWithIdentifier((i + 1).ToString()) is CREWD crewd))
|
||||||
{
|
{
|
||||||
crewd = new CREWD();
|
crewd = new CREWD();
|
||||||
crewd.Identifier = (i + 1).ToString();
|
crewd.Identifier = (i + 1).ToString();
|
||||||
crewd.MessageHeader = crewdMessage;
|
crewd.MessageHeader = crewdMessage;
|
||||||
crewd.IsDeparture = true;
|
|
||||||
crewdMessage.Elements.Add(crewd);
|
crewdMessage.Elements.Add(crewd);
|
||||||
}
|
}
|
||||||
|
|
||||||
crewd.NotificationSchengen = true;
|
crewd.NotificationSchengen = notificationSchengen;
|
||||||
crewd.NotificationPAX = notificationPax ?? false;
|
crewd.NotificationPAX = notificationPax;
|
||||||
crewd.CrewMemberLastName = lastName;
|
crewd.CrewMemberLastName = lastName;
|
||||||
crewd.CrewMemberFirstName = firstName;
|
crewd.CrewMemberFirstName = reader.ReadCellAsText(sheetTitle, string.Format("D{0}", i + 18));
|
||||||
|
|
||||||
crewd.CrewMemberGender = ReadGender(reader.ReadCellAsText(sheetTitle, string.Format("E{0}", i + 18)), out bool canceled);
|
crewd.CrewMemberGender = ReadGender(reader.ReadCellAsText(sheetTitle, string.Format("E{0}", i + 18)), out bool canceled);
|
||||||
if (canceled) return true;
|
if (canceled) return true;
|
||||||
|
|
||||||
crewd.CrewMemberDuty = reader.ReadCellAsText(sheetTitle, string.Format("F{0}", i + 18), 100);
|
crewd.CrewMemberDuty = reader.ReadCellAsText(sheetTitle, string.Format("F{0}", i + 18));
|
||||||
if (crewd.CrewMemberDuty.IsNullOrEmpty()) crewd.CrewMemberDuty = "unknown";
|
|
||||||
crewd.CrewMemberNationality = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("G{0}", i + 18)), out canceled);
|
crewd.CrewMemberNationality = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("G{0}", i + 18)), out canceled);
|
||||||
if (canceled) return true;
|
if (canceled) return true;
|
||||||
crewd.CrewMemberPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("H{0}", i + 18), 100);
|
crewd.CrewMemberPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("H{0}", i + 18));
|
||||||
crewd.CrewMemberCountryOfBirth = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("I{0}", i + 18)), out _, false);
|
crewd.CrewMemberCountryOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("G{0}", i + 18));
|
||||||
|
if ((crewd.CrewMemberCountryOfBirth != null) && (crewd.CrewMemberCountryOfBirth.Length > 2)) crewd.CrewMemberCountryOfBirth = null;
|
||||||
crewd.CrewMemberDateOfBirth = reader.ReadCellAsDateTime(sheetTitle, string.Format("J{0}", i + 18));
|
crewd.CrewMemberDateOfBirth = reader.ReadCellAsDateTime(sheetTitle, string.Format("J{0}", i + 18));
|
||||||
|
|
||||||
|
|
||||||
crewd.CrewMemberIdentityDocumentType = ReadDocumentType(reader.ReadCellAsText(sheetTitle, string.Format("K{0}", i + 18)), out canceled);
|
crewd.CrewMemberIdentityDocumentType = ReadDocumentType(reader.ReadCellAsText(sheetTitle, string.Format("K{0}", i + 18)), out canceled);
|
||||||
if (canceled) return true;
|
if (canceled) return true;
|
||||||
|
|
||||||
crewd.CrewMemberIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("L{0}", i + 18), 100);
|
crewd.CrewMemberIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("L{0}", i + 18));
|
||||||
crewd.CrewMemberVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("O{0}", i + 18), 100);
|
crewd.CrewMemberVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("O{0}", i + 18));
|
||||||
crewd.CrewMemberIdentityDocumentIssuingState = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("M{0}", i + 18)), out canceled);
|
crewd.CrewMemberIdentityDocumentIssuingState = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("M{0}", i + 18)), out canceled);
|
||||||
if (canceled) return true;
|
if (canceled) return true;
|
||||||
if (crewd.CrewMemberIdentityDocumentIssuingState.IsNullOrEmpty())
|
if (crewd.CrewMemberIdentityDocumentIssuingState.IsNullOrEmpty())
|
||||||
crewd.CrewMemberIdentityDocumentIssuingState = "XX";
|
crewd.CrewMemberIdentityDocumentIssuingState = "XX";
|
||||||
crewd.CrewMemberIdentityDocumentExpiryDate = reader.ReadCellAsDateTime(sheetTitle, string.Format("N{0}", i + 18)) ?? (DateTime?)new DateTime(2100, 12, 31);
|
crewd.CrewMemberIdentityDocumentExpiryDate = reader.ReadCellAsDateTime(sheetTitle, string.Format("N{0}", i + 18)) ?? (DateTime?)new DateTime(2100, 12, 31);
|
||||||
|
|
||||||
crewd.Effects = reader.ReadCellAsText("2. PORT", string.Format("C{0}", i + 142), 256);
|
crewd.Effects = reader.ReadCellAsText("2. PORT", string.Format("C{0}", i + 142));
|
||||||
|
|
||||||
Util.UIHelper.SetBusyState(); // dialog might reset busy state
|
Util.UIHelper.SetBusyState(); // dialog might reset busy state
|
||||||
}
|
}
|
||||||
@ -2277,7 +2245,7 @@ namespace ENI2.Excel
|
|||||||
{
|
{
|
||||||
for (int i = 0; i < 5000; i++)
|
for (int i = 0; i < 5000; i++)
|
||||||
{
|
{
|
||||||
string lastName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", i + 14));
|
string lastName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", i + 13));
|
||||||
if (lastName.IsNullOrEmpty()) break;
|
if (lastName.IsNullOrEmpty()) break;
|
||||||
|
|
||||||
if (!(crewdMessage.GetSublistElementWithIdentifier((i + 1).ToString()) is CREWD crewd))
|
if (!(crewdMessage.GetSublistElementWithIdentifier((i + 1).ToString()) is CREWD crewd))
|
||||||
@ -2285,33 +2253,28 @@ namespace ENI2.Excel
|
|||||||
crewd = new CREWD();
|
crewd = new CREWD();
|
||||||
crewd.Identifier = (i + 1).ToString();
|
crewd.Identifier = (i + 1).ToString();
|
||||||
crewd.MessageHeader = crewdMessage;
|
crewd.MessageHeader = crewdMessage;
|
||||||
crewd.IsDeparture = true;
|
|
||||||
crewdMessage.Elements.Add(crewd);
|
crewdMessage.Elements.Add(crewd);
|
||||||
}
|
}
|
||||||
|
|
||||||
crewd.NotificationSchengen = true;
|
|
||||||
crewd.NotificationPAX = false;
|
|
||||||
|
|
||||||
crewd.CrewMemberLastName = lastName;
|
crewd.CrewMemberLastName = lastName;
|
||||||
crewd.CrewMemberFirstName = reader.ReadCellAsText(sheetTitle, string.Format("D{0}", i + 14));
|
crewd.CrewMemberFirstName = reader.ReadCellAsText(sheetTitle, string.Format("D{0}", i + 13));
|
||||||
|
|
||||||
crewd.CrewMemberGender = ReadGender(reader.ReadCellAsText(sheetTitle, string.Format("E{0}", i + 14)), out bool canceled);
|
crewd.CrewMemberGender = ReadGender(reader.ReadCellAsText(sheetTitle, string.Format("E{0}", i + 13)), out bool canceled);
|
||||||
if (canceled) return true;
|
if (canceled) return true;
|
||||||
|
|
||||||
crewd.CrewMemberDuty = reader.ReadCellAsText(sheetTitle, string.Format("G{0}", i + 14));
|
crewd.CrewMemberDuty = reader.ReadCellAsText(sheetTitle, string.Format("G{0}", i + 13));
|
||||||
if (crewd.CrewMemberDuty.IsNullOrEmpty()) crewd.CrewMemberDuty = "unknown";
|
crewd.CrewMemberNationality = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("F{0}", i + 13)), out canceled);
|
||||||
crewd.CrewMemberNationality = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("F{0}", i + 14)), out canceled);
|
|
||||||
if (canceled) return true;
|
if (canceled) return true;
|
||||||
crewd.CrewMemberPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("H{0}", i + 14));
|
crewd.CrewMemberPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("H{0}", i + 13));
|
||||||
crewd.CrewMemberDateOfBirth = reader.ReadCellAsDateTime(sheetTitle, string.Format("I{0}", i + 14));
|
crewd.CrewMemberDateOfBirth = reader.ReadCellAsDateTime(sheetTitle, string.Format("I{0}", i + 13));
|
||||||
|
|
||||||
crewd.CrewMemberIdentityDocumentType = ReadDocumentType(reader.ReadCellAsText(sheetTitle, string.Format("J{0}", i + 14)), out canceled);
|
crewd.CrewMemberIdentityDocumentType = ReadDocumentType(reader.ReadCellAsText(sheetTitle, string.Format("J{0}", i + 13)), out canceled);
|
||||||
if (canceled) return true;
|
if (canceled) return true;
|
||||||
crewd.CrewMemberIdentityDocumentIssuingState = "XX";
|
crewd.CrewMemberIdentityDocumentIssuingState = "XX";
|
||||||
crewd.CrewMemberIdentityDocumentExpiryDate = new DateTime(2100, 12, 31);
|
crewd.CrewMemberIdentityDocumentExpiryDate = new DateTime(2100, 12, 31);
|
||||||
|
|
||||||
crewd.CrewMemberIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("K{0}", i + 14));
|
crewd.CrewMemberIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("K{0}", i + 13));
|
||||||
crewd.CrewMemberVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("L{0}", i + 14));
|
crewd.CrewMemberVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("L{0}", i + 13));
|
||||||
|
|
||||||
Util.UIHelper.SetBusyState(); // dialog might reset busy state
|
Util.UIHelper.SetBusyState(); // dialog might reset busy state
|
||||||
}
|
}
|
||||||
@ -2329,7 +2292,7 @@ namespace ENI2.Excel
|
|||||||
|
|
||||||
#region PAS
|
#region PAS
|
||||||
|
|
||||||
private static bool ScanPAS(Message pasMessage, ExcelReader reader, bool _)
|
private static bool ScanPAS(Message pasMessage, ExcelReader reader, bool isOldVersion)
|
||||||
{
|
{
|
||||||
List<PAS> newPasList = new List<PAS>();
|
List<PAS> newPasList = new List<PAS>();
|
||||||
|
|
||||||
@ -2337,13 +2300,13 @@ namespace ENI2.Excel
|
|||||||
|
|
||||||
if (reader.HasWorksheetNamed(sheetTitle))
|
if (reader.HasWorksheetNamed(sheetTitle))
|
||||||
{
|
{
|
||||||
// bool? notificationSchengen = reader.ReadBoolean("PAS.NotificationSchengen");
|
bool? notificationSchengen = reader.ReadBoolean("PAS.NotificationSchengen");
|
||||||
bool? notificationPax = reader.ReadBoolean("PAS.NotificationPAX");
|
bool? notificationPax = reader.ReadBoolean("PAS.NotificationPAX");
|
||||||
|
|
||||||
for (int i = 0; i < 5000; i++)
|
for (int i = 0; i < 5000; i++)
|
||||||
{
|
{
|
||||||
string lastName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", i + 17), 100);
|
string lastName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", i + 17));
|
||||||
string firstName = reader.ReadCellAsText(sheetTitle, string.Format("D{0}", i + 17), 100);
|
string firstName = reader.ReadCellAsText(sheetTitle, string.Format("D{0}", i + 17));
|
||||||
if (lastName.IsNullOrEmpty() && firstName.IsNullOrEmpty()) break; // finish after reading last row
|
if (lastName.IsNullOrEmpty() && firstName.IsNullOrEmpty()) break; // finish after reading last row
|
||||||
|
|
||||||
PAS pas = new PAS();
|
PAS pas = new PAS();
|
||||||
@ -2351,8 +2314,8 @@ namespace ENI2.Excel
|
|||||||
pas.MessageHeader = pasMessage;
|
pas.MessageHeader = pasMessage;
|
||||||
newPasList.Add(pas);
|
newPasList.Add(pas);
|
||||||
|
|
||||||
pas.NotificationSchengen = true;
|
pas.NotificationSchengen = notificationSchengen;
|
||||||
pas.NotificationPAX = notificationPax ?? false;
|
pas.NotificationPAX = notificationPax;
|
||||||
pas.PassengerLastName = lastName;
|
pas.PassengerLastName = lastName;
|
||||||
pas.PassengerFirstName = firstName;
|
pas.PassengerFirstName = firstName;
|
||||||
|
|
||||||
@ -2372,8 +2335,9 @@ namespace ENI2.Excel
|
|||||||
|
|
||||||
pas.PassengerInTransit = reader.ReadCellAsBool(sheetTitle, string.Format("H{0}", i + 17));
|
pas.PassengerInTransit = reader.ReadCellAsBool(sheetTitle, string.Format("H{0}", i + 17));
|
||||||
|
|
||||||
pas.PassengerPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("J{0}", i + 17), 100);
|
pas.PassengerPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("J{0}", i + 17));
|
||||||
pas.PassengerCountryOfBirth = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("K{0}", i + 17)), out _, false);
|
pas.PassengerCountryOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("K{0}", i + 17));
|
||||||
|
if ((pas.PassengerCountryOfBirth != null) && (pas.PassengerCountryOfBirth.Length > 2)) pas.PassengerCountryOfBirth = null;
|
||||||
|
|
||||||
if (canceled) return true;
|
if (canceled) return true;
|
||||||
DateTime? dateOfBirth = reader.ReadCellAsDateTime(sheetTitle, string.Format("L{0}", i + 17));
|
DateTime? dateOfBirth = reader.ReadCellAsDateTime(sheetTitle, string.Format("L{0}", i + 17));
|
||||||
@ -2381,25 +2345,16 @@ namespace ENI2.Excel
|
|||||||
|
|
||||||
pas.PassengerIdentityDocumentType = ReadDocumentType(reader.ReadCellAsText(sheetTitle, string.Format("M{0}", i + 17)), out canceled);
|
pas.PassengerIdentityDocumentType = ReadDocumentType(reader.ReadCellAsText(sheetTitle, string.Format("M{0}", i + 17)), out canceled);
|
||||||
if (canceled) return true;
|
if (canceled) return true;
|
||||||
pas.PassengerIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("N{0}", i + 17), 100);
|
pas.PassengerIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("N{0}", i + 17));
|
||||||
|
|
||||||
pas.PassengerIdentityDocumentExpiryDate = reader.ReadCellAsDateTime(sheetTitle, string.Format("P{0}", i + 17)) ?? (DateTime?)new DateTime(2100, 12, 31);
|
pas.PassengerIdentityDocumentExpiryDate = reader.ReadCellAsDateTime(sheetTitle, string.Format("P{0}", i + 17)) ?? (DateTime?)new DateTime(2100, 12, 31);
|
||||||
|
|
||||||
pas.PassengerVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("Q{0}", i + 17), 100);
|
pas.PassengerVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("Q{0}", i + 17));
|
||||||
pas.EmergencyCare = reader.ReadCellAsText(sheetTitle, string.Format("R{0}", i + 17), 255);
|
pas.EmergencyCare = reader.ReadCellAsText(sheetTitle, string.Format("R{0}", i + 17));
|
||||||
pas.EmergencyContactNumber = reader.ReadCellAsText(sheetTitle, string.Format("S{0}", i + 17), 99);
|
pas.EmergencyContactNumber = reader.ReadCellAsText(sheetTitle, string.Format("S{0}", i + 17));
|
||||||
|
|
||||||
// pas.NotificationSchengen = pas.HasSchengenDetails;
|
|
||||||
|
|
||||||
Util.UIHelper.SetBusyState(); // dialog might reset busy state
|
Util.UIHelper.SetBusyState(); // dialog might reset busy state
|
||||||
}
|
}
|
||||||
|
|
||||||
bool mustPAX = newPasList.Count >= 12;
|
|
||||||
if (mustPAX)
|
|
||||||
{
|
|
||||||
foreach (PAS pasa in newPasList.Cast<PAS>())
|
|
||||||
pasa.NotificationPAX = mustPAX;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2417,9 +2372,6 @@ namespace ENI2.Excel
|
|||||||
pas.MessageHeader = pasMessage;
|
pas.MessageHeader = pasMessage;
|
||||||
newPasList.Add(pas);
|
newPasList.Add(pas);
|
||||||
|
|
||||||
pas.NotificationSchengen = true;
|
|
||||||
pas.NotificationPAX = false;
|
|
||||||
|
|
||||||
pas.PassengerLastName = lastName;
|
pas.PassengerLastName = lastName;
|
||||||
pas.PassengerFirstName = firstName;
|
pas.PassengerFirstName = firstName;
|
||||||
|
|
||||||
@ -2471,139 +2423,66 @@ namespace ENI2.Excel
|
|||||||
|
|
||||||
private static bool ScanPASD(Message pasMessage, ExcelReader reader)
|
private static bool ScanPASD(Message pasMessage, ExcelReader reader)
|
||||||
{
|
{
|
||||||
List<PAS> newPasList = new List<PAS>();
|
pasMessage.DeleteElements();
|
||||||
|
|
||||||
string sheetTitle = "9. PAX - Departure";
|
bool? notificationSchengen = reader.ReadBoolean("PASD.NotificationSchengen");
|
||||||
|
|
||||||
if (reader.HasWorksheetNamed(sheetTitle))
|
|
||||||
{
|
|
||||||
// bool? notificationSchengen = reader.ReadBoolean("PAS.NotificationSchengen");
|
|
||||||
bool? notificationPax = reader.ReadBoolean("PASD.NotificationPAX");
|
bool? notificationPax = reader.ReadBoolean("PASD.NotificationPAX");
|
||||||
|
|
||||||
for (int i = 0; i < 5000; i++)
|
for (int i = 0; i < pasMessage.NumberOfExcelRows; i++)
|
||||||
{
|
{
|
||||||
string lastName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", i + 18), 100);
|
string pasLastName = string.Format("PASD.PassengerLastName_{0}", i + 1);
|
||||||
string firstName = reader.ReadCellAsText(sheetTitle, string.Format("D{0}", i + 18), 100);
|
string pasFirstName = string.Format("PASD.PassengerFirstName_{0}", i + 1);
|
||||||
if (lastName.IsNullOrEmpty() && firstName.IsNullOrEmpty()) break; // finish after reading last row
|
string pasGender = string.Format("PASD.PassengerGender_{0}", i + 1);
|
||||||
|
string pasNationality = string.Format("PASD.PassengerNationality_{0}", i + 1);
|
||||||
|
string pasEmbarkation = string.Format("PASD.PassengerPortOfEmbarkation_{0}", i + 1);
|
||||||
|
string pasDebarkation = string.Format("PASD.PassengerPortOfDisembarkation_{0}", i + 1);
|
||||||
|
string pasTransit = string.Format("PASD.PassengerInTransit_{0}", i + 1);
|
||||||
|
string pasPlaceOfBirth = string.Format("PASD.PassengerPlaceOfBirth_{0}", i + 1);
|
||||||
|
string pasDateOfBirth = string.Format("PASD.PassengerDateOfBirth_{0}", i + 1);
|
||||||
|
string pasIdentDocType = string.Format("PASD.PassengerIdentityDocumentType_{0}", i + 1);
|
||||||
|
string pasIdentDocId = string.Format("PASD.PassengerIdentityDocumentId_{0}", i + 1);
|
||||||
|
string pasVisaNo = string.Format("PASD.PassengerVisaNumber_{0}", i + 1);
|
||||||
|
string pasIssuing = string.Format("PASD.PassengerIdentityDocumentIssuingState_{0}", i + 1);
|
||||||
|
string pasExpiryDate = string.Format("PASD.PassengerIdentityDocumentExpiryDate_{0}", i + 1);
|
||||||
|
string pasCountryOfBirth = string.Format("PASD.CountryOfBirth_{0}", i + 1);
|
||||||
|
string pasEmergencyCare = string.Format("PASD.EmergencyCare_{0}", i + 1);
|
||||||
|
string pasEmergencyContact = string.Format("PASD.EmergencyContactNumber_{0}", i + 1);
|
||||||
|
|
||||||
PASD pas = new PASD();
|
string lastName = reader.ReadText(pasLastName);
|
||||||
|
if (!lastName.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
if (!(pasMessage.GetSublistElementWithIdentifier((i + 1).ToString()) is PASD pas))
|
||||||
|
{
|
||||||
|
pas = new PASD();
|
||||||
|
pas.IsDeparture = true;
|
||||||
pas.Identifier = (i + 1).ToString();
|
pas.Identifier = (i + 1).ToString();
|
||||||
pas.MessageHeader = pasMessage;
|
pas.MessageHeader = pasMessage;
|
||||||
pas.IsDeparture = true;
|
|
||||||
newPasList.Add(pas);
|
|
||||||
|
|
||||||
pas.NotificationSchengen = true;
|
|
||||||
pas.NotificationPAX = notificationPax ?? false;
|
|
||||||
pas.PassengerLastName = lastName;
|
|
||||||
pas.PassengerFirstName = firstName;
|
|
||||||
|
|
||||||
pas.PassengerNationality = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("I{0}", i + 18)), out bool canceled);
|
|
||||||
if (canceled) return true;
|
|
||||||
pas.PassengerIdentityDocumentIssuingState = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("O{0}", i + 18)), out canceled);
|
|
||||||
if (canceled) return true;
|
|
||||||
if (pas.PassengerIdentityDocumentIssuingState.IsNullOrEmpty())
|
|
||||||
pas.PassengerIdentityDocumentIssuingState = "XX";
|
|
||||||
|
|
||||||
pas.PassengerGender = ReadGender(reader.ReadCellAsText(sheetTitle, string.Format("E{0}", i + 18)), out canceled);
|
|
||||||
if (canceled) return true;
|
|
||||||
pas.PassengerPortOfEmbarkation = ReadLocode(reader.ReadCellAsText(sheetTitle, string.Format("F{0}", i + 18)), out canceled);
|
|
||||||
if (canceled) return true;
|
|
||||||
pas.PassengerPortOfDisembarkation = ReadLocode(reader.ReadCellAsText(sheetTitle, string.Format("G{0}", i + 18)), out canceled);
|
|
||||||
if (canceled) return true;
|
|
||||||
|
|
||||||
pas.PassengerInTransit = reader.ReadCellAsBool(sheetTitle, string.Format("H{0}", i + 18));
|
|
||||||
|
|
||||||
pas.PassengerPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("J{0}", i + 18), 100);
|
|
||||||
pas.PassengerCountryOfBirth = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("K{0}", i + 18)), out _, false);
|
|
||||||
|
|
||||||
if (canceled) return true;
|
|
||||||
DateTime? dateOfBirth = reader.ReadCellAsDateTime(sheetTitle, string.Format("L{0}", i + 18));
|
|
||||||
pas.PassengerDateOfBirth = dateOfBirth;
|
|
||||||
|
|
||||||
pas.PassengerIdentityDocumentType = ReadDocumentType(reader.ReadCellAsText(sheetTitle, string.Format("M{0}", i + 18)), out canceled);
|
|
||||||
if (canceled) return true;
|
|
||||||
pas.PassengerIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("N{0}", i + 18), 100);
|
|
||||||
|
|
||||||
pas.PassengerIdentityDocumentExpiryDate = reader.ReadCellAsDateTime(sheetTitle, string.Format("P{0}", i + 18)) ?? (DateTime?)new DateTime(2100, 12, 31); ;
|
|
||||||
|
|
||||||
pas.PassengerVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("Q{0}", i + 18), 100);
|
|
||||||
pas.EmergencyCare = reader.ReadCellAsText(sheetTitle, string.Format("R{0}", i + 18), 255);
|
|
||||||
pas.EmergencyContactNumber = reader.ReadCellAsText(sheetTitle, string.Format("S{0}", i + 18), 99);
|
|
||||||
|
|
||||||
// pas.NotificationSchengen = pas.HasSchengenDetails;
|
|
||||||
|
|
||||||
Util.UIHelper.SetBusyState(); // dialog might reset busy state
|
|
||||||
}
|
|
||||||
|
|
||||||
bool mustPAX = newPasList.Count >= 12;
|
|
||||||
if (mustPAX)
|
|
||||||
{
|
|
||||||
foreach (PASD pasd in newPasList.Cast<PASD>())
|
|
||||||
pasd.NotificationPAX = mustPAX;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sheetTitle = "8. PAX - Departure"; // altes Excel Format
|
|
||||||
if (reader.HasWorksheetNamed(sheetTitle))
|
|
||||||
{
|
|
||||||
for (int i = 0; i < 5000; i++)
|
|
||||||
{
|
|
||||||
string lastName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", i + 14));
|
|
||||||
string firstName = reader.ReadCellAsText(sheetTitle, string.Format("D{0}", i + 14));
|
|
||||||
if (lastName.IsNullOrEmpty() && firstName.IsNullOrEmpty()) break; // finish after reading last row
|
|
||||||
|
|
||||||
PASD pas = new PASD();
|
|
||||||
pas.Identifier = (i + 1).ToString();
|
|
||||||
pas.MessageHeader = pasMessage;
|
|
||||||
pas.IsDeparture = true;
|
|
||||||
newPasList.Add(pas);
|
|
||||||
|
|
||||||
pas.NotificationSchengen = true;
|
|
||||||
pas.NotificationPAX = false;
|
|
||||||
|
|
||||||
pas.PassengerLastName = lastName;
|
|
||||||
pas.PassengerFirstName = firstName;
|
|
||||||
|
|
||||||
pas.PassengerNationality = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("F{0}", i + 14)), out bool canceled);
|
|
||||||
if (canceled) return true;
|
|
||||||
|
|
||||||
pas.PassengerGender = ReadGender(reader.ReadCellAsText(sheetTitle, string.Format("E{0}", i + 14)), out canceled);
|
|
||||||
if (canceled) return true;
|
|
||||||
pas.PassengerPortOfEmbarkation = ReadLocode(reader.ReadCellAsText(sheetTitle, string.Format("G{0}", i + 14)), out canceled);
|
|
||||||
if (canceled) return true;
|
|
||||||
pas.PassengerPortOfDisembarkation = ReadLocode(reader.ReadCellAsText(sheetTitle, string.Format("H{0}", i + 14)), out canceled);
|
|
||||||
if (canceled) return true;
|
|
||||||
|
|
||||||
pas.PassengerInTransit = reader.ReadCellAsBool(sheetTitle, string.Format("I{0}", i + 14));
|
|
||||||
pas.PassengerPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("J{0}", i + 14));
|
|
||||||
|
|
||||||
DateTime? dateOfBirth = reader.ReadCellAsDateTime(sheetTitle, string.Format("K{0}", i + 14));
|
|
||||||
pas.PassengerDateOfBirth = dateOfBirth;
|
|
||||||
|
|
||||||
pas.PassengerIdentityDocumentType = ReadDocumentType(reader.ReadCellAsText(sheetTitle, string.Format("L{0}", i + 14)), out canceled);
|
|
||||||
if (canceled) return true;
|
|
||||||
pas.PassengerIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("M{0}", i + 14));
|
|
||||||
pas.PassengerIdentityDocumentExpiryDate = new DateTime(2100, 12, 31);
|
|
||||||
pas.PassengerIdentityDocumentIssuingState = "XX";
|
|
||||||
|
|
||||||
pas.PassengerVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("N{0}", i + 14));
|
|
||||||
|
|
||||||
Util.UIHelper.SetBusyState(); // dialog might reset busy state
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
DBManager.Instance.DeleteAllPASForMessage(pasMessage.Id);
|
|
||||||
pasMessage.Elements.Clear();
|
|
||||||
foreach (PASD pas in newPasList.Cast<PASD>())
|
|
||||||
pasMessage.Elements.Add(pas);
|
pasMessage.Elements.Add(pas);
|
||||||
|
}
|
||||||
|
|
||||||
|
pas.IsDeparture = true;
|
||||||
|
pas.NotificationSchengen = notificationSchengen;
|
||||||
|
pas.NotificationPAX = notificationPax;
|
||||||
|
pas.PassengerLastName = lastName;
|
||||||
|
pas.PassengerFirstName = reader.ReadText(pasFirstName);
|
||||||
|
pas.PassengerGender = reader.ReadGender(pasGender);
|
||||||
|
pas.PassengerNationality = reader.ReadNationality(pasNationality);
|
||||||
|
|
||||||
|
pas.PassengerPortOfEmbarkation = reader.ReadTextNoWhitespace(pasEmbarkation);
|
||||||
|
pas.PassengerPortOfDisembarkation = reader.ReadTextNoWhitespace(pasDebarkation);
|
||||||
|
pas.PassengerInTransit = reader.ReadBoolean(pasTransit);
|
||||||
|
pas.PassengerPlaceOfBirth = reader.ReadText(pasPlaceOfBirth);
|
||||||
|
pas.PassengerDateOfBirth = reader.ReadBirthDate(pasDateOfBirth);
|
||||||
|
pas.PassengerIdentityDocumentType = reader.ReadIdentityDocumentType(pasIdentDocType);
|
||||||
|
pas.PassengerIdentityDocumentId = reader.ReadText(pasIdentDocId);
|
||||||
|
pas.PassengerVisaNumber = reader.ReadText(pasVisaNo);
|
||||||
|
pas.PassengerIdentityDocumentIssuingState = reader.ReadNationality(pasIssuing);
|
||||||
|
pas.PassengerIdentityDocumentExpiryDate = reader.ReadDate(pasExpiryDate) ?? (DateTime?)new DateTime(2100, 12, 31);
|
||||||
|
pas.PassengerCountryOfBirth = reader.ReadNationality(pasCountryOfBirth);
|
||||||
|
pas.EmergencyCare = reader.ReadText(pasEmergencyCare);
|
||||||
|
pas.EmergencyContactNumber = reader.ReadText(pasEmergencyContact);
|
||||||
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2847,12 +2726,12 @@ namespace ENI2.Excel
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string ReadNationality(string nationality, out bool canceled, bool setPlaceHolder = true)
|
public static string ReadNationality(string nationality, out bool canceled)
|
||||||
{
|
{
|
||||||
string result = null;
|
string result = null;
|
||||||
canceled = false;
|
canceled = false;
|
||||||
nationality = nationality.Trim();
|
nationality = nationality.Trim();
|
||||||
if (nationality.IsNullOrEmpty() && setPlaceHolder)
|
if (nationality.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
result = "XX";
|
result = "XX";
|
||||||
}
|
}
|
||||||
@ -2869,8 +2748,6 @@ namespace ENI2.Excel
|
|||||||
result = ValueMapping.Dicts[ValueMapping.MappingType.COUNTRY][nationality].Value;
|
result = ValueMapping.Dicts[ValueMapping.MappingType.COUNTRY][nationality].Value;
|
||||||
}
|
}
|
||||||
else // we cannot find whatever this is..
|
else // we cannot find whatever this is..
|
||||||
{
|
|
||||||
if (setPlaceHolder) // only show import dialog if this is a required field..
|
|
||||||
{
|
{
|
||||||
FixImportDialog fid = new FixImportDialog();
|
FixImportDialog fid = new FixImportDialog();
|
||||||
fid.Value = nationality;
|
fid.Value = nationality;
|
||||||
@ -2903,7 +2780,6 @@ namespace ENI2.Excel
|
|||||||
canceled = true;
|
canceled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,12 +76,12 @@ namespace ENI2.Excel
|
|||||||
this.WriteItineraries(bpol);
|
this.WriteItineraries(bpol);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Message.NotificationClass.CREWA:
|
case Message.NotificationClass.CREW:
|
||||||
this.WriteCREW(message, true, isRefSheet);
|
this.WriteCREW(message, true, isRefSheet);
|
||||||
break;
|
break;
|
||||||
case Message.NotificationClass.CREWD:
|
//case Message.NotificationClass.CREWD: // XXX-TODO
|
||||||
this.WriteCREW(message, false, isRefSheet);
|
// this.WriteCREW(message, false, isRefSheet);
|
||||||
break;
|
// break;
|
||||||
case Message.NotificationClass.HAZA:
|
case Message.NotificationClass.HAZA:
|
||||||
this.WriteHAZ(message, true);
|
this.WriteHAZ(message, true);
|
||||||
break;
|
break;
|
||||||
@ -111,12 +111,12 @@ namespace ENI2.Excel
|
|||||||
case Message.NotificationClass.NOA_NOD:
|
case Message.NotificationClass.NOA_NOD:
|
||||||
if (message.Elements[0] is NOA_NOD noa_nod) this.WriteNOA_NOD(noa_nod, core.IsTransit, isRefSheet);
|
if (message.Elements[0] is NOA_NOD noa_nod) this.WriteNOA_NOD(noa_nod, core.IsTransit, isRefSheet);
|
||||||
break;
|
break;
|
||||||
case Message.NotificationClass.PASA:
|
case Message.NotificationClass.PAS:
|
||||||
this.WritePAS(message, true, isRefSheet);
|
this.WritePAS(message, true, isRefSheet);
|
||||||
break;
|
break;
|
||||||
case Message.NotificationClass.PASD:
|
//case Message.NotificationClass.PASD: // XXX - TODO
|
||||||
this.WritePAS(message, false, isRefSheet);
|
// this.WritePAS(message, false, isRefSheet);
|
||||||
break;
|
// break;
|
||||||
case Message.NotificationClass.POBA:
|
case Message.NotificationClass.POBA:
|
||||||
if (message.Elements[0] is POBA poba) this.WriteMessage(poba);
|
if (message.Elements[0] is POBA poba) this.WriteMessage(poba);
|
||||||
break;
|
break;
|
||||||
@ -379,11 +379,13 @@ namespace ENI2.Excel
|
|||||||
private void WriteCREW(Message crewMessage, bool isArrival, bool isRefSheet)
|
private void WriteCREW(Message crewMessage, bool isArrival, bool isRefSheet)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/* XXX - TODO
|
||||||
if (crewMessage.Elements.Count > 0)
|
if (crewMessage.Elements.Count > 0)
|
||||||
{
|
{
|
||||||
WriteBoolean(string.Format("CREW{0}.NotificationSchengen", isArrival ? "" : "D"), ((CREW)crewMessage.Elements[0]).NotificationSchengen);
|
WriteBoolean(string.Format("CREW{0}.NotificationSchengen", isArrival ? "" : "D"), ((CREW)crewMessage.Elements[0]).NotificationSchengen);
|
||||||
WriteBoolean(string.Format("CREW{0}.NotificationPAX", isArrival ? "" : "D"), ((CREW)crewMessage.Elements[0]).NotificationPAX);
|
WriteBoolean(string.Format("CREW{0}.NotificationPAX", isArrival ? "" : "D"), ((CREW)crewMessage.Elements[0]).NotificationPAX);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
for(int i = 0; i<Math.Min(crewMessage.NumberOfExcelRows, crewMessage.Elements.Count); i++)
|
for(int i = 0; i<Math.Min(crewMessage.NumberOfExcelRows, crewMessage.Elements.Count); i++)
|
||||||
{
|
{
|
||||||
@ -793,12 +795,13 @@ namespace ENI2.Excel
|
|||||||
|
|
||||||
private void WritePAS(Message pasMessage, bool isArrival, bool isRefSheet)
|
private void WritePAS(Message pasMessage, bool isArrival, bool isRefSheet)
|
||||||
{
|
{
|
||||||
|
/* XXX - TODO
|
||||||
if(pasMessage.Elements.Count > 0)
|
if(pasMessage.Elements.Count > 0)
|
||||||
{
|
{
|
||||||
WriteBoolean(string.Format("PAS{0}.NotificationSchengen", isArrival ? "" : "D"), ((PAS)pasMessage.Elements[0]).NotificationSchengen);
|
WriteBoolean(string.Format("PAS{0}.NotificationSchengen", isArrival ? "" : "D"), ((PAS)pasMessage.Elements[0]).NotificationSchengen);
|
||||||
WriteBoolean(string.Format("PAS{0}.NotificationPAX", isArrival ? "" : "D"), ((PAS)pasMessage.Elements[0]).NotificationPAX);
|
WriteBoolean(string.Format("PAS{0}.NotificationPAX", isArrival ? "" : "D"), ((PAS)pasMessage.Elements[0]).NotificationPAX);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
for(int i = 0; i < Math.Min(pasMessage.NumberOfExcelRows, pasMessage.Elements.Count); i++)
|
for(int i = 0; i < Math.Min(pasMessage.NumberOfExcelRows, pasMessage.Elements.Count); i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -16,7 +16,6 @@ namespace ENI2
|
|||||||
private static readonly SQLiteConnection _con;
|
private static readonly SQLiteConnection _con;
|
||||||
private const string _locode_DB_NAME = "db.sqlite";
|
private const string _locode_DB_NAME = "db.sqlite";
|
||||||
private static Dictionary<string, string> _nationalities = null;
|
private static Dictionary<string, string> _nationalities = null;
|
||||||
private static Dictionary<string, List<PortAreaInfo>> _portAreaInfos = null;
|
|
||||||
|
|
||||||
static LocalizedLookup()
|
static LocalizedLookup()
|
||||||
{
|
{
|
||||||
@ -189,8 +188,6 @@ namespace ENI2
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static Dictionary<string, string> getCargoCodesNST()
|
public static Dictionary<string, string> getCargoCodesNST()
|
||||||
{
|
{
|
||||||
Dictionary<string, string> result = new Dictionary<string, string>();
|
Dictionary<string, string> result = new Dictionary<string, string>();
|
||||||
@ -291,59 +288,5 @@ namespace ENI2
|
|||||||
reader.Close();
|
reader.Close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<string> getMVSHLocodes()
|
|
||||||
{
|
|
||||||
List<string> result = new List<string>();
|
|
||||||
|
|
||||||
string query = string.Format("SELECT locode from MVSH_ports");
|
|
||||||
SQLiteCommand cmd = new SQLiteCommand(query, _con);
|
|
||||||
IDataReader reader = cmd.ExecuteReader();
|
|
||||||
while (reader.Read())
|
|
||||||
{
|
|
||||||
if (reader.IsDBNull(0)) continue;
|
|
||||||
result.Add(reader.GetString(0));
|
|
||||||
}
|
|
||||||
reader.Close();
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Dictionary<string, List<PortAreaInfo>> getPortAreaInfos()
|
|
||||||
{
|
|
||||||
int cnt = 0;
|
|
||||||
if (_portAreaInfos == null)
|
|
||||||
{
|
|
||||||
_portAreaInfos = new Dictionary<string, List<PortAreaInfo>>();
|
|
||||||
string query = @"SELECT Locode, Agentur, Schiffe, Liegeplatz, Hafengebiet, `Hafengebiet-Code`, Bemerkungen from INFO_PortArea_Helper";
|
|
||||||
SQLiteCommand cmd = new SQLiteCommand(query, _con);
|
|
||||||
IDataReader reader = cmd.ExecuteReader();
|
|
||||||
while(reader.Read())
|
|
||||||
{
|
|
||||||
PortAreaInfo pai = new PortAreaInfo();
|
|
||||||
if (reader.IsDBNull(0)) continue;
|
|
||||||
pai.Locode = reader.GetString(0);
|
|
||||||
if (!reader.IsDBNull(1))
|
|
||||||
pai.Agency = reader.GetString(1);
|
|
||||||
if (!reader.IsDBNull(2))
|
|
||||||
pai.Ships = reader.GetString(2);
|
|
||||||
if (!reader.IsDBNull(3))
|
|
||||||
pai.Berth = reader.GetString(3);
|
|
||||||
if (!reader.IsDBNull(4))
|
|
||||||
pai.PortArea = reader.GetString(4);
|
|
||||||
if (!reader.IsDBNull(5))
|
|
||||||
pai.PortAreaCode = reader.GetString(5);
|
|
||||||
if (!reader.IsDBNull(6))
|
|
||||||
pai.Remark = reader.GetString(6);
|
|
||||||
if (!_portAreaInfos.ContainsKey(pai.Locode))
|
|
||||||
{
|
|
||||||
_portAreaInfos[pai.Locode] = new List<PortAreaInfo>();
|
|
||||||
}
|
|
||||||
_portAreaInfos[pai.Locode].Add(pai);
|
|
||||||
cnt++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return _portAreaInfos;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,9 +10,7 @@
|
|||||||
xmlns:util="clr-namespace:ENI2.Util"
|
xmlns:util="clr-namespace:ENI2.Util"
|
||||||
xmlns:local="clr-namespace:ENI2"
|
xmlns:local="clr-namespace:ENI2"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="ENI 2 Testversion"
|
Title="ENI 2" Height="450" Width="825" Icon="Resources/logo_schwarz.ico" Loaded="Window_Loaded" Closing="Window_Closing"
|
||||||
Height="{util:SettingBinding Height}" Width="{util:SettingBinding Width}"
|
|
||||||
Icon="Resources/logo_schwarz.ico" Loaded="Window_Loaded" Closing="Window_Closing"
|
|
||||||
SourceInitialized="Window_SourceInitialized">
|
SourceInitialized="Window_SourceInitialized">
|
||||||
|
|
||||||
<Window.CommandBindings>
|
<Window.CommandBindings>
|
||||||
@ -95,14 +93,8 @@
|
|||||||
<MenuItem x:Name="menuItemUserAdministration" Header="{x:Static p:Resources.textUserAdministration}" Click="radioButton_Click" Visibility="Hidden"/>
|
<MenuItem x:Name="menuItemUserAdministration" Header="{x:Static p:Resources.textUserAdministration}" Click="radioButton_Click" Visibility="Hidden"/>
|
||||||
<MenuItem x:Name="menuItemMaersk" Header="{x:Static p:Resources.textPOLists}" Click="radioButton_Click" Visibility="Hidden" />
|
<MenuItem x:Name="menuItemMaersk" Header="{x:Static p:Resources.textPOLists}" Click="radioButton_Click" Visibility="Hidden" />
|
||||||
<MenuItem x:Name="menuItemValueMappings" Header="{x:Static p:Resources.textExcelValueMappings}" Click="radioButton_Click" Visibility="Hidden" />
|
<MenuItem x:Name="menuItemValueMappings" Header="{x:Static p:Resources.textExcelValueMappings}" Click="radioButton_Click" Visibility="Hidden" />
|
||||||
<MenuItem x:Name="menuItemEasyPeasy" Header="{x:Static p:Resources.textEasyPeasy}" Click="radioButton_Click" Visibility="Hidden" />
|
|
||||||
<MenuItem x:Name="labelStatusId" />
|
<MenuItem x:Name="labelStatusId" />
|
||||||
<MenuItem Header="Help" HorizontalAlignment="Right">
|
<MenuItem Header="Help" HorizontalAlignment="Right">
|
||||||
<MenuItem Header="Change Password" Click="buttonChangePassword_Click">
|
|
||||||
<MenuItem.Icon>
|
|
||||||
<Image Source="Resources/lock.png" />
|
|
||||||
</MenuItem.Icon>
|
|
||||||
</MenuItem>
|
|
||||||
<MenuItem Header="About" Click="buttonAbout_Click">
|
<MenuItem Header="About" Click="buttonAbout_Click">
|
||||||
<MenuItem.Icon>
|
<MenuItem.Icon>
|
||||||
<Image Source="Resources/about.png" />
|
<Image Source="Resources/about.png" />
|
||||||
|
|||||||
@ -39,7 +39,6 @@ namespace ENI2
|
|||||||
private ServerStatusControl statusControl;
|
private ServerStatusControl statusControl;
|
||||||
private readonly SucheControl sucheControl;
|
private readonly SucheControl sucheControl;
|
||||||
private CompareExcelDialog compareExcelDialog;
|
private CompareExcelDialog compareExcelDialog;
|
||||||
private EasyPeasyControl easyPeasyControl;
|
|
||||||
|
|
||||||
private bool dbConnected;
|
private bool dbConnected;
|
||||||
private readonly ScaleTransform _transform = new ScaleTransform(1.0, 1.0);
|
private readonly ScaleTransform _transform = new ScaleTransform(1.0, 1.0);
|
||||||
@ -80,7 +79,7 @@ namespace ENI2
|
|||||||
|
|
||||||
#region Search related event handler
|
#region Search related event handler
|
||||||
|
|
||||||
private void AnmeldungenControl_MessageCoreSelected(MessageCore aMessageCore, ReportingParty.ShipcallDisplayModeEnum displayMode = ReportingParty.ShipcallDisplayModeEnum.CLASSIC)
|
private void AnmeldungenControl_MessageCoreSelected(MessageCore aMessageCore)
|
||||||
{
|
{
|
||||||
if(aMessageCore != null)
|
if(aMessageCore != null)
|
||||||
{
|
{
|
||||||
@ -121,7 +120,7 @@ namespace ENI2
|
|||||||
iDidLockIt);
|
iDidLockIt);
|
||||||
searchResultItem.IsCancelled = aMessageCore.Cancelled ?? false;
|
searchResultItem.IsCancelled = aMessageCore.Cancelled ?? false;
|
||||||
|
|
||||||
DetailRootControl drc = new DetailRootControl(aMessageCore, displayMode);
|
DetailRootControl drc = new DetailRootControl(aMessageCore);
|
||||||
drc.LockedByOtherUser = !iDidLockIt;
|
drc.LockedByOtherUser = !iDidLockIt;
|
||||||
|
|
||||||
if (!(aMessageCore.Cancelled ?? false))
|
if (!(aMessageCore.Cancelled ?? false))
|
||||||
@ -136,7 +135,7 @@ namespace ENI2
|
|||||||
this._dbWatchDog.Register(aMessageCore);
|
this._dbWatchDog.Register(aMessageCore);
|
||||||
|
|
||||||
drc.HighlightReset += Drc_HighlightReset;
|
drc.HighlightReset += Drc_HighlightReset;
|
||||||
drc.OpenNewCoreRequested += (core) => this.AnmeldungenControl_MessageCoreSelected(core, DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].ShipcallDisplayMode);
|
drc.OpenNewCoreRequested += (core) => this.AnmeldungenControl_MessageCoreSelected(core);
|
||||||
drc.ReloadCoreRequested += Drc_ReloadCoreRequested;
|
drc.ReloadCoreRequested += Drc_ReloadCoreRequested;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -219,26 +218,15 @@ namespace ENI2
|
|||||||
// Dez.22: Special case for BRE/BRV: Warning if some messages are not "confirmed"
|
// Dez.22: Special case for BRE/BRV: Warning if some messages are not "confirmed"
|
||||||
if(drc.Core.PoC.Equals("DEBRE")||drc.Core.PoC.Equals("DEBRV"))
|
if(drc.Core.PoC.Equals("DEBRE")||drc.Core.PoC.Equals("DEBRV"))
|
||||||
{
|
{
|
||||||
if(drc.HasCriticalInfoMissing(out string missingClass, drc.Core.PoC))
|
if(drc.HasCriticalInfoMissing(out string missingClass))
|
||||||
{
|
{
|
||||||
// _log.WarnFormat("set close warning because at least {0} is missing from BRE/BRV/HAM arrival", missingClass);
|
_log.WarnFormat("set close warning because at least {0} is missing from BRE/BRV arrival", missingClass);
|
||||||
if (MessageBox.Show(string.Format(Properties.Resources.textSpecialCaseBREBRV, missingClass), Properties.Resources.textConfirmation, MessageBoxButton.YesNo,
|
if (MessageBox.Show(string.Format(Properties.Resources.textSpecialCaseBREBRV, missingClass), Properties.Resources.textConfirmation, MessageBoxButton.YesNo,
|
||||||
MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.No)
|
MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.No)
|
||||||
e.Cancel = true;
|
e.Cancel = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Jul.24: Special case HAM extended (from above)
|
|
||||||
if (drc.Core.PoC.Equals("DEHAM"))
|
|
||||||
{
|
|
||||||
if (drc.HasCriticalInfoMissing(out string missingClass, drc.Core.PoC))
|
|
||||||
{
|
|
||||||
if (MessageBox.Show(string.Format(Properties.Resources.textSpecialCaseDEHAM, missingClass), Properties.Resources.textConfirmation, MessageBoxButton.YesNo,
|
|
||||||
MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.No)
|
|
||||||
e.Cancel = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!e.Cancel)
|
if (!e.Cancel)
|
||||||
{
|
{
|
||||||
if (lockedCores.ContainsKey(tabItem))
|
if (lockedCores.ContainsKey(tabItem))
|
||||||
@ -325,14 +313,6 @@ namespace ENI2
|
|||||||
}
|
}
|
||||||
this.rootContainer.Children.Add(this.vmControl);
|
this.rootContainer.Children.Add(this.vmControl);
|
||||||
}
|
}
|
||||||
else if(sender == this.menuItemEasyPeasy)
|
|
||||||
{
|
|
||||||
if(this.easyPeasyControl == null)
|
|
||||||
{
|
|
||||||
this.easyPeasyControl = new EasyPeasyControl();
|
|
||||||
}
|
|
||||||
this.rootContainer.Children.Add(this.easyPeasyControl);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buttonCompareSheets_Click(object sender, RoutedEventArgs ev)
|
private void buttonCompareSheets_Click(object sender, RoutedEventArgs ev)
|
||||||
@ -348,13 +328,7 @@ namespace ENI2
|
|||||||
{
|
{
|
||||||
compareExcelDialog.BringUp();
|
compareExcelDialog.BringUp();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void buttonChangePassword_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
ChangePasswordDialog cpd = new ChangePasswordDialog();
|
|
||||||
cpd.CurrentUser = this.userEntity;
|
|
||||||
cpd.ShowDialog();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@ -386,8 +360,6 @@ namespace ENI2
|
|||||||
Properties.Settings.Default.MainWindowPlacement = this.GetPlacement();
|
Properties.Settings.Default.MainWindowPlacement = this.GetPlacement();
|
||||||
Properties.Settings.Default.Save();
|
Properties.Settings.Default.Save();
|
||||||
Microsoft.Win32.SystemEvents.SessionEnded -= SystemEvents_SessionEnded;
|
Microsoft.Win32.SystemEvents.SessionEnded -= SystemEvents_SessionEnded;
|
||||||
if (easyPeasyControl != null)
|
|
||||||
easyPeasyControl.SaveState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Window_SourceInitialized(object sender, EventArgs e)
|
private void Window_SourceInitialized(object sender, EventArgs e)
|
||||||
@ -483,7 +455,7 @@ namespace ENI2
|
|||||||
if (((ShowIdDialog)sid).OpenCore)
|
if (((ShowIdDialog)sid).OpenCore)
|
||||||
{
|
{
|
||||||
Dispatcher.BeginInvoke((Action)(() => {
|
Dispatcher.BeginInvoke((Action)(() => {
|
||||||
this.AnmeldungenControl_MessageCoreSelected(closedDialog.Core, DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].ShipcallDisplayMode); // in einem neuen Reiter öffnen
|
this.AnmeldungenControl_MessageCoreSelected(closedDialog.Core); // in einem neuen Reiter öffnen
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -551,7 +523,7 @@ namespace ENI2
|
|||||||
|
|
||||||
// Meldeklassen für neuen Anlauf erzeugen:
|
// Meldeklassen für neuen Anlauf erzeugen:
|
||||||
bsmd.database.Util.CreateMessagesForCore(newCore, null, userEntity);
|
bsmd.database.Util.CreateMessagesForCore(newCore, null, userEntity);
|
||||||
this.AnmeldungenControl_MessageCoreSelected(newCore, DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].ShipcallDisplayMode); // in einem neuen Reiter öffnen
|
this.AnmeldungenControl_MessageCoreSelected(newCore); // in einem neuen Reiter öffnen
|
||||||
|
|
||||||
// watchdog registrieren, damit die "grüne" Markierung erscheint, sobald die Anmeldung durch den Excel-Prozess gelaufen ist.
|
// watchdog registrieren, damit die "grüne" Markierung erscheint, sobald die Anmeldung durch den Excel-Prozess gelaufen ist.
|
||||||
this._dbWatchDog.Register(newCore);
|
this._dbWatchDog.Register(newCore);
|
||||||
@ -623,7 +595,7 @@ namespace ENI2
|
|||||||
showIdDialog.Closed += (sid, showIdArgs) =>
|
showIdDialog.Closed += (sid, showIdArgs) =>
|
||||||
{
|
{
|
||||||
if (((ShowIdDialog)sid).OpenCore)
|
if (((ShowIdDialog)sid).OpenCore)
|
||||||
this.AnmeldungenControl_MessageCoreSelected(changedCore, DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].ShipcallDisplayMode);
|
this.AnmeldungenControl_MessageCoreSelected(changedCore);
|
||||||
};
|
};
|
||||||
showIdDialog.Show();
|
showIdDialog.Show();
|
||||||
showIdDialog.Activate();
|
showIdDialog.Activate();
|
||||||
@ -701,13 +673,11 @@ namespace ENI2
|
|||||||
ReportingParty.CurrentReportingParty = this.userEntity;
|
ReportingParty.CurrentReportingParty = this.userEntity;
|
||||||
this.menuItemMaersk.Visibility = Visibility.Visible;
|
this.menuItemMaersk.Visibility = Visibility.Visible;
|
||||||
this.menuItemValueMappings.Visibility = Visibility.Visible;
|
this.menuItemValueMappings.Visibility = Visibility.Visible;
|
||||||
this.menuItemEasyPeasy.Visibility = Visibility.Visible;
|
|
||||||
if (this.userEntity.IsAdmin)
|
if (this.userEntity.IsAdmin)
|
||||||
{
|
{
|
||||||
this.menuItemUserAdministration.Visibility = Visibility.Visible;
|
this.menuItemUserAdministration.Visibility = Visibility.Visible;
|
||||||
this.sucheControl.AdminMode = true;
|
this.sucheControl.AdminMode = true;
|
||||||
}
|
}
|
||||||
this.menuItemValueMappings.Visibility = this.userEntity.IsEditor ? Visibility.Visible : Visibility.Hidden;
|
|
||||||
break;
|
break;
|
||||||
case ReportingParty.LogonResult.FAILED:
|
case ReportingParty.LogonResult.FAILED:
|
||||||
this.labelLoginResult.Content = Properties.Resources.textWrongPassword;
|
this.labelLoginResult.Content = Properties.Resources.textWrongPassword;
|
||||||
@ -765,6 +735,5 @@ namespace ENI2
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1162
ENI2/Properties/Resources.Designer.cs
generated
@ -586,18 +586,6 @@
|
|||||||
<data name="user_edit" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="user_edit" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\user_edit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\user_edit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="user_edit4" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\user_edit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="user_edit3" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\user_edit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="user_edit2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\user_edit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="user_edit1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\user_edit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="textSave" xml:space="preserve">
|
<data name="textSave" xml:space="preserve">
|
||||||
<value>Save</value>
|
<value>Save</value>
|
||||||
</data>
|
</data>
|
||||||
@ -1184,7 +1172,7 @@
|
|||||||
<value>Category</value>
|
<value>Category</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="textColumsOfIBC" xml:space="preserve">
|
<data name="textColumsOfIBC" xml:space="preserve">
|
||||||
<value>Columns "o" of IBC Code (value 15.19)</value>
|
<value>Columns "o" of OBC Code (value 15.19)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="textContainerNo" xml:space="preserve">
|
<data name="textContainerNo" xml:space="preserve">
|
||||||
<value>Container No.</value>
|
<value>Container No.</value>
|
||||||
@ -1618,9 +1606,6 @@
|
|||||||
<data name="textCopyClip" xml:space="preserve">
|
<data name="textCopyClip" xml:space="preserve">
|
||||||
<value>Copy Id to clipboard</value>
|
<value>Copy Id to clipboard</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="textCopyShipnameClip" xml:space="preserve">
|
|
||||||
<value>Copy ship name to clipboard</value>
|
|
||||||
</data>
|
|
||||||
<data name="textUpdateStatus" xml:space="preserve">
|
<data name="textUpdateStatus" xml:space="preserve">
|
||||||
<value>Server status update</value>
|
<value>Server status update</value>
|
||||||
</data>
|
</data>
|
||||||
@ -1757,7 +1742,7 @@
|
|||||||
<value>Select all</value>
|
<value>Select all</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="textSelectImportClasses" xml:space="preserve">
|
<data name="textSelectImportClasses" xml:space="preserve">
|
||||||
<value>Select message classes</value>
|
<value>Select classes to import</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="textSelectNone" xml:space="preserve">
|
<data name="textSelectNone" xml:space="preserve">
|
||||||
<value>Select none</value>
|
<value>Select none</value>
|
||||||
@ -1874,7 +1859,7 @@
|
|||||||
<value>Search NST2007 list</value>
|
<value>Search NST2007 list</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="textSpecialCaseBREBRV" xml:space="preserve">
|
<data name="textSpecialCaseBREBRV" xml:space="preserve">
|
||||||
<value>At least one of NOA_NOD, AGNT, INFO, SEC, TIEFA, SERV hasn't been sent for DEBRE/DEBRV/DEHAM: ({0}) Close anyway?</value>
|
<value>At least one of NOA_NOD, AGNT, INFO, SEC, TIEFA hasn't been sent for DEBRE/DEBRV: ({0}) Close anyway?</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="about" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="about" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\about.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\about.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
@ -1897,375 +1882,4 @@
|
|||||||
<data name="textExcelValueMappings" xml:space="preserve">
|
<data name="textExcelValueMappings" xml:space="preserve">
|
||||||
<value>Excel import value mappings</value>
|
<value>Excel import value mappings</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="textCopyFromWAS" xml:space="preserve">
|
|
||||||
<value>Copy from WAS</value>
|
|
||||||
</data>
|
|
||||||
<data name="textCopyToWASConfirmation" xml:space="preserve">
|
|
||||||
<value>Do you want to copy / overwrite disposal amounts using values from WAS?</value>
|
|
||||||
</data>
|
|
||||||
<data name="textCopyToCREWA" xml:space="preserve">
|
|
||||||
<value>Copy to CREWA</value>
|
|
||||||
</data>
|
|
||||||
<data name="textCopyToCREWD" xml:space="preserve">
|
|
||||||
<value>Copy to CREWD</value>
|
|
||||||
</data>
|
|
||||||
<data name="textCopyToPASA" xml:space="preserve">
|
|
||||||
<value>Copy to PASA</value>
|
|
||||||
</data>
|
|
||||||
<data name="textCopyToPASD" xml:space="preserve">
|
|
||||||
<value>Copy to PASD</value>
|
|
||||||
</data>
|
|
||||||
<data name="textSpecialCaseDEHAM" xml:space="preserve">
|
|
||||||
<value>{0} has not been sent for DEHAM. Close anyway?</value>
|
|
||||||
</data>
|
|
||||||
<data name="textDeleteAllEntries" xml:space="preserve">
|
|
||||||
<value>Delete all entries</value>
|
|
||||||
</data>
|
|
||||||
<data name="textConfimDeleteAllEntries" xml:space="preserve">
|
|
||||||
<value>This will delete all entries. Are you sure?</value>
|
|
||||||
</data>
|
|
||||||
<data name="textVoyage" xml:space="preserve">
|
|
||||||
<value>1. Voyage</value>
|
|
||||||
</data>
|
|
||||||
<data name="text11PreviousPort" xml:space="preserve">
|
|
||||||
<value>1.1 Previous port</value>
|
|
||||||
</data>
|
|
||||||
<data name="text12IncomingVoyage" xml:space="preserve">
|
|
||||||
<value>1.2 Incoming voyage</value>
|
|
||||||
</data>
|
|
||||||
<data name="text13RelevantPortcall" xml:space="preserve">
|
|
||||||
<value>1.3 Relevant Portcall (port of call) / Kiel-Canal-Transit</value>
|
|
||||||
</data>
|
|
||||||
<data name="text14OutgoingVoyage" xml:space="preserve">
|
|
||||||
<value>1.4 Outgoing voyage</value>
|
|
||||||
</data>
|
|
||||||
<data name="text15NextPort" xml:space="preserve">
|
|
||||||
<value>1.5 Next port</value>
|
|
||||||
</data>
|
|
||||||
<data name="text16Voyage" xml:space="preserve">
|
|
||||||
<value>1.5 Voyage</value>
|
|
||||||
</data>
|
|
||||||
<data name="text17Last10PortFacilitiesCalled" xml:space="preserve">
|
|
||||||
<value>1.7 Last 10 port facilities called</value>
|
|
||||||
</data>
|
|
||||||
<data name="text18ShipToShip" xml:space="preserve">
|
|
||||||
<value>1.8 Ship to ship activities during last 10 port facilities called</value>
|
|
||||||
</data>
|
|
||||||
<data name="text19PortsCalled30days" xml:space="preserve">
|
|
||||||
<value>1.9 Ports called during the last 30 days</value>
|
|
||||||
</data>
|
|
||||||
<data name="text110MaritimeHealthData" xml:space="preserve">
|
|
||||||
<value>1.10 Maritime health data</value>
|
|
||||||
</data>
|
|
||||||
<data name="text111PortOfItinerary" xml:space="preserve">
|
|
||||||
<value>1.11 Port of itinerary</value>
|
|
||||||
</data>
|
|
||||||
<data name="textDefaultDisplay" xml:space="preserve">
|
|
||||||
<value>Default display</value>
|
|
||||||
</data>
|
|
||||||
<data name="textOpenClassic" xml:space="preserve">
|
|
||||||
<value>Open in classic display mode</value>
|
|
||||||
</data>
|
|
||||||
<data name="textOpenFormsheet" xml:space="preserve">
|
|
||||||
<value>Open in form sheet display mode</value>
|
|
||||||
</data>
|
|
||||||
<data name="text1Voyage" xml:space="preserve">
|
|
||||||
<value>1. Voyage</value>
|
|
||||||
</data>
|
|
||||||
<data name="text2PortCall" xml:space="preserve">
|
|
||||||
<value>2. Port call</value>
|
|
||||||
</data>
|
|
||||||
<data name="text21ReferenceNumbers" xml:space="preserve">
|
|
||||||
<value>2.1 Reference numbers</value>
|
|
||||||
</data>
|
|
||||||
<data name="text22PortOperations" xml:space="preserve">
|
|
||||||
<value>2.2 Port operations</value>
|
|
||||||
</data>
|
|
||||||
<data name="text23Agency" xml:space="preserve">
|
|
||||||
<value>2.3 Agency</value>
|
|
||||||
</data>
|
|
||||||
<data name="text24Invoice" xml:space="preserve">
|
|
||||||
<value>2.4 Invoice (concerning mooring fees, disposal costs etc.)</value>
|
|
||||||
</data>
|
|
||||||
<data name="text25CargeOnBoard" xml:space="preserve">
|
|
||||||
<value>2.5 Cargo on board related to incoming journey</value>
|
|
||||||
</data>
|
|
||||||
<data name="text26CargoPort" xml:space="preserve">
|
|
||||||
<value>2.6 Cargo handled in port of call (cargo to discharge / load / transiting)</value>
|
|
||||||
</data>
|
|
||||||
<data name="text27Waste" xml:space="preserve">
|
|
||||||
<value>2.7 Waste (MARPOL) data</value>
|
|
||||||
</data>
|
|
||||||
<data name="text28Store" xml:space="preserve">
|
|
||||||
<value>2.8 Store information</value>
|
|
||||||
</data>
|
|
||||||
<data name="text29CrewEffects" xml:space="preserve">
|
|
||||||
<value>2.9 IMO crew effects declaration (IMO FAL form 4)</value>
|
|
||||||
</data>
|
|
||||||
<data name="textStore" xml:space="preserve">
|
|
||||||
<value>Store</value>
|
|
||||||
</data>
|
|
||||||
<data name="textQuantityUnit" xml:space="preserve">
|
|
||||||
<value>Quantity unit</value>
|
|
||||||
</data>
|
|
||||||
<data name="textLocationOnBoard" xml:space="preserve">
|
|
||||||
<value>Location on board</value>
|
|
||||||
</data>
|
|
||||||
<data name="textOfficialUse" xml:space="preserve">
|
|
||||||
<value>Official use</value>
|
|
||||||
</data>
|
|
||||||
<data name="text3PreArrival" xml:space="preserve">
|
|
||||||
<value>3. Pre-arrival</value>
|
|
||||||
</data>
|
|
||||||
<data name="text31General" xml:space="preserve">
|
|
||||||
<value>3.1 General</value>
|
|
||||||
</data>
|
|
||||||
<data name="text32PersonsOnBoard" xml:space="preserve">
|
|
||||||
<value>3.2 Persons on board on arrival</value>
|
|
||||||
</data>
|
|
||||||
<data name="text33BunkerOnArrival" xml:space="preserve">
|
|
||||||
<value>3.3 Bunker on arrival</value>
|
|
||||||
</data>
|
|
||||||
<data name="text34DangerousCargo" xml:space="preserve">
|
|
||||||
<value>3.4 Dangerous cargo on board on arrival</value>
|
|
||||||
</data>
|
|
||||||
<data name="text36TowOnArrival" xml:space="preserve">
|
|
||||||
<value>3.5 Tow (barge, pontoon, etc.) on arrival</value>
|
|
||||||
</data>
|
|
||||||
<data name="textAreMatterToReport" xml:space="preserve">
|
|
||||||
<value>Are any security-related matters to report?</value>
|
|
||||||
</data>
|
|
||||||
<data name="textMatterToReport" xml:space="preserve">
|
|
||||||
<value>if yes, description of matters to report</value>
|
|
||||||
</data>
|
|
||||||
<data name="text4PreDeparture" xml:space="preserve">
|
|
||||||
<value>4. Pre-departure</value>
|
|
||||||
</data>
|
|
||||||
<data name="text42PersonsOnBoard" xml:space="preserve">
|
|
||||||
<value>4.2 Persons on board on departure</value>
|
|
||||||
</data>
|
|
||||||
<data name="text43BunkerOnDeparture" xml:space="preserve">
|
|
||||||
<value>4.3 Bunker on departure</value>
|
|
||||||
</data>
|
|
||||||
<data name="text44DangerousCargo" xml:space="preserve">
|
|
||||||
<value>4.4 Dangerous cargo on board on departure</value>
|
|
||||||
</data>
|
|
||||||
<data name="text45TowOnDeparture" xml:space="preserve">
|
|
||||||
<value>4.5 Tow (barge, pontoon etc.) on departure</value>
|
|
||||||
</data>
|
|
||||||
<data name="text41General" xml:space="preserve">
|
|
||||||
<value>4.1 General</value>
|
|
||||||
</data>
|
|
||||||
<data name="text5ShipData" xml:space="preserve">
|
|
||||||
<value>5. Ship data</value>
|
|
||||||
</data>
|
|
||||||
<data name="text51General" xml:space="preserve">
|
|
||||||
<value>5.1 General</value>
|
|
||||||
</data>
|
|
||||||
<data name="text52SSCEC" xml:space="preserve">
|
|
||||||
<value>5.2 SSCEC</value>
|
|
||||||
</data>
|
|
||||||
<data name="text53ISPS" xml:space="preserve">
|
|
||||||
<value>5.3 ISPS</value>
|
|
||||||
</data>
|
|
||||||
<data name="text54TankerDetails" xml:space="preserve">
|
|
||||||
<value>5.4 Tanker details</value>
|
|
||||||
</data>
|
|
||||||
<data name="textNetTonnage" xml:space="preserve">
|
|
||||||
<value>Net tonnage</value>
|
|
||||||
</data>
|
|
||||||
<data name="textRegistryDate" xml:space="preserve">
|
|
||||||
<value>Registry date</value>
|
|
||||||
</data>
|
|
||||||
<data name="textCertificateOfRegistryNumber" xml:space="preserve">
|
|
||||||
<value>Certificate of registry number</value>
|
|
||||||
</data>
|
|
||||||
<data name="textIsDueToInspection" xml:space="preserve">
|
|
||||||
<value>Is due to inspection?</value>
|
|
||||||
</data>
|
|
||||||
<data name="textPossibleAnchorage" xml:space="preserve">
|
|
||||||
<value>Possible anchorage?</value>
|
|
||||||
</data>
|
|
||||||
<data name="textShipEmail" xml:space="preserve">
|
|
||||||
<value>Ship e-mail</value>
|
|
||||||
</data>
|
|
||||||
<data name="text6CrewDataOnArrival" xml:space="preserve">
|
|
||||||
<value>6. Crew data on arrival</value>
|
|
||||||
</data>
|
|
||||||
<data name="text7CrewDeparture" xml:space="preserve">
|
|
||||||
<value>7. Crew data on departure</value>
|
|
||||||
</data>
|
|
||||||
<data name="text8PassengerArrival" xml:space="preserve">
|
|
||||||
<value>8. Passenger data on arrival</value>
|
|
||||||
</data>
|
|
||||||
<data name="text9PassengerDeparture" xml:space="preserve">
|
|
||||||
<value>9. Passenger data on departure</value>
|
|
||||||
</data>
|
|
||||||
<data name="text10DangerousCargoArrival" xml:space="preserve">
|
|
||||||
<value>10. Dangerous cargo data on arrival</value>
|
|
||||||
</data>
|
|
||||||
<data name="text11DangerousCargoDeparture" xml:space="preserve">
|
|
||||||
<value>11. Dangerous cargo data on departure</value>
|
|
||||||
</data>
|
|
||||||
<data name="text12ATAATD" xml:space="preserve">
|
|
||||||
<value>12. Actual time of arrival / departure</value>
|
|
||||||
</data>
|
|
||||||
<data name="text13WasteReceipts" xml:space="preserve">
|
|
||||||
<value>13. Waste receipts</value>
|
|
||||||
</data>
|
|
||||||
<data name="textDGContactFamilyName" xml:space="preserve">
|
|
||||||
<value>DG manifest contact - family name</value>
|
|
||||||
</data>
|
|
||||||
<data name="textDGContactPhone" xml:space="preserve">
|
|
||||||
<value>DG manifest contact - phone</value>
|
|
||||||
</data>
|
|
||||||
<data name="text102IBCData" xml:space="preserve">
|
|
||||||
<value>10.2 IBC data (on arrival), if applicable</value>
|
|
||||||
</data>
|
|
||||||
<data name="text10.3IGCData" xml:space="preserve">
|
|
||||||
<value>10.3 IGC data (on arrival), if applicable</value>
|
|
||||||
</data>
|
|
||||||
<data name="text104IMSBCData" xml:space="preserve">
|
|
||||||
<value>10.4 IMSBC data (on arrival), if applicable</value>
|
|
||||||
</data>
|
|
||||||
<data name="text103IGCData" xml:space="preserve">
|
|
||||||
<value>10.3 IGC data (on arrival), if applicable</value>
|
|
||||||
</data>
|
|
||||||
<data name="text105MARPOLData" xml:space="preserve">
|
|
||||||
<value>10.5 MARPOL I data (on arrival), if applicable</value>
|
|
||||||
</data>
|
|
||||||
<data name="text106IMDGData" xml:space="preserve">
|
|
||||||
<value>10.6 IMDG data (on arrival), if applicable</value>
|
|
||||||
</data>
|
|
||||||
<data name="text101General" xml:space="preserve">
|
|
||||||
<value>10.1 General</value>
|
|
||||||
</data>
|
|
||||||
<data name="text111General" xml:space="preserve">
|
|
||||||
<value>11.1 General</value>
|
|
||||||
</data>
|
|
||||||
<data name="text112IBCData" xml:space="preserve">
|
|
||||||
<value>11.2 IBC data (on departure), if applicable</value>
|
|
||||||
</data>
|
|
||||||
<data name="text113IGCData" xml:space="preserve">
|
|
||||||
<value>11.3 IGC data (on departure), if applicable</value>
|
|
||||||
</data>
|
|
||||||
<data name="text114IMSBCData" xml:space="preserve">
|
|
||||||
<value>11.4 IMSBC data (on departure), if applicable</value>
|
|
||||||
</data>
|
|
||||||
<data name="text115MARPOLData" xml:space="preserve">
|
|
||||||
<value>11.5 MARPOL I data (on departure), if applicable</value>
|
|
||||||
</data>
|
|
||||||
<data name="text116IMDGData" xml:space="preserve">
|
|
||||||
<value>11.6 IMDG data (on departure), if applicable</value>
|
|
||||||
</data>
|
|
||||||
<data name="text121ATA" xml:space="preserve">
|
|
||||||
<value>12.1 Actual time of arrival</value>
|
|
||||||
</data>
|
|
||||||
<data name="text122ATD" xml:space="preserve">
|
|
||||||
<value>12.2 Actual time of departure</value>
|
|
||||||
</data>
|
|
||||||
<data name="text131WasteReceipt" xml:space="preserve">
|
|
||||||
<value>13.1 Waste receipt</value>
|
|
||||||
</data>
|
|
||||||
<data name="clock" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\clock.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="text102" xml:space="preserve">
|
|
||||||
<value>2 IBC</value>
|
|
||||||
</data>
|
|
||||||
<data name="text103" xml:space="preserve">
|
|
||||||
<value>3 IGC</value>
|
|
||||||
</data>
|
|
||||||
<data name="text104" xml:space="preserve">
|
|
||||||
<value>4 IMSBC</value>
|
|
||||||
</data>
|
|
||||||
<data name="text105" xml:space="preserve">
|
|
||||||
<value>5 MARPOL I</value>
|
|
||||||
</data>
|
|
||||||
<data name="text106" xml:space="preserve">
|
|
||||||
<value>6 IMDG</value>
|
|
||||||
</data>
|
|
||||||
<data name="textTab11" xml:space="preserve">
|
|
||||||
<value>1-6 Actual</value>
|
|
||||||
</data>
|
|
||||||
<data name="textTab12" xml:space="preserve">
|
|
||||||
<value>7-9 Tables</value>
|
|
||||||
</data>
|
|
||||||
<data name="textTab13" xml:space="preserve">
|
|
||||||
<value>10 MDH</value>
|
|
||||||
</data>
|
|
||||||
<data name="textTab14" xml:space="preserve">
|
|
||||||
<value>11 Cruise</value>
|
|
||||||
</data>
|
|
||||||
<data name="textTab21" xml:space="preserve">
|
|
||||||
<value>1-2 Berth</value>
|
|
||||||
</data>
|
|
||||||
<data name="textTab22" xml:space="preserve">
|
|
||||||
<value>3-4 Contact</value>
|
|
||||||
</data>
|
|
||||||
<data name="textTab23" xml:space="preserve">
|
|
||||||
<value>5-6 Cargo</value>
|
|
||||||
</data>
|
|
||||||
<data name="textTab24" xml:space="preserve">
|
|
||||||
<value>7 Waste</value>
|
|
||||||
</data>
|
|
||||||
<data name="textTab51" xml:space="preserve">
|
|
||||||
<value>1 General</value>
|
|
||||||
</data>
|
|
||||||
<data name="textTab52" xml:space="preserve">
|
|
||||||
<value>2-3 MDH / SEC</value>
|
|
||||||
</data>
|
|
||||||
<data name="textTab53" xml:space="preserve">
|
|
||||||
<value>4 Tanker</value>
|
|
||||||
</data>
|
|
||||||
<data name="textNewPassword" xml:space="preserve">
|
|
||||||
<value>New password</value>
|
|
||||||
</data>
|
|
||||||
<data name="textOldPassword" xml:space="preserve">
|
|
||||||
<value>Old password</value>
|
|
||||||
</data>
|
|
||||||
<data name="textRepeatNewPassword" xml:space="preserve">
|
|
||||||
<value>Repeat new password</value>
|
|
||||||
</data>
|
|
||||||
<data name="textMDHSimplification" xml:space="preserve">
|
|
||||||
<value>MDH simplification available</value>
|
|
||||||
</data>
|
|
||||||
<data name="textSECSimplification" xml:space="preserve">
|
|
||||||
<value>SEC simplification available</value>
|
|
||||||
</data>
|
|
||||||
<data name="textCopyFromCREWA" xml:space="preserve">
|
|
||||||
<value>Copy from CREWA</value>
|
|
||||||
</data>
|
|
||||||
<data name="textSelectCrewMember" xml:space="preserve">
|
|
||||||
<value>Select crew member</value>
|
|
||||||
</data>
|
|
||||||
<data name="textSERVTemplate" xml:space="preserve">
|
|
||||||
<value>SERV-Template</value>
|
|
||||||
</data>
|
|
||||||
<data name="pencil" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\pencil.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="textWasteDisposalServiceProvider" xml:space="preserve">
|
|
||||||
<value>Waste disposal service provider</value>
|
|
||||||
</data>
|
|
||||||
<data name="textSendAll" xml:space="preserve">
|
|
||||||
<value>Send all</value>
|
|
||||||
</data>
|
|
||||||
<data name="textENIStatus" xml:space="preserve">
|
|
||||||
<value>ENI-Status</value>
|
|
||||||
</data>
|
|
||||||
<data name="textNSWStatus" xml:space="preserve">
|
|
||||||
<value>NSW-Status</value>
|
|
||||||
</data>
|
|
||||||
<data name="textConfirmWSDPOverwrite" xml:space="preserve">
|
|
||||||
<value>The existing value for the waste disposal service provider will be overwritten.
|
|
||||||
|
|
||||||
Current entry: {0}
|
|
||||||
New entry: {1}
|
|
||||||
|
|
||||||
Proceed?</value>
|
|
||||||
</data>
|
|
||||||
<data name="textEasyPeasy" xml:space="preserve">
|
|
||||||
<value>Easy Peasy 🍋</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
</root>
|
||||||
102
ENI2/Properties/Settings.Designer.cs
generated
@ -12,7 +12,7 @@ namespace ENI2.Properties {
|
|||||||
|
|
||||||
|
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
|
||||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||||
|
|
||||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||||
@ -82,108 +82,12 @@ namespace ENI2.Properties {
|
|||||||
|
|
||||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("Initial Catalog=nswtest;Data Source=192.168.2.24\\SQLEXPRESS;Uid=dfuser;pwd=dfpass" +
|
[global::System.Configuration.DefaultSettingValueAttribute("Initial Catalog=nsw;Data Source=192.168.2.24\\SQLEXPRESS;Uid=dfuser;pwd=dfpasswd;P" +
|
||||||
"wd;Persist Security Info=False;Connection Reset=false")]
|
"ersist Security Info=False;Connection Reset=false")]
|
||||||
public string ConnectionString {
|
public string ConnectionString {
|
||||||
get {
|
get {
|
||||||
return ((string)(this["ConnectionString"]));
|
return ((string)(this["ConnectionString"]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("825")]
|
|
||||||
public string Width {
|
|
||||||
get {
|
|
||||||
return ((string)(this["Width"]));
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
this["Width"] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("450")]
|
|
||||||
public string Height {
|
|
||||||
get {
|
|
||||||
return ((string)(this["Height"]));
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
this["Height"] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("0")]
|
|
||||||
public string W1Left {
|
|
||||||
get {
|
|
||||||
return ((string)(this["W1Left"]));
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
this["W1Left"] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("0")]
|
|
||||||
public string W1Top {
|
|
||||||
get {
|
|
||||||
return ((string)(this["W1Top"]));
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
this["W1Top"] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("0")]
|
|
||||||
public string W2Left {
|
|
||||||
get {
|
|
||||||
return ((string)(this["W2Left"]));
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
this["W2Left"] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("0")]
|
|
||||||
public string W2Top {
|
|
||||||
get {
|
|
||||||
return ((string)(this["W2Top"]));
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
this["W2Top"] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("0")]
|
|
||||||
public string W3Left {
|
|
||||||
get {
|
|
||||||
return ((string)(this["W3Left"]));
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
this["W3Left"] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("0")]
|
|
||||||
public string W3Top {
|
|
||||||
get {
|
|
||||||
return ((string)(this["W3Top"]));
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
this["W3Top"] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,31 +21,7 @@
|
|||||||
<Value Profile="(Default)">BSMD ReportGenerator</Value>
|
<Value Profile="(Default)">BSMD ReportGenerator</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
<Setting Name="ConnectionString" Type="System.String" Scope="Application">
|
<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>
|
<Value Profile="(Default)">Initial Catalog=nsw;Data Source=192.168.2.24\SQLEXPRESS;Uid=dfuser;pwd=dfpasswd;Persist Security Info=False;Connection Reset=false</Value>
|
||||||
</Setting>
|
|
||||||
<Setting Name="Width" Type="System.String" Scope="User">
|
|
||||||
<Value Profile="(Default)">825</Value>
|
|
||||||
</Setting>
|
|
||||||
<Setting Name="Height" Type="System.String" Scope="User">
|
|
||||||
<Value Profile="(Default)">450</Value>
|
|
||||||
</Setting>
|
|
||||||
<Setting Name="W1Left" Type="System.String" Scope="User">
|
|
||||||
<Value Profile="(Default)">0</Value>
|
|
||||||
</Setting>
|
|
||||||
<Setting Name="W1Top" Type="System.String" Scope="User">
|
|
||||||
<Value Profile="(Default)">0</Value>
|
|
||||||
</Setting>
|
|
||||||
<Setting Name="W2Left" Type="System.String" Scope="User">
|
|
||||||
<Value Profile="(Default)">0</Value>
|
|
||||||
</Setting>
|
|
||||||
<Setting Name="W2Top" Type="System.String" Scope="User">
|
|
||||||
<Value Profile="(Default)">0</Value>
|
|
||||||
</Setting>
|
|
||||||
<Setting Name="W3Left" Type="System.String" Scope="User">
|
|
||||||
<Value Profile="(Default)">0</Value>
|
|
||||||
</Setting>
|
|
||||||
<Setting Name="W3Top" Type="System.String" Scope="User">
|
|
||||||
<Value Profile="(Default)">0</Value>
|
|
||||||
</Setting>
|
</Setting>
|
||||||
</Settings>
|
</Settings>
|
||||||
</SettingsFile>
|
</SettingsFile>
|
||||||
|
Before Width: | Height: | Size: 3.3 KiB |
@ -101,7 +101,7 @@ namespace ENI2.Report
|
|||||||
string migraTempFile = string.Format("{1}\\{0}.mdddl", filenameCore, Path.GetDirectoryName(filename));
|
string migraTempFile = string.Format("{1}\\{0}.mdddl", filenameCore, Path.GetDirectoryName(filename));
|
||||||
MigraDoc.DocumentObjectModel.IO.DdlWriter.WriteToFile(document, migraTempFile);
|
MigraDoc.DocumentObjectModel.IO.DdlWriter.WriteToFile(document, migraTempFile);
|
||||||
|
|
||||||
PdfDocumentRenderer renderer = new PdfDocumentRenderer();
|
PdfDocumentRenderer renderer = new PdfDocumentRenderer(true);
|
||||||
renderer.Document = document;
|
renderer.Document = document;
|
||||||
renderer.RenderDocument();
|
renderer.RenderDocument();
|
||||||
|
|
||||||
@ -254,7 +254,7 @@ namespace ENI2.Report
|
|||||||
table.AddColumn(140);
|
table.AddColumn(140);
|
||||||
|
|
||||||
Row row = table.AddRow();
|
Row row = table.AddRow();
|
||||||
Image logoImage = row.Cells[0].AddImage(@"Report\Logo.png"); // kann man offenbar nur von einem Pfad laden
|
Image logoImage = row.Cells[0].AddImage(@"Report\Logo.gif"); // kann man offenbar nur von einem Pfad laden
|
||||||
logoImage.Width = 80;
|
logoImage.Width = 80;
|
||||||
row.Cells[0].MergeDown = 6;
|
row.Cells[0].MergeDown = 6;
|
||||||
|
|
||||||
@ -373,9 +373,9 @@ namespace ENI2.Report
|
|||||||
|
|
||||||
switch (message.MessageNotificationClass)
|
switch (message.MessageNotificationClass)
|
||||||
{
|
{
|
||||||
case Message.NotificationClass.CREWA:
|
case Message.NotificationClass.CREW:
|
||||||
case Message.NotificationClass.CREWD:
|
case Message.NotificationClass.CREWD:
|
||||||
case Message.NotificationClass.PASA:
|
case Message.NotificationClass.PAS:
|
||||||
case Message.NotificationClass.PASD:
|
case Message.NotificationClass.PASD:
|
||||||
case Message.NotificationClass.TOWA:
|
case Message.NotificationClass.TOWA:
|
||||||
case Message.NotificationClass.TOWD:
|
case Message.NotificationClass.TOWD:
|
||||||
@ -393,14 +393,7 @@ namespace ENI2.Report
|
|||||||
document.LastSection.AddPageBreak();
|
document.LastSection.AddPageBreak();
|
||||||
}
|
}
|
||||||
|
|
||||||
string title = messageParagraph.Title;
|
document.LastSection.AddParagraph(ReplaceTitle(messageParagraph.Title), "Heading2");
|
||||||
if (message.MessageNotificationClass == Message.NotificationClass.CREWA) title = "CREWA";
|
|
||||||
if (message.MessageNotificationClass == Message.NotificationClass.CREWD) title = "CREWD";
|
|
||||||
if (message.MessageNotificationClass == Message.NotificationClass.PASA) title = "PASA";
|
|
||||||
if (message.MessageNotificationClass == Message.NotificationClass.PASD) title = "PASD";
|
|
||||||
|
|
||||||
|
|
||||||
document.LastSection.AddParagraph(ReplaceTitle(title), "Heading2");
|
|
||||||
document.LastSection.AddParagraph(ReplaceTitle(messageParagraph.Subtitle), "Heading3");
|
document.LastSection.AddParagraph(ReplaceTitle(messageParagraph.Subtitle), "Heading3");
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -425,11 +418,11 @@ namespace ENI2.Report
|
|||||||
|
|
||||||
switch(message.MessageNotificationClass)
|
switch(message.MessageNotificationClass)
|
||||||
{
|
{
|
||||||
case Message.NotificationClass.CREWA:
|
case Message.NotificationClass.CREW:
|
||||||
case Message.NotificationClass.CREWD:
|
case Message.NotificationClass.CREWD:
|
||||||
CreateCrewTable(document, message);
|
CreateCrewTable(document, message);
|
||||||
return;
|
return;
|
||||||
case Message.NotificationClass.PASA:
|
case Message.NotificationClass.PAS:
|
||||||
case Message.NotificationClass.PASD:
|
case Message.NotificationClass.PASD:
|
||||||
CreatePassengerTable(document, message);
|
CreatePassengerTable(document, message);
|
||||||
return;
|
return;
|
||||||
@ -526,27 +519,13 @@ namespace ENI2.Report
|
|||||||
#region CREW
|
#region CREW
|
||||||
private static void CreateCrewTable(Document document, Message message)
|
private static void CreateCrewTable(Document document, Message message)
|
||||||
{
|
{
|
||||||
string textSchengen = "[ ] Schengen";
|
|
||||||
|
|
||||||
if(message.Elements.Count > 0)
|
|
||||||
{
|
|
||||||
CREW firstCREW = message.Elements[0] as CREW;
|
|
||||||
if(firstCREW.NotificationSchengen ?? false)
|
|
||||||
{
|
|
||||||
textSchengen = "[X] Schengen";
|
|
||||||
}
|
|
||||||
|
|
||||||
document.LastSection.AddParagraph(firstCREW.NotificationPAX ?? false ? "[X] PAX notification" : "[ ] PAX notification");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Table table = AddGrayTable(document);
|
Table table = AddGrayTable(document);
|
||||||
table.Format.Font.Size = 8;
|
table.Format.Font.Size = 9;
|
||||||
|
|
||||||
// width: 25
|
|
||||||
|
|
||||||
Column column = table.AddColumn();
|
Column column = table.AddColumn();
|
||||||
column.Width = Unit.FromCentimeter(0.75);
|
column.Width = Unit.FromCentimeter(1);
|
||||||
|
column = table.AddColumn();
|
||||||
|
column.Width = Unit.FromCentimeter(3);
|
||||||
column = table.AddColumn();
|
column = table.AddColumn();
|
||||||
column.Width = Unit.FromCentimeter(3);
|
column.Width = Unit.FromCentimeter(3);
|
||||||
column = table.AddColumn();
|
column = table.AddColumn();
|
||||||
@ -554,28 +533,17 @@ namespace ENI2.Report
|
|||||||
column = table.AddColumn();
|
column = table.AddColumn();
|
||||||
column.Width = Unit.FromCentimeter(2.5);
|
column.Width = Unit.FromCentimeter(2.5);
|
||||||
column = table.AddColumn();
|
column = table.AddColumn();
|
||||||
column.Width = Unit.FromCentimeter(2);
|
|
||||||
column = table.AddColumn();
|
|
||||||
column.Width = Unit.FromCentimeter(1.5);
|
column.Width = Unit.FromCentimeter(1.5);
|
||||||
column = table.AddColumn();
|
column = table.AddColumn();
|
||||||
column.Width = Unit.FromCentimeter(0.75);
|
column.Width = Unit.FromCentimeter(1);
|
||||||
column = table.AddColumn();
|
column = table.AddColumn();
|
||||||
column.Width = Unit.FromCentimeter(2);
|
column.Width = Unit.FromCentimeter(2);
|
||||||
column = table.AddColumn();
|
column = table.AddColumn();
|
||||||
column.Width = Unit.FromCentimeter(2);
|
column.Width = Unit.FromCentimeter(3);
|
||||||
column = table.AddColumn();
|
|
||||||
column.Width = Unit.FromCentimeter(1.5);
|
|
||||||
column = table.AddColumn();
|
column = table.AddColumn();
|
||||||
column.Width = Unit.FromCentimeter(2);
|
column.Width = Unit.FromCentimeter(2);
|
||||||
column = table.AddColumn();
|
column = table.AddColumn();
|
||||||
column.Width = Unit.FromCentimeter(2);
|
column.Width = Unit.FromCentimeter(3);
|
||||||
column = table.AddColumn();
|
|
||||||
column.Width = Unit.FromCentimeter(2);
|
|
||||||
|
|
||||||
Row firstRow = table.AddRow();
|
|
||||||
firstRow.Cells[7].AddParagraph(textSchengen);
|
|
||||||
firstRow.Cells[7].Shading.Color = Colors.LightGray;
|
|
||||||
firstRow.Cells[7].MergeRight = 5;
|
|
||||||
|
|
||||||
Row hRow = table.AddRow();
|
Row hRow = table.AddRow();
|
||||||
hRow.Cells[1].AddParagraph("Last name");
|
hRow.Cells[1].AddParagraph("Last name");
|
||||||
@ -586,16 +554,13 @@ namespace ENI2.Report
|
|||||||
hRow.Cells[6].AddParagraph("Nat.");
|
hRow.Cells[6].AddParagraph("Nat.");
|
||||||
hRow.Cells[7].AddParagraph("Id doc. type");
|
hRow.Cells[7].AddParagraph("Id doc. type");
|
||||||
hRow.Cells[8].AddParagraph("Id doc. number");
|
hRow.Cells[8].AddParagraph("Id doc. number");
|
||||||
hRow.Cells[9].AddParagraph("Iss. state");
|
hRow.Cells[9].AddParagraph("Visa number");
|
||||||
hRow.Cells[10].AddParagraph("Exp. date");
|
hRow.Cells[10].AddParagraph("Duty");
|
||||||
hRow.Cells[11].AddParagraph("Visa number");
|
|
||||||
hRow.Cells[12].AddParagraph("Duty");
|
|
||||||
|
|
||||||
for (int i = 0; i < message.Elements.Count; i++)
|
for (int i = 0; i < message.Elements.Count; i++)
|
||||||
{
|
{
|
||||||
CREW crew = message.Elements[i] as CREW;
|
CREW crew = message.Elements[i] as CREW;
|
||||||
Row row = table.AddRow();
|
Row row = table.AddRow();
|
||||||
|
|
||||||
row.Cells[0].AddParagraph((i + 1).ToString());
|
row.Cells[0].AddParagraph((i + 1).ToString());
|
||||||
row.Cells[1].AddParagraph(crew.CrewMemberLastName ?? "");
|
row.Cells[1].AddParagraph(crew.CrewMemberLastName ?? "");
|
||||||
row.Cells[2].AddParagraph(crew.CrewMemberFirstName ?? "");
|
row.Cells[2].AddParagraph(crew.CrewMemberFirstName ?? "");
|
||||||
@ -605,10 +570,8 @@ namespace ENI2.Report
|
|||||||
row.Cells[6].AddParagraph(crew.CrewMemberNationality ?? "");
|
row.Cells[6].AddParagraph(crew.CrewMemberNationality ?? "");
|
||||||
row.Cells[7].AddParagraph(crew.CrewMemberIdentityDocumentTypeDisplay);
|
row.Cells[7].AddParagraph(crew.CrewMemberIdentityDocumentTypeDisplay);
|
||||||
row.Cells[8].AddParagraph(crew.CrewMemberIdentityDocumentId ?? "");
|
row.Cells[8].AddParagraph(crew.CrewMemberIdentityDocumentId ?? "");
|
||||||
row.Cells[9].AddParagraph(crew.CrewMemberIdentityDocumentIssuingState ?? "");
|
row.Cells[9].AddParagraph(crew.CrewMemberVisaNumber ?? "");
|
||||||
row.Cells[10].AddParagraph(crew.CrewMemberIdentityDocumentExpiryDateDisplay ?? "");
|
row.Cells[10].AddParagraph(crew.CrewMemberDuty ?? "");
|
||||||
row.Cells[11].AddParagraph(crew.CrewMemberVisaNumber ?? "");
|
|
||||||
row.Cells[12].AddParagraph(crew.CrewMemberDuty ?? "");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@ -616,36 +579,17 @@ namespace ENI2.Report
|
|||||||
#region PAS
|
#region PAS
|
||||||
private static void CreatePassengerTable(Document document, Message message)
|
private static void CreatePassengerTable(Document document, Message message)
|
||||||
{
|
{
|
||||||
string textSchengen = "[ ] Schengen";
|
|
||||||
string textPAX = "[ ] PAX";
|
|
||||||
|
|
||||||
if (message.Elements.Count > 0)
|
|
||||||
{
|
|
||||||
PAS firstPAS = message.Elements[0] as PAS;
|
|
||||||
if (firstPAS.NotificationSchengen ?? false)
|
|
||||||
textSchengen = "[X] Schengen";
|
|
||||||
if (firstPAS.NotificationPAX ?? false)
|
|
||||||
textPAX = "[X] PAX";
|
|
||||||
}
|
|
||||||
|
|
||||||
Table table = AddGrayTable(document);
|
Table table = AddGrayTable(document);
|
||||||
table.Format.Font.Size = 7;
|
table.Format.Font.Size = 9;
|
||||||
|
|
||||||
|
|
||||||
Column column = table.AddColumn();
|
Column column = table.AddColumn();
|
||||||
column.Width = Unit.FromCentimeter(0.8);
|
column.Width = Unit.FromCentimeter(0.8);
|
||||||
column = table.AddColumn();
|
column = table.AddColumn();
|
||||||
column.Width = Unit.FromCentimeter(2);
|
column.Width = Unit.FromCentimeter(3);
|
||||||
column = table.AddColumn();
|
column = table.AddColumn();
|
||||||
column.Width = Unit.FromCentimeter(2);
|
column.Width = Unit.FromCentimeter(3);
|
||||||
column = table.AddColumn();
|
column = table.AddColumn();
|
||||||
column.Width = Unit.FromCentimeter(2);
|
column.Width = Unit.FromCentimeter(3);
|
||||||
column = table.AddColumn();
|
|
||||||
column.Width = Unit.FromCentimeter(2);
|
|
||||||
column = table.AddColumn();
|
|
||||||
column.Width = Unit.FromCentimeter(1.2);
|
|
||||||
column = table.AddColumn();
|
|
||||||
column.Width = Unit.FromCentimeter(1);
|
|
||||||
column = table.AddColumn();
|
column = table.AddColumn();
|
||||||
column.Width = Unit.FromCentimeter(2);
|
column.Width = Unit.FromCentimeter(2);
|
||||||
column = table.AddColumn();
|
column = table.AddColumn();
|
||||||
@ -655,24 +599,15 @@ namespace ENI2.Report
|
|||||||
column = table.AddColumn();
|
column = table.AddColumn();
|
||||||
column.Width = Unit.FromCentimeter(2);
|
column.Width = Unit.FromCentimeter(2);
|
||||||
column = table.AddColumn();
|
column = table.AddColumn();
|
||||||
column.Width = Unit.FromCentimeter(1.5);
|
column.Width = Unit.FromCentimeter(3);
|
||||||
|
column = table.AddColumn();
|
||||||
|
column.Width = Unit.FromCentimeter(1.8);
|
||||||
column = table.AddColumn();
|
column = table.AddColumn();
|
||||||
column.Width = Unit.FromCentimeter(1.5);
|
column.Width = Unit.FromCentimeter(1.5);
|
||||||
column = table.AddColumn();
|
column = table.AddColumn();
|
||||||
column.Width = Unit.FromCentimeter(1.5);
|
column.Width = Unit.FromCentimeter(1.5);
|
||||||
column = table.AddColumn();
|
column = table.AddColumn();
|
||||||
column.Width = Unit.FromCentimeter(0.5);
|
column.Width = Unit.FromCentimeter(0.5);
|
||||||
column = table.AddColumn();
|
|
||||||
column.Width = Unit.FromCentimeter(1.5);
|
|
||||||
column = table.AddColumn();
|
|
||||||
column.Width = Unit.FromCentimeter(1.5);
|
|
||||||
|
|
||||||
Row h1Row = table.AddRow();
|
|
||||||
h1Row.Cells[7].AddParagraph(textSchengen);
|
|
||||||
h1Row.Cells[7].MergeRight = 7;
|
|
||||||
h1Row.Cells[7].Shading.Color = Colors.LightGray;
|
|
||||||
h1Row.Cells[15].AddParagraph(textPAX);
|
|
||||||
h1Row.Cells[15].MergeRight = 1;
|
|
||||||
|
|
||||||
Row hRow = table.AddRow();
|
Row hRow = table.AddRow();
|
||||||
hRow.Cells[1].AddParagraph("Last name");
|
hRow.Cells[1].AddParagraph("Last name");
|
||||||
@ -683,14 +618,10 @@ namespace ENI2.Report
|
|||||||
hRow.Cells[6].AddParagraph("Nat.");
|
hRow.Cells[6].AddParagraph("Nat.");
|
||||||
hRow.Cells[7].AddParagraph("Id doc. type");
|
hRow.Cells[7].AddParagraph("Id doc. type");
|
||||||
hRow.Cells[8].AddParagraph("Id doc. number");
|
hRow.Cells[8].AddParagraph("Id doc. number");
|
||||||
hRow.Cells[9].AddParagraph("Iss. state");
|
hRow.Cells[9].AddParagraph("Visa number");
|
||||||
hRow.Cells[10].AddParagraph("Exp. date");
|
hRow.Cells[10].AddParagraph("Emb.");
|
||||||
hRow.Cells[11].AddParagraph("Visa number");
|
hRow.Cells[11].AddParagraph("Disemb.");
|
||||||
hRow.Cells[12].AddParagraph("Emb.");
|
hRow.Cells[12].AddParagraph("T");
|
||||||
hRow.Cells[13].AddParagraph("Disemb.");
|
|
||||||
hRow.Cells[14].AddParagraph("T");
|
|
||||||
hRow.Cells[15].AddParagraph("Em. care");
|
|
||||||
hRow.Cells[16].AddParagraph("Em. number");
|
|
||||||
|
|
||||||
for (int i = 0; i < message.Elements.Count; i++)
|
for (int i = 0; i < message.Elements.Count; i++)
|
||||||
{
|
{
|
||||||
@ -705,14 +636,10 @@ namespace ENI2.Report
|
|||||||
row.Cells[6].AddParagraph(pas.PassengerNationality ?? "");
|
row.Cells[6].AddParagraph(pas.PassengerNationality ?? "");
|
||||||
row.Cells[7].AddParagraph(pas.PassengerIdentityDocumentTypeDisplay);
|
row.Cells[7].AddParagraph(pas.PassengerIdentityDocumentTypeDisplay);
|
||||||
row.Cells[8].AddParagraph(pas.PassengerIdentityDocumentId ?? "");
|
row.Cells[8].AddParagraph(pas.PassengerIdentityDocumentId ?? "");
|
||||||
row.Cells[9].AddParagraph(pas.PassengerIdentityDocumentIssuingState ?? "");
|
row.Cells[9].AddParagraph(pas.PassengerVisaNumber ?? "");
|
||||||
row.Cells[10].AddParagraph(pas.PassengerIdentityDocumentExpiryDateDisplay);
|
row.Cells[10].AddParagraph(pas.PassengerPortOfEmbarkation ?? "");
|
||||||
row.Cells[11].AddParagraph(pas.PassengerVisaNumber ?? "");
|
row.Cells[11].AddParagraph(pas.PassengerPortOfDisembarkation ?? "");
|
||||||
row.Cells[12].AddParagraph(pas.PassengerPortOfEmbarkation ?? "");
|
row.Cells[12].AddParagraph(pas.PassengerInTransit ?? false ? "X" : "");
|
||||||
row.Cells[13].AddParagraph(pas.PassengerPortOfDisembarkation ?? "");
|
|
||||||
row.Cells[14].AddParagraph(pas.PassengerInTransit ?? false ? "X" : "");
|
|
||||||
row.Cells[15].AddParagraph(pas.EmergencyCare ?? "");
|
|
||||||
row.Cells[16].AddParagraph(pas.EmergencyContactNumber ?? "");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@ -1250,9 +1177,8 @@ namespace ENI2.Report
|
|||||||
|
|
||||||
private static void CreateWAS_RCPTTable(Document document, Message message)
|
private static void CreateWAS_RCPTTable(Document document, Message message)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < message.Elements.Count; i++)
|
foreach (WAS_RCPT was_rpct in message.Elements)
|
||||||
{
|
{
|
||||||
WAS_RCPT was_rpct = (WAS_RCPT)message.Elements[i];
|
|
||||||
document.LastSection.AddParagraph("");
|
document.LastSection.AddParagraph("");
|
||||||
|
|
||||||
Table table = AddGrayTable(document);
|
Table table = AddGrayTable(document);
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
@ -1,46 +0,0 @@
|
|||||||
<src:DetailBaseControl xmlns:src="clr-namespace:ENI2"
|
|
||||||
x:Class="ENI2.SheetDisplayControls.ATAControl"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:p="clr-namespace:ENI2.Properties"
|
|
||||||
xmlns:enictrl="clr-namespace:ENI2.Controls"
|
|
||||||
xmlns:util="clr-namespace:ENI2.Util"
|
|
||||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
|
||||||
xmlns:local="clr-namespace:ENI2.SheetDisplayControls"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
d:DesignHeight="600" d:DesignWidth="800">
|
|
||||||
<GroupBox Name="portCallGroupBox" Header="{x:Static p:Resources.text12ATAATD}">
|
|
||||||
<ScrollViewer PreviewMouseWheel="ScrollViewer_PreviewMouseWheel">
|
|
||||||
<Grid>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="50"/>
|
|
||||||
<ColumnDefinition Width=".3*" />
|
|
||||||
<ColumnDefinition Width=".3*" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="36" />
|
|
||||||
<RowDefinition Height="28" />
|
|
||||||
<RowDefinition Height="36" />
|
|
||||||
<RowDefinition Height="28" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<TextBlock FontSize="18" VerticalAlignment="Bottom" Text="{x:Static p:Resources.text121ATA}" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"/>
|
|
||||||
<Label Content="ATA" Grid.Column="0" Grid.Row="1" HorizontalContentAlignment="Right" Margin="0,0,10,0"/>
|
|
||||||
<xctk:DateTimePicker Grid.Column="1" Grid.Row="1" Value="{Binding ATAPortOfCall, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePickerATA" Format="Custom"
|
|
||||||
FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}"
|
|
||||||
TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00" PreviewKeyUp="DateTimePicker_PreviewKeyUp" ValueChanged="dateTimePickerATA_ValueChanged" />
|
|
||||||
|
|
||||||
|
|
||||||
<TextBlock FontSize="18" VerticalAlignment="Bottom" Text="{x:Static p:Resources.text122ATD}" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2"/>
|
|
||||||
|
|
||||||
<Label Content="ATD" Grid.Column="0" Grid.Row="3" HorizontalContentAlignment="Right" Margin="0,0,10,0"/>
|
|
||||||
<xctk:DateTimePicker Grid.Column="1" Grid.Row="3" Value="{Binding ATDPortOfCall, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePickerATD" Format="Custom"
|
|
||||||
FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}"
|
|
||||||
TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00" PreviewKeyUp="DateTimePicker_PreviewKeyUp" ValueChanged="dateTimePickerATD_ValueChanged"/>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
</ScrollViewer>
|
|
||||||
</GroupBox>
|
|
||||||
</src:DetailBaseControl>
|
|
||||||