merged release v7.5

This commit is contained in:
Daniel Schick 2022-10-27 12:08:25 +02:00
commit de795c12f1
51 changed files with 1769 additions and 317 deletions

View File

@ -53,7 +53,19 @@ namespace ENI2.Controls
public bool AddVisible public bool AddVisible
{ {
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 { var addButton = (Button)Template.FindName("buttonAdd", this); addButton.Visibility = value ? Visibility.Visible : Visibility.Hidden; } set
{
var addButton = (Button)Template.FindName("buttonAdd", this); addButton.Visibility = value ? Visibility.Visible : Visibility.Hidden;
var okButton = (Button)Template.FindName("buttonOK", this);
if (okButton.Visibility == Visibility.Hidden)
okButton.Width = 1; // we are in a DockPanel, try to collapse okButton to place addButton more to the right
}
}
public bool OkVisible
{
get { var okButton = (Button)Template.FindName("buttonOK", this); return okButton.Visibility == Visibility.Visible; }
set { var okButton = (Button)Template.FindName("buttonOK", this); okButton.Visibility = value ? Visibility.Visible : Visibility.Hidden; }
} }
private void Window_Closing(object sender, CancelEventArgs e) private void Window_Closing(object sender, CancelEventArgs e)

View File

@ -19,14 +19,25 @@ namespace ENI2.Controls
/// </summary> /// </summary>
public partial class LocodeControl : UserControl, INotifyPropertyChanged public partial class LocodeControl : UserControl, INotifyPropertyChanged
{ {
#region fields
private List<string> _locodeList = new List<string>(); private List<string> _locodeList = new List<string>();
public event PropertyChangedEventHandler PropertyChanged; public event PropertyChangedEventHandler PropertyChanged;
private bool _comboSelect; private bool _comboSelect;
#endregion
#region Construction
public LocodeControl() public LocodeControl()
{ {
InitializeComponent(); InitializeComponent();
} }
#endregion
#region Enums
protected enum LocodeState protected enum LocodeState
{ {
@ -36,6 +47,15 @@ namespace ENI2.Controls
AMBIGUOUS AMBIGUOUS
}; };
#endregion
public void SetFocus()
{
this.comboBoxLocode.Focus();
}
#region Properties
/// <summary> /// <summary>
/// used internally to load up drop down /// used internally to load up drop down
/// </summary> /// </summary>
@ -89,10 +109,10 @@ namespace ENI2.Controls
// MessageBox.Show(string.Format("CoerceValue is fired : Value {0}", Value)); // MessageBox.Show(string.Format("CoerceValue is fired : Value {0}", Value));
return Value; return Value;
} }
public RuleEngine.LocodeMode LocodeSource { get; set; } public RuleEngine.LocodeMode LocodeSource { get; set; }
#endregion
#region static methods #region static methods
public static readonly DependencyProperty LocodeValueProperty = DependencyProperty.Register("LocodeValue", typeof(string), typeof(LocodeControl), public static readonly DependencyProperty LocodeValueProperty = DependencyProperty.Register("LocodeValue", typeof(string), typeof(LocodeControl),
@ -220,6 +240,15 @@ namespace ENI2.Controls
this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("LocodeList")); this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("LocodeList"));
} }
private void comboBoxLocode_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e)
{
if ((e.Key == System.Windows.Input.Key.Down) && !this.comboBoxLocode.IsDropDownOpen)
{
this.comboBoxLocode.IsDropDownOpen = true;
e.Handled = true;
}
}
#endregion #endregion
#region private/protected methods #region private/protected methods
@ -245,14 +274,6 @@ namespace ENI2.Controls
} }
#endregion #endregion
private void comboBoxLocode_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e)
{
if((e.Key == System.Windows.Input.Key.Down) && !this.comboBoxLocode.IsDropDownOpen)
{
this.comboBoxLocode.IsDropDownOpen = true;
e.Handled = true;
}
}
} }
} }

View File

@ -333,7 +333,7 @@ namespace ENI2
// Bearbeitungsinformationen für bestehende ID-Beantragung beibehalten, falls bereits vorhanden // Bearbeitungsinformationen für bestehende ID-Beantragung beibehalten, falls bereits vorhanden
if(existingCore.IsTransit && if(existingCore.IsTransit &&
(existingMessage.MessageNotificationClass == Message.NotificationClass.TRANSIT) && (existingMessage.MessageNotificationClass == Message.NotificationClass.TRANSIT) &&
(existingMessage.InternalStatus == Message.BSMDStatus.CONFIRMED)) (existingMessage.InternalStatus == Message.BSMDStatus.CONFIRMED))
{ {
@ -392,7 +392,7 @@ namespace ENI2
newMessage.MessageCoreId = newCore.Id; newMessage.MessageCoreId = newCore.Id;
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(newMessage); DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(newMessage);
newMessage.SaveElements(); newMessage.SaveElements();
} }
this.OnOpenNewCoreRequested(newCore); this.OnOpenNewCoreRequested(newCore);
} }

View File

@ -28,6 +28,7 @@
<RowDefinition Height="*" /> <RowDefinition Height="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Name="textBlockMessageClass" FontWeight="DemiBold" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center" /> <TextBlock Name="textBlockMessageClass" FontWeight="DemiBold" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center" />
<Button Content="{x:Static p:Resources.textNewDGItem}" Name="buttonNewItem" Margin="2" Click="buttonNewItem_Click" Grid.Row="0" Grid.Column="1" />
<Label Content="{x:Static p:Resources.textDangerousGoodsOnBoard}" Grid.Column="0" Grid.Row="1" HorizontalContentAlignment="Right" Margin="0,0,10,0"/> <Label Content="{x:Static p:Resources.textDangerousGoodsOnBoard}" Grid.Column="0" Grid.Row="1" HorizontalContentAlignment="Right" Margin="0,0,10,0"/>
<Label Content="{x:Static p:Resources.textVesselClass}" Grid.Column="0" Grid.Row="2" HorizontalContentAlignment="Right" Margin="0,0,10,0"/> <Label Content="{x:Static p:Resources.textVesselClass}" Grid.Column="0" Grid.Row="2" HorizontalContentAlignment="Right" Margin="0,0,10,0"/>
<Label Content="{x:Static p:Resources.textDGManifestOnBoard}" Grid.Column="2" Grid.Row="1" HorizontalContentAlignment="Right" Margin="0,0,10,0"/> <Label Content="{x:Static p:Resources.textDGManifestOnBoard}" Grid.Column="2" Grid.Row="1" HorizontalContentAlignment="Right" Margin="0,0,10,0"/>

View File

@ -22,18 +22,28 @@ namespace ENI2.DetailViewControls
public partial class DangerousGoodsDetailControl : DetailBaseControl public partial class DangerousGoodsDetailControl : DetailBaseControl
{ {
#region fields
private Message _hazaMessage; private Message _hazaMessage;
private Message _hazdMessage; private Message _hazdMessage;
private HAZ haza; private HAZ haza;
private HAZ hazd; private HAZ hazd;
private NewDGItemDialog newDGDialog = null;
#endregion
#region Construction
public DangerousGoodsDetailControl() public DangerousGoodsDetailControl()
{ {
InitializeComponent(); InitializeComponent();
this.Loaded += DangerousGoodsDetailControl_Loaded; this.Loaded += DangerousGoodsDetailControl_Loaded;
} }
#endregion
private void DangerousGoodsDetailControl_Loaded(object sender, RoutedEventArgs e) private void DangerousGoodsDetailControl_Loaded(object sender, RoutedEventArgs e)
{ {
this.RegisterCheckboxChange(this.checkBoxDangerousGoodsOnBoard, this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA); this.RegisterCheckboxChange(this.checkBoxDangerousGoodsOnBoard, this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
@ -799,5 +809,94 @@ namespace ENI2.DetailViewControls
#endregion #endregion
#region new sublist item button handler
private void buttonNewItem_Click(object sender, RoutedEventArgs e)
{
if (newDGDialog != null)
{
newDGDialog.Activate();
}
else
{
newDGDialog = new NewDGItemDialog();
newDGDialog.Closed += NewDGDialog_Closed;
newDGDialog.OKClicked += NewDGDialog_OKClicked;
newDGDialog.AddClicked += NewDGDialog_OKClicked;
newDGDialog.Show();
}
}
private void NewDGDialog_Closed(object sender, EventArgs e)
{
newDGDialog = null;
}
private void NewDGDialog_OKClicked()
{
HAZ haz = this.IsDeparture ? hazd : haza;
HAZPosTemplate selectedTemplate = this.newDGDialog.SelectedTemplate;
if (selectedTemplate != null)
{
// create new DG position based on template
switch (selectedTemplate.TemplateType)
{
case HAZPosTemplate.SublistType.IBC:
this.tabControlPositions.SelectedIndex = 1;
IBCPosition ibcPos = new IBCPosition();
ibcPos.FlashpointInformation = selectedTemplate.Flashpoint;
ibcPos.Flashpoint_CEL = selectedTemplate.FP_IBC;
ibcPos.SpecRef15_19 = selectedTemplate.SpecRef15_19;
ibcPos.Hazards = selectedTemplate.Hazard;
ibcPos.Identifier = DatabaseEntity.GetNewIdentifier(haz.IBCPositions, "IBC-");
ibcPos.PollutionCategory = selectedTemplate.PollutionCategory;
ibcPos.HAZ = haz;
haz.IBCPositions.Add(ibcPos);
this.dataGridIBCItems.Items.Refresh();
this.DataGridIBCItems_EditRequested(ibcPos);
break;
case HAZPosTemplate.SublistType.IGC:
this.tabControlPositions.SelectedIndex = 2;
IGCPosition igcPos = new IGCPosition();
igcPos.Identifier = DatabaseEntity.GetNewIdentifier(haz.IGCPositions, "IGC-");
igcPos.UNNumber = selectedTemplate.UNNr;
igcPos.IMOClass = selectedTemplate.IMOClass;
igcPos.HAZ = haz;
haz.IGCPositions.Add(igcPos);
this.dataGridIGCItems.Items.Refresh();
this.DataGridIGCItems_EditRequested(igcPos);
break;
case HAZPosTemplate.SublistType.IMSBC:
this.tabControlPositions.SelectedIndex = 3;
IMSBCPosition imsbcPos = new IMSBCPosition();
imsbcPos.Identifier = DatabaseEntity.GetNewIdentifier(haz.IMSBCPositions, "IMSBC-");
imsbcPos.IMOHazardClass = selectedTemplate.IMSBC_HAZ;
imsbcPos.UNNumber = selectedTemplate.UNNr;
imsbcPos.IMOClass = selectedTemplate.IMOClass;
imsbcPos.MHB = selectedTemplate.MHB ?? false;
imsbcPos.HAZ = haz;
haz.IMSBCPositions.Add(imsbcPos);
this.dataGridIMSBCItems.Items.Refresh();
this.DataGridIMSBCItems_EditRequested(imsbcPos);
break;
case HAZPosTemplate.SublistType.MARPOL:
this.tabControlPositions.SelectedIndex = 4;
MARPOL_Annex_I_Position marpolPos = new MARPOL_Annex_I_Position();
marpolPos.FlashpointInformation = selectedTemplate.Flashpoint;
marpolPos.Identifier = DatabaseEntity.GetNewIdentifier(haz.MARPOLPositions, "MARPOL-");
marpolPos.HAZ = haz;
haz.MARPOLPositions.Add(marpolPos);
this.dataGridMARPOLItems.Items.Refresh();
this.DataGridMARPOLItems_EditRequested(marpolPos);
break;
}
this.SetHAZGlobalFlags();
}
}
#endregion
} }
} }

View File

@ -72,7 +72,7 @@ namespace ENI2.DetailViewControls
this.textBoxENI.IsReadOnly = !iAmAdmin; this.textBoxENI.IsReadOnly = !iAmAdmin;
this.textBoxIMO.IsReadOnly = !iAmAdmin; this.textBoxIMO.IsReadOnly = !iAmAdmin;
this.locodePoC.IsEnabled = iAmAdmin; this.locodePoC.IsEnabled = iAmAdmin;
this.textBoxDisplayId.IsReadOnly = !iAmAdmin; this.textBoxDisplayId.IsReadOnly = !iAmAdmin;
this.textBoxENI.DataContext = this.Core; this.textBoxENI.DataContext = this.Core;
this.textBoxIMO.DataContext = this.Core; this.textBoxIMO.DataContext = this.Core;

View File

@ -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>2</ApplicationRevision> <ApplicationRevision>12</ApplicationRevision>
<ApplicationVersion>7.4.0.2</ApplicationVersion> <ApplicationVersion>7.5.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut> <CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted> <PublishWizardCompleted>true</PublishWizardCompleted>
@ -84,7 +84,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup /> <PropertyGroup />
<PropertyGroup> <PropertyGroup>
<ManifestCertificateThumbprint>62DE8527C377957850DB503DA52FF66F664BD459</ManifestCertificateThumbprint> <ManifestCertificateThumbprint>F2C2D0164244EC89955EF50201EE24C2A300FF0B</ManifestCertificateThumbprint>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<SignManifests>true</SignManifests> <SignManifests>true</SignManifests>
@ -237,6 +237,12 @@
<Compile Include="EditControls\EditWasteReceivedDialog.xaml.cs"> <Compile Include="EditControls\EditWasteReceivedDialog.xaml.cs">
<DependentUpon>EditWasteReceivedDialog.xaml</DependentUpon> <DependentUpon>EditWasteReceivedDialog.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="EditControls\FixImportDialog.xaml.cs">
<DependentUpon>FixImportDialog.xaml</DependentUpon>
</Compile>
<Compile Include="EditControls\NewDGItemDialog.xaml.cs">
<DependentUpon>NewDGItemDialog.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" />
@ -644,6 +650,10 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="EditControls\FixImportDialog.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="EditControls\MessageHistoryDialog.xaml"> <Page Include="EditControls\MessageHistoryDialog.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
@ -652,6 +662,10 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="EditControls\NewDGItemDialog.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="EditControls\NewWithIdDialog.xaml"> <Page Include="EditControls\NewWithIdDialog.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>

View File

@ -3,9 +3,12 @@
// //
using bsmd.database; using bsmd.database;
using Microsoft.Win32;
using System; using System;
using System.Diagnostics; using System.Diagnostics;
using System.IO; using System.IO;
using System.Net;
using System.Net.Http;
using System.Windows; using System.Windows;
namespace ENI2.EditControls namespace ENI2.EditControls
@ -28,61 +31,118 @@ namespace ENI2.EditControls
#region Drag&Drop event handler #region Drag&Drop event handler
private void imageSource_Drop(object sender, DragEventArgs e) private async void imageSource_Drop(object sender, DragEventArgs e)
{ {
string[] files = (string[]) e.Data.GetData(DataFormats.FileDrop); string[] files = (string[]) e.Data.GetData(DataFormats.FileDrop);
foreach (string file in files) if (files != null)
Console.WriteLine(file);
if(files.Length > 0)
{ {
if(File.Exists(files[0])) foreach (string file in files)
Console.WriteLine(file);
if (files.Length > 0)
{ {
if(files[0].EndsWith("xls") || files[0].EndsWith("xlsx")) if (File.Exists(files[0]))
{ {
_sourcePath = files[0]; if (files[0].EndsWith("xls") || files[0].EndsWith("xlsx"))
textBoxSource.Text = _sourcePath; {
_sourcePath = files[0];
textBoxSource.Text = _sourcePath;
}
else
{
textBoxSource.Text = null;
_sourcePath = null;
}
} }
else else
{ {
textBoxSource.Text = null; textBoxSource.Text = null;
_sourcePath = null; _sourcePath = null;
} }
} EnableCompareButton();
else }
{ }
textBoxSource.Text = null; else
_sourcePath = null; {
string link = (string)e.Data.GetData(DataFormats.Text);
if(link != null)
{
using (var client = new WebClient())
{
string fileName = Path.GetTempPath() + Guid.NewGuid().ToString() + ".xlsx";
client.DownloadFile(link, fileName);
}
/*
// check if it is really an url, try to download the file and open it
if (Uri.TryCreate(link, UriKind.Absolute, out Uri uri))
{
HttpClient client = new HttpClient();
var response = await client.GetAsync(uri);
string fileName = Path.GetTempPath() + Guid.NewGuid().ToString() + ".xlsx";
using (var fs = new FileStream(fileName, FileMode.CreateNew))
{
await response.Content.CopyToAsync(fs);
textBoxSource.Text = link;
_sourcePath = fileName;
EnableCompareButton();
}
}
*/
} }
EnableCompareButton();
} }
} }
private void imageTarget_Drop(object sender, DragEventArgs e) private async void imageTarget_Drop(object sender, DragEventArgs e)
{ {
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop); string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
foreach (string file in files) if (files != null)
Console.WriteLine(file);
if (files.Length > 0)
{ {
if (File.Exists(files[0])) foreach (string file in files)
Console.WriteLine(file);
if (files.Length > 0)
{ {
if (files[0].EndsWith("xls") || files[0].EndsWith("xlsx")) if (File.Exists(files[0]))
{ {
_targetPath = files[0]; if (files[0].EndsWith("xls") || files[0].EndsWith("xlsx"))
textBoxTarget.Text = _targetPath; {
_targetPath = files[0];
textBoxTarget.Text = _targetPath;
}
else
{
_targetPath = null;
textBoxTarget.Text = null;
}
} }
else else
{ {
_targetPath = null; _targetPath = null;
textBoxTarget.Text = null; textBoxTarget.Text = null;
} }
EnableCompareButton();
} }
else }
else
{
string link = (string)e.Data.GetData(DataFormats.Text);
if (link != null)
{ {
_targetPath = null; // check if it is really an url, try to download the file and open it
textBoxTarget.Text = null; if (Uri.TryCreate(link, UriKind.Absolute, out Uri uri))
{
HttpClient client = new HttpClient();
var response = await client.GetAsync(uri);
string fileName = Path.GetTempPath() + Guid.NewGuid().ToString() + ".xlsx";
using (var fs = new FileStream(fileName, FileMode.CreateNew))
{
await response.Content.CopyToAsync(fs);
textBoxTarget.Text = link;
_targetPath = fileName;
EnableCompareButton();
}
}
} }
EnableCompareButton();
} }
} }
@ -115,15 +175,26 @@ namespace ENI2.EditControls
private void buttonCompare_Click(object sender, RoutedEventArgs e) private void buttonCompare_Click(object sender, RoutedEventArgs e)
{ {
Util.UIHelper.SetBusyState(); Util.UIHelper.SetBusyState();
string resultPath = Excel.ExcelComparer.Compare(_sourcePath, _targetPath, out string errorMessage);
if(!errorMessage.IsNullOrEmpty()) { string defaultName = string.Format("{0}.xlsx", Guid.NewGuid().ToString());
MessageBox.Show(errorMessage, "Comparison error", MessageBoxButton.OK, MessageBoxImage.Warning); SaveFileDialog sfd = new SaveFileDialog
}
if(File.Exists(resultPath))
{ {
if(new FileInfo(resultPath).Length > 0) Filter = "Excel Files|*.xls;*.xlsx",
FileName = defaultName
};
if (sfd.ShowDialog() ?? false)
{
string resultPath = Excel.ExcelComparer.Compare(_sourcePath, _targetPath, sfd.FileName, out string errorMessage);
if (!errorMessage.IsNullOrEmpty()) {
MessageBox.Show(errorMessage, "Comparison error", MessageBoxButton.OK, MessageBoxImage.Warning);
}
if (File.Exists(resultPath))
{ {
Process.Start(resultPath); if (new FileInfo(resultPath).Length > 0)
{
Process.Start(resultPath);
}
} }
} }

View File

@ -23,7 +23,7 @@ namespace ENI2.EditControls
{ {
InitializeComponent(); InitializeComponent();
Loaded += CopyDeclarationDialog_Loaded; Loaded += CopyDeclarationDialog_Loaded;
} }
#region Properties #region Properties

View File

@ -43,7 +43,7 @@
<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"/>
<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" ContextMenu="{DynamicResource ClearContextMenu}"/> <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}"/> <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">
@ -52,7 +52,7 @@
<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="1" Name="comboBoxIdDocType" Margin="2" 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}"/>--> <!-- <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"/> <TextBox Grid.Row="5" Grid.Column="1" Width="auto" Name="textBoxVisaNumber" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>

View File

@ -30,19 +30,14 @@ namespace ENI2.EditControls
this.textBoxDuty.Text = this.CREW.CrewMemberDuty; this.textBoxDuty.Text = this.CREW.CrewMemberDuty;
this.textBoxLastName.Text = this.CREW.CrewMemberLastName; this.textBoxLastName.Text = this.CREW.CrewMemberLastName;
this.textBoxFirstName.Text = this.CREW.CrewMemberFirstName; this.textBoxFirstName.Text = this.CREW.CrewMemberFirstName;
this.comboBoxGender.ItemsSource = GlobalStructures.GenderList; this.comboBoxGender.ItemsSource = GlobalStructures.GenderDict;
//this.comboBoxGender.KeyUp += ComboBox_KeyUp; this.comboBoxGender.SelectedValue = (this.CREW.CrewMemberGender == null) ? null : this.CREW.CrewMemberGender.ToString();
this.comboBoxGender.SelectedIndex = this.CREW.CrewMemberGender ?? -1;
if (this.CREW.CrewMemberGender == 9)
this.comboBoxGender.SelectedIndex = 3;
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.KeyUp += ComboBox_KeyUp;
this.comboBoxNationality.SelectedValue = this.CREW.CrewMemberNationality; this.comboBoxNationality.SelectedValue = this.CREW.CrewMemberNationality;
this.datePickerDateOfBirth.SelectedDate = this.CREW.CrewMemberDateOfBirth; this.datePickerDateOfBirth.SelectedDate = this.CREW.CrewMemberDateOfBirth;
this.comboBoxIdDocType.ItemsSource = GlobalStructures.IDDocTypeList; this.comboBoxIdDocType.ItemsSource = GlobalStructures.IDDocTypeDict;
//this.comboBoxIdDocType.KeyUp += ComboBox_KeyUp; this.comboBoxIdDocType.SelectedValue = (this.CREW.CrewMemberIdentityDocumentType == null) ? null : this.CREW.CrewMemberIdentityDocumentType.ToString();
this.comboBoxIdDocType.SelectedIndex = this.CREW.CrewMemberIdentityDocumentType ?? -1;
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;
@ -62,15 +57,14 @@ namespace ENI2.EditControls
this.CREW.CrewMemberDuty = this.textBoxDuty.Text.Trim(); this.CREW.CrewMemberDuty = this.textBoxDuty.Text.Trim();
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?) this.comboBoxGender.SelectedIndex; this.CREW.CrewMemberGender = (this.comboBoxGender.SelectedIndex == -1) ? null : (byte?) byte.Parse((string) this.comboBoxGender.SelectedValue);
if (this.CREW.CrewMemberGender == 3) this.CREW.CrewMemberGender = 9;
this.CREW.CrewMemberPlaceOfBirth = this.textBoxPlaceOfBirth.Text.Trim(); this.CREW.CrewMemberPlaceOfBirth = this.textBoxPlaceOfBirth.Text.Trim();
this.CREW.CrewMemberNationality = (this.comboBoxNationality.SelectedValue == null) ? "" : (string)this.comboBoxNationality.SelectedValue; this.CREW.CrewMemberNationality = (this.comboBoxNationality.SelectedValue == null) ? "" : (string) this.comboBoxNationality.SelectedValue;
this.CREW.CrewMemberDateOfBirth = this.datePickerDateOfBirth.SelectedDate; this.CREW.CrewMemberDateOfBirth = this.datePickerDateOfBirth.SelectedDate;
this.CREW.CrewMemberIdentityDocumentType = (this.comboBoxIdDocType.SelectedIndex == -1) ? null : (byte?)this.comboBoxIdDocType.SelectedIndex; this.CREW.CrewMemberIdentityDocumentType = (this.comboBoxIdDocType.SelectedIndex == -1) ? null : (byte?) byte.Parse((string)this.comboBoxIdDocType.SelectedValue);
this.CREW.CrewMemberIdentityDocumentId = this.textBoxIdDocNumber.Text.Trim(); this.CREW.CrewMemberIdentityDocumentId = this.textBoxIdDocNumber.Text.Trim();
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();

View File

@ -47,7 +47,7 @@ namespace ENI2.EditControls
this.OKClicked += EditIMSBCDialog_OKClicked; this.OKClicked += EditIMSBCDialog_OKClicked;
this.AddVisible = true; this.AddVisible = true;
} }
public void CopyValuesToEntity() public void CopyValuesToEntity()
{ {

View File

@ -47,7 +47,7 @@
<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" />
<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" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True"/> <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" /> <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">
@ -56,7 +56,7 @@
<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="1" Name="comboBoxIdDocType" Margin="2" 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" />--> <!--<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" /> <TextBox Grid.Row="4" Grid.Column="1" Width="auto" Name="textBoxVisaNumber" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />

View File

@ -29,19 +29,14 @@ namespace ENI2.EditControls
// copy into fields // copy into fields
this.textBoxLastName.Text = this.PAS.PassengerLastName; this.textBoxLastName.Text = this.PAS.PassengerLastName;
this.textBoxFirstName.Text = this.PAS.PassengerFirstName; this.textBoxFirstName.Text = this.PAS.PassengerFirstName;
this.comboBoxGender.ItemsSource = GlobalStructures.GenderList; this.comboBoxGender.ItemsSource = GlobalStructures.GenderDict;
//this.comboBoxGender.KeyUp += ComboBox_KeyUp; this.comboBoxGender.SelectedValue = this.PAS.PassengerGender ?? -1;
this.comboBoxGender.SelectedIndex = this.PAS.PassengerGender ?? -1;
if (this.PAS.PassengerGender == 9)
this.comboBoxGender.SelectedIndex = 3;
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.KeyUp += ComboBox_KeyUp;
this.comboBoxNationality.SelectedValue = this.PAS.PassengerNationality; this.comboBoxNationality.SelectedValue = this.PAS.PassengerNationality;
this.datePickerDateOfBirth.SelectedDate = this.PAS.PassengerDateOfBirth; this.datePickerDateOfBirth.SelectedDate = this.PAS.PassengerDateOfBirth;
this.comboBoxIdDocType.ItemsSource = GlobalStructures.IDDocTypeList; this.comboBoxIdDocType.ItemsSource = GlobalStructures.IDDocTypeDict;
//this.comboBoxIdDocType.KeyUp += ComboBox_KeyUp; this.comboBoxIdDocType.SelectedValue = this.PAS.PassengerIdentityDocumentType ?? null;
this.comboBoxIdDocType.SelectedIndex = this.PAS.PassengerIdentityDocumentType ?? -1;
this.textBoxIdDocNumber.Text = this.PAS.PassengerIdentityDocumentId; this.textBoxIdDocNumber.Text = this.PAS.PassengerIdentityDocumentId;
this.textBoxVisaNumber.Text = this.PAS.PassengerVisaNumber; this.textBoxVisaNumber.Text = this.PAS.PassengerVisaNumber;
this.locodePortOfEmbarkation.LocodeValue = this.PAS.PassengerPortOfEmbarkation; this.locodePortOfEmbarkation.LocodeValue = this.PAS.PassengerPortOfEmbarkation;
@ -66,13 +61,11 @@ namespace ENI2.EditControls
// copy back // copy back
this.PAS.PassengerLastName = this.textBoxLastName.Text.Trim(); this.PAS.PassengerLastName = this.textBoxLastName.Text.Trim();
this.PAS.PassengerFirstName = this.textBoxFirstName.Text.Trim(); this.PAS.PassengerFirstName = this.textBoxFirstName.Text.Trim();
this.PAS.PassengerGender = (this.comboBoxGender.SelectedIndex == -1) ? null : (byte?)this.comboBoxGender.SelectedIndex; this.PAS.PassengerGender = (this.comboBoxGender.SelectedIndex == -1) ? null : (byte?)byte.Parse((string)this.comboBoxGender.SelectedValue);
if (this.PAS.PassengerGender == 3)
this.PAS.PassengerGender = 9;
this.PAS.PassengerPlaceOfBirth = this.textBoxPlaceOfBirth.Text.Trim(); this.PAS.PassengerPlaceOfBirth = this.textBoxPlaceOfBirth.Text.Trim();
this.PAS.PassengerNationality = (this.comboBoxNationality.SelectedValue == null) ? "" : (string)this.comboBoxNationality.SelectedValue; this.PAS.PassengerNationality = (this.comboBoxNationality.SelectedValue == null) ? "" : (string)this.comboBoxNationality.SelectedValue;
this.PAS.PassengerDateOfBirth = this.datePickerDateOfBirth.SelectedDate; this.PAS.PassengerDateOfBirth = this.datePickerDateOfBirth.SelectedDate;
this.PAS.PassengerIdentityDocumentType = (this.comboBoxIdDocType.SelectedIndex == -1) ? null : (byte?)this.comboBoxIdDocType.SelectedIndex; this.PAS.PassengerIdentityDocumentType = (this.comboBoxIdDocType.SelectedIndex == -1) ? null : (byte?) byte.Parse((string)this.comboBoxIdDocType.SelectedValue);
this.PAS.PassengerIdentityDocumentId = this.textBoxIdDocNumber.Text.Trim(); this.PAS.PassengerIdentityDocumentId = this.textBoxIdDocNumber.Text.Trim();
this.PAS.PassengerVisaNumber = this.textBoxVisaNumber.Text.Trim(); this.PAS.PassengerVisaNumber = this.textBoxVisaNumber.Text.Trim();
this.PAS.PassengerPortOfEmbarkation = this.locodePortOfEmbarkation.LocodeValue; this.PAS.PassengerPortOfEmbarkation = this.locodePortOfEmbarkation.LocodeValue;

View File

@ -0,0 +1,31 @@
<enictrl:EditWindowBase x:Class="ENI2.EditControls.FixImportDialog"
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:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:local="clr-namespace:ENI2.EditControls"
mc:Ignorable="d"
Title="Fix imported value" Height="200" Width="500" WindowStyle="SingleBorderWindow" Background="AliceBlue" Loaded="EditWindowBase_Loaded">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
</Grid.RowDefinitions>
<Label Content="Type" Grid.Row="0" Grid.Column="0" Focusable="False" />
<Label Content="Value" Grid.Row="1" Grid.Column="0" Focusable="False" />
<Label Content="Selection" Grid.Row="2" Grid.Column="0" Focusable="False"/>
<TextBlock FontWeight="DemiBold" VerticalAlignment="Center" Name="textBlockType" Grid.Row="0" Grid.Column="1" Focusable="False">bla</TextBlock>
<TextBlock FontWeight="DemiBold" VerticalAlignment="Center" Name="textBlockValue" Grid.Row="1" Grid.Column="1" Focusable="False">bla</TextBlock>
<xctk:WatermarkComboBox Grid.Column="1" Grid.Row="2" x:Name="comboBoxValues" IsTextSearchEnabled="True" SelectedValuePath="Key" DisplayMemberPath="Value" Margin="2" IsEditable="True" Watermark="Select an appropriate value" />
<enictrl:LocodeControl Grid.Column="1" Grid.Row="2" x:Name="locodeControl" Visibility="Hidden" />
</Grid>
</enictrl:EditWindowBase>

View File

@ -0,0 +1,88 @@
// Copyright (c) 2017- schick Informatik
// Description: Dialog to confirm values during excel import (e.g. CREW/PAS)
//
using ENI2.Controls;
using System.Collections.Generic;
using System.Windows;
using bsmd.database;
namespace ENI2.EditControls
{
/// <summary>
/// Interaction logic for FixImportDialog.xaml
/// </summary>
public partial class FixImportDialog : EditWindowBase
{
public FixImportDialog()
{
InitializeComponent();
}
public bool LocodeMode
{
get { return this.locodeControl.Visibility == Visibility.Visible; }
set
{
this.locodeControl.Visibility = value ? Visibility.Visible : Visibility.Hidden;
this.comboBoxValues.Visibility = value ? Visibility.Hidden : Visibility.Visible;
}
}
public string SelectedValue
{
get
{
if (LocodeMode) return this.locodeControl.LocodeValue;
return this.comboBoxValues.SelectedValue as string;
}
}
public string Value
{
get { return this.textBlockValue.Text; }
set { this.textBlockValue.Text = value.Trim(); }
}
public string ValueType
{
get { return this.textBlockType.Text; }
set { this.textBlockType.Text = value; }
}
public Dictionary<string, string> SelectionValues { get; set; }
#region event handler
private void EditWindowBase_Loaded(object sender, RoutedEventArgs e)
{
this.EnableOK(false);
if (LocodeMode)
{
this.locodeControl.SetFocus();
this.locodeControl.PropertyChanged += LocodeControl_PropertyChanged;
}
else
{
this.comboBoxValues.ItemsSource = this.SelectionValues;
this.comboBoxValues.SelectionChanged += ComboBoxValues_SelectionChanged;
this.comboBoxValues.Focus();
}
}
private void ComboBoxValues_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
{
string val = this.comboBoxValues.SelectedValue as string;
this.EnableOK(!val.IsNullOrEmpty());
}
private void LocodeControl_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
this.EnableOK(!locodeControl.LocodeValue.IsNullOrEmpty());
}
#endregion
}
}

View File

@ -0,0 +1,43 @@
<enictrl:EditWindowBase x:Class="ENI2.EditControls.NewDGItemDialog"
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:local="clr-namespace:ENI2.EditControls"
xmlns:enictrl="clr-namespace:ENI2.Controls"
xmlns:p="clr-namespace:ENI2.Properties"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
mc:Ignorable="d"
Title="{x:Static p:Resources.textNewDGItem}" Height="350" Width="600" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="CanResize"
Icon="/ENI2;component/Resources/bullet_ball_yellow.ico" Loaded="EditWindowBase_Loaded">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="90" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80" />
<ColumnDefinition Width="2*" />
</Grid.ColumnDefinitions>
<Label Content="{x:Static p:Resources.textType}" Grid.Row="0" Grid.Column="0" />
<ComboBox Name="comboBoxType" Grid.Column="1" Grid.Row="0" Margin="2" SelectionChanged="comboBoxType_SelectionChanged" />
<Label Content="{x:Static p:Resources.textDescription}" Grid.Row="1" Grid.Column="0" />
<xctk:WatermarkTextBox Margin="2" Watermark="{x:Static p:Resources.textSearch}" Name="textBoxSearchDescription" Grid.Row="1" Grid.Column="1" TextChanged="textBoxSearchDescription_TextChanged" />
<ListBox Name="listBoxDescription" Grid.Column="1" Grid.Row="2" Margin="2" SelectionChanged="listBoxDescription_SelectionChanged" />
<Label Content="{x:Static p:Resources.textRemarks}" Grid.Row="5" Grid.Column="0" />
<Border BorderThickness="1" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2" BorderBrush="Black" Margin="2">
<TextBlock Name="textBlockDescription" Margin="2" Background="LightGray" TextWrapping="Wrap"/>
</Border>
<Border BorderThickness="1" Grid.Column="1" Grid.Row="5" Grid.RowSpan="2" BorderBrush="Black" Margin="2">
<TextBlock Name="textBlockRemarks" Margin="2" Background="LightGray" TextWrapping="Wrap" />
</Border>
</Grid>
</enictrl:EditWindowBase>

View File

@ -0,0 +1,92 @@
// Copyright (c) 2017- schick Informatik
// Description: select a new DG item from a selection of templates
//
using bsmd.database;
using ENI2.Controls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
namespace ENI2.EditControls
{
/// <summary>
/// Interaction logic for NewDGItemDialog.xaml
/// </summary>
public partial class NewDGItemDialog : EditWindowBase
{
private List<HAZPosTemplate> _data = null;
private static object filterLock = new object();
public NewDGItemDialog()
{
InitializeComponent();
}
public HAZPosTemplate SelectedTemplate
{
get
{
return this.listBoxDescription.SelectedItem as HAZPosTemplate;
}
}
private void EditWindowBase_Loaded(object sender, RoutedEventArgs e)
{
// load combo boxes
_data = LocalizedLookup.LoadHAZTemplates();
this.listBoxDescription.ItemsSource = _data;
this.comboBoxType.ItemsSource = Enum.GetValues(typeof(HAZPosTemplate.SublistType));
this.OkVisible = false;
this.AddVisible = true;
}
private void comboBoxType_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
FilterDescriptions();
}
private void listBoxDescription_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (this.listBoxDescription.SelectedItem is HAZPosTemplate selectedTemplate)
{
this.textBlockDescription.Text = selectedTemplate.Description;
this.textBlockRemarks.Text = selectedTemplate.Comment;
}
else
{
this.textBlockDescription.Text = "";
this.textBlockRemarks.Text = "";
}
}
private void textBoxSearchDescription_TextChanged(object sender, TextChangedEventArgs e)
{
FilterDescriptions();
}
private void FilterDescriptions()
{
string searchText = this.textBoxSearchDescription.Text.Trim();
lock (filterLock)
{
IEnumerable<HAZPosTemplate> filtered = _data;
if (searchText.Length > 0)
{
filtered = _data.Where(elem => elem.Description.ToUpperInvariant().Contains(searchText.ToUpperInvariant()));
}
if (this.comboBoxType.SelectedItem != null)
{
HAZPosTemplate.SublistType sType = (HAZPosTemplate.SublistType)this.comboBoxType.SelectedItem;
filtered = filtered.Where(elem => elem.TemplateType == sType);
}
this.listBoxDescription.ItemsSource = filtered;
}
}
}
}

View File

@ -30,7 +30,7 @@ namespace ENI2.EditControls
List<KeyValuePair<Message.NSWProvider, string>> comboDataSource = new List<KeyValuePair<Message.NSWProvider, string>>() List<KeyValuePair<Message.NSWProvider, string>> comboDataSource = new List<KeyValuePair<Message.NSWProvider, string>>()
{ {
new KeyValuePair<Message.NSWProvider, string>( Message.NSWProvider.DUDR, "HIS-Nord" ), new KeyValuePair<Message.NSWProvider, string>( Message.NSWProvider.DUDR, "HIS-Nord" ),
new KeyValuePair<Message.NSWProvider, string>(Message.NSWProvider.DBH, "DBH") new KeyValuePair<Message.NSWProvider, string>(Message.NSWProvider.DBH, "DBH")
}; };
@ -52,11 +52,11 @@ namespace ENI2.EditControls
private void textBoxVisitTransitId_TextChanged(object sender, TextChangedEventArgs e) private void textBoxVisitTransitId_TextChanged(object sender, TextChangedEventArgs e)
{ {
this.CheckComplete(); this.CheckComplete();
} }
private void CheckComplete() private void CheckComplete()
{ {
bool isComplete = true; bool isComplete = true;
bool isValidId = bsmd.database.Util.IsVisitId(textBoxVisitTransitId.Text) || bsmd.database.Util.IsTransitId(textBoxVisitTransitId.Text); bool isValidId = bsmd.database.Util.IsVisitId(textBoxVisitTransitId.Text) || bsmd.database.Util.IsTransitId(textBoxVisitTransitId.Text);

View File

@ -38,7 +38,7 @@ namespace ENI2.EditControls
this.EnableOK(false); this.EnableOK(false);
this.locodePoC.PropertyChanged += LocodePoC_PropertyChanged; this.locodePoC.PropertyChanged += LocodePoC_PropertyChanged;
} }
private void VisitIdDialog_OKClicked() private void VisitIdDialog_OKClicked()
{ {

View File

@ -430,10 +430,14 @@ namespace ENI2.Excel
STAT stat = statMessage.Elements[0] as STAT; STAT stat = statMessage.Elements[0] as STAT;
stat.ShipName = reader.ReadCellAsText("ship", "C8"); stat.ShipName = reader.ReadCellAsText("ship", "C8");
stat.CallSign = reader.ReadCellAsText("ship", "C9"); stat.CallSign = reader.ReadCellAsText("ship", "C9");
core.IMO = reader.ReadCellAsText("ship", "C10");
core.ENI = reader.ReadCellAsText("ship", "C11"); // diese Felder werden bei der Id-Anlage gesetzt und sollten nicht mehr überschrieben
core.PoC = reader.ReadCellAsText("port message", "C8"); // werden können (jenseits mit Admin-Berechtigungen in der Overview)
DBManager.Instance.Save(core); // core.IMO = reader.ReadCellAsText("ship", "C10");
// core.ENI = reader.ReadCellAsText("ship", "C11");
// core.PoC = reader.ReadCellAsText("port message", "C8");
// DBManager.Instance.Save(core);
stat.MMSINumber = reader.ReadCellAsText("ship", "C12"); stat.MMSINumber = reader.ReadCellAsText("ship", "C12");
stat.Flag = reader.ReadCellAsText("ship", "C13"); stat.Flag = reader.ReadCellAsText("ship", "C13");
stat.LengthOverall_MTR = reader.ReadCellAsDecimal("ship", "C14"); stat.LengthOverall_MTR = reader.ReadCellAsDecimal("ship", "C14");
@ -1233,21 +1237,21 @@ namespace ENI2.Excel
return result; return result;
} }
private static byte? ParseGender(string gender) internal static byte? ParseGender(string gender)
{ {
byte? result = null; byte? result = null;
if(!gender.IsNullOrEmpty()) if(!gender.IsNullOrEmpty())
{ {
if (gender.Equals("male", StringComparison.OrdinalIgnoreCase)) result = 1; if (gender.Equals("male", StringComparison.OrdinalIgnoreCase) || gender.Equals("m", StringComparison.OrdinalIgnoreCase)) result = 1;
if (gender.Equals("female", StringComparison.OrdinalIgnoreCase)) result = 2; if (gender.Equals("female", StringComparison.OrdinalIgnoreCase) || gender.Equals("f", StringComparison.OrdinalIgnoreCase)) result = 2;
if (gender.Equals("not_applicable", StringComparison.OrdinalIgnoreCase)) result = 9; if (gender.Equals("not_applicable", StringComparison.OrdinalIgnoreCase) || gender.Equals("not applicable", StringComparison.OrdinalIgnoreCase) || gender.Equals("n", StringComparison.OrdinalIgnoreCase)) result = 9;
if (gender.Equals("not_known", StringComparison.OrdinalIgnoreCase)) result = 0; if (gender.Equals("not_known", StringComparison.OrdinalIgnoreCase) || gender.Equals("not known", StringComparison.OrdinalIgnoreCase)) result = 0;
if (gender.Equals("other", StringComparison.OrdinalIgnoreCase)) result = 9; if (gender.Equals("other", StringComparison.OrdinalIgnoreCase) || gender.Equals("d", StringComparison.OrdinalIgnoreCase) || gender.Equals("diverse", StringComparison.OrdinalIgnoreCase)) result = 9;
} }
return result; return result;
} }
private static byte? ParseDocumentType(string docType) internal static byte? ParseDocumentType(string docType)
{ {
byte? result = null; byte? result = null;
if(!docType.IsNullOrEmpty()) if(!docType.IsNullOrEmpty())

View File

@ -4,10 +4,6 @@
using System; using System;
using System.IO; using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing; using System.Drawing;
using Microsoft.Office.Interop.Excel; using Microsoft.Office.Interop.Excel;
@ -21,7 +17,7 @@ namespace ENI2.Excel
/// </summary> /// </summary>
public static class ExcelComparer public static class ExcelComparer
{ {
private static int diffColor = ColorTranslator.ToOle(Color.FromArgb(150, 150, 255)); // blue private static readonly int diffColor = ColorTranslator.ToOle(Color.FromArgb(150, 150, 255)); // blue
private static bool GetSheetRange(Worksheet sheet, out int lastUsedRow, out int lastUsedColumn) private static bool GetSheetRange(Worksheet sheet, out int lastUsedRow, out int lastUsedColumn)
{ {
@ -65,17 +61,16 @@ namespace ENI2.Excel
return columnName; return columnName;
} }
public static string Compare(string sourcePath, string targetPath, out string errorMessage) public static string Compare(string sourcePath, string targetPath, string comparisonFileName, out string errorMessage)
{ {
string fileName = Path.GetTempPath() + Guid.NewGuid().ToString() + ".xlsx";
errorMessage = ""; errorMessage = "";
int counter = 0; int counter = 0;
try try
{ {
File.Copy(targetPath, fileName); File.Copy(targetPath, comparisonFileName);
ExcelReader source = new ExcelReader(sourcePath, true, false); ExcelReader source = new ExcelReader(sourcePath, true, false);
ExcelReader comparison = new ExcelReader(fileName, false, false); ExcelReader comparison = new ExcelReader(comparisonFileName, false, false);
/* erste Variante Vergleich über Namen der Zellen /* erste Variante Vergleich über Namen der Zellen
@ -186,7 +181,9 @@ namespace ENI2.Excel
} }
} }
comparison.Save(fileName); comparison.Save(comparisonFileName);
source.Dispose();
comparison.Dispose();
errorMessage = string.Format("{0} differences found", counter); errorMessage = string.Format("{0} differences found", counter);
} }
catch (Exception ex) catch (Exception ex)
@ -194,7 +191,7 @@ namespace ENI2.Excel
errorMessage = ex.Message; errorMessage = ex.Message;
} }
return fileName; return comparisonFileName;
} }
} }

View File

@ -146,8 +146,7 @@ namespace ENI2.Excel
result = 2; result = 2;
} }
else if (val.Equals("n", StringComparison.CurrentCultureIgnoreCase) || else if (val.Equals("n", StringComparison.CurrentCultureIgnoreCase) ||
val.Equals("not applicable", StringComparison.CurrentCultureIgnoreCase) || val.Equals("not applicable", StringComparison.CurrentCultureIgnoreCase) ||
val.Equals("not_applicable", StringComparison.CurrentCultureIgnoreCase) ||
val.Equals("d", StringComparison.CurrentCultureIgnoreCase) || val.Equals("d", StringComparison.CurrentCultureIgnoreCase) ||
val.Equals("diverse", StringComparison.CurrentCultureIgnoreCase)) val.Equals("diverse", StringComparison.CurrentCultureIgnoreCase))
{ {
@ -629,8 +628,8 @@ namespace ENI2.Excel
{ {
if (boolString.Equals("TRUE", StringComparison.OrdinalIgnoreCase)) return true; if (boolString.Equals("TRUE", StringComparison.OrdinalIgnoreCase)) return true;
if (boolString.Equals("FALSE", StringComparison.OrdinalIgnoreCase)) return false; if (boolString.Equals("FALSE", StringComparison.OrdinalIgnoreCase)) return false;
if (boolString.Equals("YES", StringComparison.OrdinalIgnoreCase)) return true; if (boolString.Equals("YES", StringComparison.OrdinalIgnoreCase) || boolString.Equals("Y", StringComparison.OrdinalIgnoreCase)) return true;
if (boolString.Equals("NO", StringComparison.OrdinalIgnoreCase)) return false; if (boolString.Equals("NO", StringComparison.OrdinalIgnoreCase) || boolString.Equals("N", StringComparison.OrdinalIgnoreCase)) return false;
return null; return null;
} }
else return null; else return null;

View File

@ -14,6 +14,7 @@ using System.Reflection;
using log4net; using log4net;
using bsmd.database; using bsmd.database;
using ENI2.Locode; using ENI2.Locode;
using ENI2.EditControls;
namespace ENI2.Excel namespace ENI2.Excel
{ {
@ -21,6 +22,11 @@ namespace ENI2.Excel
{ {
private static readonly ILog _log = LogManager.GetLogger(typeof(ExcelUtil)); private static readonly ILog _log = LogManager.GetLogger(typeof(ExcelUtil));
private static readonly Dictionary<string, string> _countryImportDict = new Dictionary<string, string>();
private static readonly Dictionary<string, string> _genderImportDict = new Dictionary<string, string>();
private static readonly Dictionary<string, string> _documentTypeImportDict = new Dictionary<string, string>();
private static readonly Dictionary<string, string> _locodeImportDict = new Dictionary<string, string>();
#region Process Sheet (normal BSMD sheet import) #region Process Sheet (normal BSMD sheet import)
internal static bool ProcessSheet(ExcelReader reader, out string readMessage, MessageCore messageCore, List<Message.NotificationClass> notificationClasses) internal static bool ProcessSheet(ExcelReader reader, out string readMessage, MessageCore messageCore, List<Message.NotificationClass> notificationClasses)
@ -2055,61 +2061,59 @@ namespace ENI2.Excel
private static bool ScanCREW(Message crewMessage, ExcelReader reader, bool isOldVersion) private static bool ScanCREW(Message crewMessage, ExcelReader reader, bool isOldVersion)
{ {
crewMessage.DeleteElements(); crewMessage.DeleteElements();
string sheetTitle = "6. CREW - Arrival";
// 6. CREW - Arrival
// 5.9.22: Changed this area to work like reading from a Dakosy Sheet (by values in rows, not cell names)
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 < crewMessage.NumberOfExcelRows; i++) for (int i = 0; i < 5000; i++)
{ {
string crewLastName = string.Format("CREW.CrewMemberLastName_{0}", i + 1);
string crewFirstName = string.Format("CREW.CrewMemberFirstName_{0}", i + 1);
string crewGender = string.Format("CREW.CrewMemberGender_{0}", i + 1);
string crewNationality = string.Format("CREW.CrewMemberNationality_{0}", i + 1);
string crewDuty = string.Format("CREW.CrewMemberDuty_{0}", i + 1);
string crewPlaceOfBirth = string.Format("CREW.CrewMemberPlaceOfBirth_{0}", i + 1);
string crewDateOfBirth = string.Format("CREW.CrewMemberDateOfBirth_{0}", i + 1);
string crewIdentDocType = string.Format("CREW.CrewMemberIdentityDocumentType_{0}", i + 1);
string crewIdentDocId = string.Format("CREW.CrewMemberIdentityDocumentId_{0}", i + 1);
string crewVisaNo = string.Format("CREW.CrewMemberVisaNumber_{0}", i + 1);
string crewIssuing = string.Format("CREW.CrewMemberIdentityDocumentIssuingState_{0}", i + 1);
string crewIdentDocExpiry = string.Format("CREW.CrewmemberIdentityDocumentExpiryDate_{0}", i + 1);
string crewCountryOfBirth = string.Format("CREW.CountryOfBirth_{0}", i + 1);
string crewEffects = string.Format("CREW.Effects_{0}", i + 1);
string lastName = reader.ReadText(crewLastName); string lastName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", i + 18));
string firstName = reader.ReadText(crewFirstName); string firstName = reader.ReadCellAsText(sheetTitle, string.Format("D{0}", i + 18));
if (lastName.IsNullOrEmpty() && firstName.IsNullOrEmpty()) break;
if (!lastName.IsNullOrEmpty() || !firstName.IsNullOrEmpty()) if (!(crewMessage.GetSublistElementWithIdentifier((i + 1).ToString()) is CREW crew))
{ {
if (!(crewMessage.GetSublistElementWithIdentifier((i + 1).ToString()) is CREW crew)) crew = new CREW();
{ crew.Identifier = (i + 1).ToString();
crew = new CREW(); crew.MessageHeader = crewMessage;
crew.Identifier = (i + 1).ToString(); crewMessage.Elements.Add(crew);
crew.MessageHeader = crewMessage;
crewMessage.Elements.Add(crew);
}
crew.NotificationSchengen = notificationSchengen;
crew.NotificationPAX = notificationPax;
crew.CrewMemberLastName = lastName;
crew.CrewMemberFirstName = firstName;
crew.CrewMemberGender = reader.ReadGender(crewGender);
crew.CrewMemberDuty = reader.ReadText(crewDuty);
crew.CrewMemberNationality = reader.ReadNationality(crewNationality);
crew.CrewMemberPlaceOfBirth = reader.ReadText(crewPlaceOfBirth);
crew.CrewMemberDateOfBirth = reader.ReadBirthDate(crewDateOfBirth);
crew.CrewMemberIdentityDocumentType = reader.ReadIdentityDocumentType(crewIdentDocType);
crew.CrewMemberIdentityDocumentId = reader.ReadText(crewIdentDocId);
crew.CrewMemberVisaNumber = reader.ReadText(crewVisaNo);
crew.CrewMemberIdentityDocumentIssuingState = reader.ReadNationality(crewIssuing);
if (crew.CrewMemberIdentityDocumentIssuingState.IsNullOrEmpty() && isOldVersion)
crew.CrewMemberIdentityDocumentIssuingState = "XX";
crew.CrewMemberIdentityDocumentExpiryDate = reader.ReadDate(crewIdentDocExpiry);
if (!crew.CrewMemberIdentityDocumentExpiryDate.HasValue && isOldVersion)
crew.CrewMemberIdentityDocumentExpiryDate = new DateTime(2100, 12, 31);
crew.CrewMemberCountryOfBirth = reader.ReadNationality(crewCountryOfBirth);
crew.Effects = reader.ReadText(crewEffects);
} }
crew.NotificationSchengen = notificationSchengen;
crew.NotificationPAX = notificationPax;
crew.CrewMemberLastName = lastName;
crew.CrewMemberFirstName = firstName;
crew.CrewMemberGender = ReadGender(reader.ReadCellAsText(sheetTitle, string.Format("E{0}", i + 18)), out bool canceled);
if (canceled) return true;
crew.CrewMemberDuty = reader.ReadCellAsText(sheetTitle, string.Format("F{0}", i + 18));
crew.CrewMemberNationality = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("G{0}", i + 18)), out canceled);
if (canceled) return true;
crew.CrewMemberPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("H{0}", i + 18));
crew.CrewMemberCountryOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("G{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);
if (canceled) return true;
crew.CrewMemberIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("L{0}", i + 18));
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);
if (canceled) return true;
if (crew.CrewMemberIdentityDocumentIssuingState.IsNullOrEmpty() && isOldVersion)
crew.CrewMemberIdentityDocumentIssuingState = "XX";
crew.CrewMemberIdentityDocumentExpiryDate = reader.ReadCellAsDateTime(sheetTitle, string.Format("N{0}", i + 18));
if (!crew.CrewMemberIdentityDocumentExpiryDate.HasValue && isOldVersion)
crew.CrewMemberIdentityDocumentExpiryDate = new DateTime(2100, 12, 31);
crew.Effects = reader.ReadCellAsText("2. PORT", string.Format("C{0}", i + 142));
Util.UIHelper.SetBusyState(); // dialog might reset busy state
} }
return true; return true;
@ -2118,56 +2122,56 @@ namespace ENI2.Excel
private static bool ScanCREWD(Message crewdMessage, ExcelReader reader) private static bool ScanCREWD(Message crewdMessage, ExcelReader reader)
{ {
crewdMessage.DeleteElements(); crewdMessage.DeleteElements();
string sheetTitle = "7. CREW - Departure";
// CREW DEPARTURE // CREW DEPARTURE
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 < crewdMessage.NumberOfExcelRows; i++) for (int i = 0; i < 5000; i++)
{ {
string crewLastName = string.Format("CREWD.CrewMemberLastName_{0}", i + 1);
string crewFirstName = string.Format("CREWD.CrewMemberFirstName_{0}", i + 1);
string crewGender = string.Format("CREWD.CrewMemberGender_{0}", i + 1);
string crewNationality = string.Format("CREWD.CrewMemberNationality_{0}", i + 1);
string crewDuty = string.Format("CREWD.CrewMemberDuty_{0}", i + 1);
string crewPlaceOfBirth = string.Format("CREWD.CrewMemberPlaceOfBirth_{0}", i + 1);
string crewDateOfBirth = string.Format("CREWD.CrewMemberDateOfBirth_{0}", i + 1);
string crewIdentDocType = string.Format("CREWD.CrewMemberIdentityDocumentType_{0}", i + 1);
string crewIdentDocId = string.Format("CREWD.CrewMemberIdentityDocumentId_{0}", i + 1);
string crewVisaNo = string.Format("CREWD.CrewMemberVisaNumber_{0}", i + 1);
string crewIssuing = string.Format("CREWD.CrewMemberIdentityDocumentIssuingState_{0}", i + 1);
string crewIdentDocExpiry = string.Format("CREWD.CrewmemberIdentityDocumentExpiryDate_{0}", i + 1);
string crewCountryOfBirth = string.Format("CREWD.CountryOfBirth_{0}", i + 1);
string lastName = reader.ReadText(crewLastName); string lastName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", i + 18));
if (!lastName.IsNullOrEmpty()) if (lastName.IsNullOrEmpty()) break;
if (!(crewdMessage.GetSublistElementWithIdentifier((i + 1).ToString()) is CREWD crewd))
{ {
if (!(crewdMessage.GetSublistElementWithIdentifier((i + 1).ToString()) is CREWD crew)) crewd = new CREWD();
{ crewd.Identifier = (i + 1).ToString();
crew = new CREWD(); crewd.MessageHeader = crewdMessage;
crew.IsDeparture = true; crewdMessage.Elements.Add(crewd);
crew.Identifier = (i + 1).ToString();
crew.MessageHeader = crewdMessage;
crewdMessage.Elements.Add(crew);
}
crew.IsDeparture = true;
crew.NotificationSchengen = notificationSchengen;
crew.NotificationPAX = notificationPax;
crew.CrewMemberLastName = lastName;
crew.CrewMemberFirstName = reader.ReadText(crewFirstName);
crew.CrewMemberGender = reader.ReadGender(crewGender);
crew.CrewMemberDuty = reader.ReadText(crewDuty);
crew.CrewMemberNationality = reader.ReadNationality(crewNationality);
crew.CrewMemberPlaceOfBirth = reader.ReadText(crewPlaceOfBirth);
crew.CrewMemberDateOfBirth = reader.ReadBirthDate(crewDateOfBirth);
crew.CrewMemberIdentityDocumentType = reader.ReadIdentityDocumentType(crewIdentDocType);
crew.CrewMemberIdentityDocumentId = reader.ReadText(crewIdentDocId);
crew.CrewMemberVisaNumber = reader.ReadText(crewVisaNo);
crew.CrewMemberIdentityDocumentIssuingState = reader.ReadNationality(crewIssuing);
crew.CrewMemberIdentityDocumentExpiryDate = reader.ReadDate(crewIdentDocExpiry);
crew.CrewMemberCountryOfBirth = reader.ReadNationality(crewCountryOfBirth);
} }
crewd.NotificationSchengen = notificationSchengen;
crewd.NotificationPAX = notificationPax;
crewd.CrewMemberLastName = lastName;
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);
if (canceled) return true;
crewd.CrewMemberDuty = reader.ReadCellAsText(sheetTitle, string.Format("F{0}", i + 18));
crewd.CrewMemberNationality = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("G{0}", i + 18)), out canceled);
if (canceled) return true;
crewd.CrewMemberPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("H{0}", i + 18));
crewd.CrewMemberCountryOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("G{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);
if (canceled) return true;
crewd.CrewMemberIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("L{0}", i + 18));
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);
if (canceled) return true;
if (crewd.CrewMemberIdentityDocumentIssuingState.IsNullOrEmpty())
crewd.CrewMemberIdentityDocumentIssuingState = "XX";
crewd.CrewMemberIdentityDocumentExpiryDate = reader.ReadCellAsDateTime(sheetTitle, string.Format("N{0}", i + 18));
if (!crewd.CrewMemberIdentityDocumentExpiryDate.HasValue)
crewd.CrewMemberIdentityDocumentExpiryDate = new DateTime(2100, 12, 31);
crewd.Effects = reader.ReadCellAsText("2. PORT", string.Format("C{0}", i + 142));
} }
return true; return true;
} }
@ -2178,71 +2182,73 @@ namespace ENI2.Excel
private static bool ScanPAS(Message pasMessage, ExcelReader reader, bool isOldVersion) private static bool ScanPAS(Message pasMessage, ExcelReader reader, bool isOldVersion)
{ {
pasMessage.DeleteElements();
List<PAS> newPasList = new List<PAS>();
string sheetTitle = "8. PAX - Arrival";
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 < pasMessage.NumberOfExcelRows; i++) for (int i = 0; i < 5000; i++)
{ {
string pasLastName = string.Format("PAS.PassengerLastName_{0}", i + 1);
string pasFirstName = string.Format("PAS.PassengerFirstName_{0}", i + 1);
string pasGender = string.Format("PAS.PassengerGender_{0}", i + 1);
string pasNationality = string.Format("PAS.PassengerNationality_{0}", i + 1);
string pasEmbarkation = string.Format("PAS.PassengerPortOfEmbarkation_{0}", i + 1);
string pasDebarkation = string.Format("PAS.PassengerPortOfDisembarkation_{0}", i + 1);
string pasTransit = string.Format("PAS.PassengerInTransit_{0}", i + 1);
string pasPlaceOfBirth = string.Format("PAS.PassengerPlaceOfBirth_{0}", i + 1);
string pasDateOfBirth = string.Format("PAS.PassengerDateOfBirth_{0}", i + 1);
string pasIdentDocType = string.Format("PAS.PassengerIdentityDocumentType_{0}", i + 1);
string pasIdentDocId = string.Format("PAS.PassengerIdentityDocumentId_{0}", i + 1);
string pasVisaNo = string.Format("PAS.PassengerVisaNumber_{0}", i + 1);
string pasIssuing = string.Format("PAS.PassengerIdentityDocumentIssuingState_{0}", i + 1);
string pasExpiryDate = string.Format("PAS.PassengerIdentityDocumentExpiryDate_{0}", i + 1);
string pasCountryOfBirth = string.Format("PAS.CountryOfBirth_{0}", i + 1);
string pasEmergencyCare = string.Format("PAS.EmergencyCare_{0}", i + 1);
string pasEmergencyContact = string.Format("PAS.EmergencyContactNumber_{0}", i + 1);
string lastName = reader.ReadText(pasLastName); string lastName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", i + 17));
string firstName = reader.ReadText(pasFirstName); string firstName = reader.ReadCellAsText(sheetTitle, string.Format("D{0}", i + 17));
if (lastName.IsNullOrEmpty() && firstName.IsNullOrEmpty()) break; // finish after reading last row
DateTime? dateOfBirth = reader.ReadCellAsDateTime(sheetTitle, string.Format("L{0}", i + 17));
PAS pas = new PAS();
pas.Identifier = (i + 1).ToString();
pas.MessageHeader = pasMessage;
newPasList.Add(pas);
if (!lastName.IsNullOrEmpty() || !firstName.IsNullOrEmpty()) pas.NotificationSchengen = notificationSchengen;
{ pas.NotificationPAX = notificationPax;
if (!(pasMessage.GetSublistElementWithIdentifier((i + 1).ToString()) is PAS pas)) pas.PassengerLastName = lastName;
{ pas.PassengerFirstName = firstName;
pas = new PAS();
pas.Identifier = (i + 1).ToString(); pas.PassengerNationality = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("I{0}", i + 17)), out bool canceled);
pas.MessageHeader = pasMessage; if (canceled) return true;
pasMessage.Elements.Add(pas); pas.PassengerIdentityDocumentIssuingState = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("O{0}", i + 17)), out canceled);
} if (canceled) return true;
if (pas.PassengerIdentityDocumentIssuingState == null) return true;
pas.PassengerGender = ReadGender(reader.ReadCellAsText(sheetTitle, string.Format("E{0}", i + 17)), out canceled);
if (canceled) return true;
pas.PassengerPortOfEmbarkation = ReadLocode(reader.ReadCellAsText(sheetTitle, string.Format("F{0}", i + 17)), out canceled);
if (canceled) return true;
pas.PassengerPortOfDisembarkation = ReadLocode(reader.ReadCellAsText(sheetTitle, string.Format("G{0}", i + 17)), out canceled);
if (canceled) return true;
pas.PassengerInTransit = reader.ReadCellAsBool(sheetTitle, string.Format("H{0}", i + 17));
pas.PassengerPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("J{0}", i + 17));
pas.PassengerCountryOfBirth = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("K{0}", i + 17)), out canceled);
if (canceled) return true;
pas.PassengerDateOfBirth = dateOfBirth;
pas.PassengerIdentityDocumentType = ReadDocumentType(reader.ReadCellAsText(sheetTitle, string.Format("M{0}", i + 17)), out canceled);
if (canceled) return true;
pas.PassengerIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("N{0}", i + 17));
pas.PassengerIdentityDocumentExpiryDate = reader.ReadCellAsDateTime(sheetTitle, string.Format("P{0}", i + 17));
if(!pas.PassengerIdentityDocumentExpiryDate.HasValue)
pas.PassengerIdentityDocumentExpiryDate = new DateTime(2100, 12, 31);
pas.PassengerVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("Q{0}", i + 17));
pas.EmergencyCare = reader.ReadCellAsText(sheetTitle, string.Format("R{0}", i + 17));
pas.EmergencyContactNumber = reader.ReadCellAsText(sheetTitle, string.Format("S{0}", i + 17));
Util.UIHelper.SetBusyState(); // dialog might reset busy state
pas.NotificationSchengen = notificationSchengen;
pas.NotificationPAX = notificationPax;
pas.PassengerLastName = lastName;
pas.PassengerFirstName = firstName;
pas.PassengerGender = reader.ReadGender(pasGender);
pas.PassengerNationality = reader.ReadNationality(pasNationality);
// TODO: Nicht klar ob hier LOCODEs kommen oder nicht
pas.PassengerPortOfEmbarkation = reader.ReadLoCode(pasEmbarkation);
pas.PassengerPortOfDisembarkation = reader.ReadLoCode(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);
if (pas.PassengerIdentityDocumentIssuingState.IsNullOrEmpty() && isOldVersion)
pas.PassengerIdentityDocumentIssuingState = "XX";
pas.PassengerIdentityDocumentExpiryDate = reader.ReadDate(pasExpiryDate);
if (!pas.PassengerIdentityDocumentExpiryDate.HasValue && isOldVersion)
pas.PassengerIdentityDocumentExpiryDate = new DateTime(2100, 12, 31);
pas.PassengerCountryOfBirth = reader.ReadNationality(pasCountryOfBirth);
pas.EmergencyCare = reader.ReadText(pasEmergencyCare);
pas.EmergencyContactNumber = reader.ReadText(pasEmergencyContact);
}
} }
DBManager.Instance.DeleteAllPASForMessage(pasMessage.Id);
pasMessage.Elements.Clear();
foreach (PAS pas in newPasList)
pasMessage.Elements.Add(pas);
return true; return true;
} }
@ -2292,21 +2298,23 @@ namespace ENI2.Excel
pas.IsDeparture = true; pas.IsDeparture = true;
pas.NotificationSchengen = notificationSchengen; pas.NotificationSchengen = notificationSchengen;
pas.NotificationPAX = notificationPax; pas.NotificationPAX = notificationPax;
pas.PassengerLastName = lastName; pas.PassengerLastName = lastName;
pas.PassengerFirstName = reader.ReadText(pasFirstName); pas.PassengerFirstName = reader.ReadText(pasFirstName);
pas.PassengerGender = reader.ReadGender(pasGender); pas.PassengerGender = reader.ReadGender(pasGender);
pas.PassengerNationality = reader.ReadNationality(pasNationality); pas.PassengerNationality = reader.ReadNationality(pasNationality);
// TODO: Nicht klar ob hier LOCODEs kommen oder nicht
pas.PassengerPortOfEmbarkation = reader.ReadTextNoWhitespace(pasEmbarkation); pas.PassengerPortOfEmbarkation = reader.ReadTextNoWhitespace(pasEmbarkation);
pas.PassengerPortOfDisembarkation = reader.ReadTextNoWhitespace(pasDebarkation); pas.PassengerPortOfDisembarkation = reader.ReadTextNoWhitespace(pasDebarkation);
pas.PassengerInTransit = reader.ReadBoolean(pasTransit); pas.PassengerInTransit = reader.ReadBoolean(pasTransit);
pas.PassengerPlaceOfBirth = reader.ReadText(pasPlaceOfBirth); pas.PassengerPlaceOfBirth = reader.ReadText(pasPlaceOfBirth);
pas.PassengerDateOfBirth = reader.ReadBirthDate(pasDateOfBirth); pas.PassengerDateOfBirth = reader.ReadBirthDate(pasDateOfBirth);
pas.PassengerIdentityDocumentType = reader.ReadIdentityDocumentType(pasIdentDocType); pas.PassengerIdentityDocumentType = reader.ReadIdentityDocumentType(pasIdentDocType);
pas.PassengerIdentityDocumentId = reader.ReadText(pasIdentDocId); pas.PassengerIdentityDocumentId = reader.ReadText(pasIdentDocId);
pas.PassengerVisaNumber = reader.ReadText(pasVisaNo); pas.PassengerVisaNumber = reader.ReadText(pasVisaNo);
pas.PassengerIdentityDocumentIssuingState = reader.ReadNationality(pasIssuing); pas.PassengerIdentityDocumentIssuingState = reader.ReadNationality(pasIssuing);
pas.PassengerIdentityDocumentExpiryDate = reader.ReadDate(pasExpiryDate); pas.PassengerIdentityDocumentExpiryDate = reader.ReadDate(pasExpiryDate);
if (!pas.PassengerIdentityDocumentExpiryDate.HasValue)
pas.PassengerIdentityDocumentExpiryDate = new DateTime(2100, 12, 31);
pas.PassengerCountryOfBirth = reader.ReadNationality(pasCountryOfBirth); pas.PassengerCountryOfBirth = reader.ReadNationality(pasCountryOfBirth);
pas.EmergencyCare = reader.ReadText(pasEmergencyCare); pas.EmergencyCare = reader.ReadText(pasEmergencyCare);
pas.EmergencyContactNumber = reader.ReadText(pasEmergencyContact); pas.EmergencyContactNumber = reader.ReadText(pasEmergencyContact);
@ -2441,5 +2449,201 @@ namespace ENI2.Excel
#endregion #endregion
#region "Semi-Manual" import functions (may open interactive dialog)
public static byte? ReadGender(string gender, out bool canceled)
{
byte? result = DakosyUtil.ParseGender(gender);
canceled = false;
if (!gender.IsNullOrEmpty() && !result.HasValue)
{
// special treatment / callback
if (_genderImportDict.ContainsKey(gender))
{
result = byte.Parse(_genderImportDict[gender]); // we have mapped this before
}
else
{
FixImportDialog fid = new FixImportDialog();
fid.Value = gender;
fid.ValueType = "Gender";
fid.SelectionValues = Util.GlobalStructures.GenderDict;
if (fid.ShowDialog() ?? false)
{
if (!fid.SelectedValue.IsNullOrEmpty())
{
_genderImportDict[gender] = fid.SelectedValue;
result = byte.Parse(_genderImportDict[gender]);
}
}
else
{
canceled = true;
}
}
}
if(!result.HasValue)
{
result = 0; // not known
}
return result;
}
public static byte? ReadDocumentType(string documentType, out bool canceled)
{
byte? result = DakosyUtil.ParseDocumentType(documentType);
canceled = false;
if (!result.HasValue)
{
if (documentType.IsNullOrEmpty())
{
result = 5; // OTHER_LEGAL_IDENTITY_DOCUMENT (CH, 17.10.22)
}
else
{
// special treatment / callback
if (_documentTypeImportDict.ContainsKey(documentType))
{
result = byte.Parse(_documentTypeImportDict[documentType]); // we have mapped this before
}
else
{
FixImportDialog fid = new FixImportDialog();
fid.Value = documentType;
fid.ValueType = "Document type";
fid.SelectionValues = Util.GlobalStructures.IDDocTypeDict;
if (fid.ShowDialog() ?? false)
{
if (!fid.SelectedValue.IsNullOrEmpty())
{
_documentTypeImportDict[documentType] = fid.SelectedValue;
result = byte.Parse(_documentTypeImportDict[documentType]);
}
}
else
{
canceled = true;
}
}
}
}
return result;
}
public static string ReadNationality(string nationality, out bool canceled)
{
string result = null;
canceled = false;
nationality = nationality.Trim();
if (nationality.IsNullOrEmpty())
{
result = "XX";
}
else if(CREW.NationalityDict.ContainsKey(nationality.ToUpper()))
{
result = nationality.ToUpper();
}
else if(CREW.NationalityDict.ContainsKey(nationality.ToUpper()))
{
result = CREW.NationalityDict[nationality.ToUpper()];
}
else if(_countryImportDict.ContainsKey(nationality))
{
result = _countryImportDict[nationality];
}
else // we cannot find whatever this is..
{
FixImportDialog fid = new FixImportDialog();
fid.Value = nationality;
fid.ValueType = "Nationality";
fid.SelectionValues = CREW.NationalityDict;
if(fid.ShowDialog() ?? false)
{
if(!fid.SelectedValue.IsNullOrEmpty())
{
_countryImportDict[nationality] = fid.SelectedValue;
result = fid.SelectedValue.Substring(0,2); // attention manual entry
}
}
else
{
canceled = true;
}
}
return result;
}
public static string ReadLocode(string val, out bool canceled)
{
string result = null;
canceled = false;
val = val.ToUpper();
if (val.IsNullOrEmpty()) return "ZZUKN";
// check if this is a legitimate Locode
if (!LocodeDB.LocationNameFromLocode(val).IsNullOrEmpty()) return val;
// check if it is a port that we already know
// _log.WarnFormat("unknown Locode {0}", val);
// reverse search: if this is a name lookup port code
List<string> possibleLocodes = LocodeDB.AllLocodesForCityName(val);
if(possibleLocodes.Count > 1)
{
if (!_locodeImportDict.ContainsKey(val))
{
FixImportDialog fid = new FixImportDialog();
fid.Value = val;
fid.ValueType = "Locode";
Dictionary<string, string> ld = new Dictionary<string, string>();
foreach (string locode in possibleLocodes)
ld[locode] = locode;
fid.SelectionValues = ld;
if (fid.ShowDialog() ?? false)
{
_locodeImportDict[val] = fid.SelectedValue;
}
else
{
canceled = true;
}
}
if(_locodeImportDict.ContainsKey(val))
result = _locodeImportDict[val];
}
else if(possibleLocodes.Count == 1)
{
result = possibleLocodes[0];
}
else
{
if (!_locodeImportDict.ContainsKey(val))
{
// nothing found, let the user pick a locode by himself
FixImportDialog fid = new FixImportDialog();
fid.Value = val;
fid.ValueType = "Locode";
fid.LocodeMode = true;
if (fid.ShowDialog() ?? false)
{
_locodeImportDict[val] = fid.SelectedValue;
}
}
if (_locodeImportDict.ContainsKey(val))
result = _locodeImportDict[val];
}
return result;
}
#endregion
} }
} }

View File

@ -47,7 +47,7 @@ namespace ENI2
Dictionary<string, string> result = new Dictionary<string, string>(); Dictionary<string, string> result = new Dictionary<string, string>();
string query = string.Format("SELECT Code, PortArea FROM INFO_PortArea WHERE Locode = '{0}' ORDER BY PortArea", locode); string query = string.Format("SELECT Code, PortArea FROM INFO_PortArea WHERE Locode = '{0}' ORDER BY PortArea", locode);
SQLiteCommand cmd = new SQLiteCommand(query, _con); SQLiteCommand cmd = new SQLiteCommand(query, _con);
IDataReader reader = cmd.ExecuteReader(); IDataReader reader = cmd.ExecuteReader();
while(reader.Read()) while(reader.Read())
{ {
string code = null; string code = null;
@ -95,7 +95,7 @@ namespace ENI2
result[code] = string.Format("{0} {1}", code, name); result[code] = string.Format("{0} {1}", code, name);
} }
reader.Close(); reader.Close();
return result; return result;
} }
public static Dictionary<string, string> getVesselTypes() public static Dictionary<string, string> getVesselTypes()
@ -236,7 +236,7 @@ namespace ENI2
} }
reader.Close(); reader.Close();
return result; return result;
} }
public static List<LocodeDB.LocodeEntry> SSNAllLocodesForCityNameAsEntries(string city) public static List<LocodeDB.LocodeEntry> SSNAllLocodesForCityNameAsEntries(string city)
{ {
@ -251,7 +251,7 @@ namespace ENI2
if (!reader.IsDBNull(0) && !reader.IsDBNull(1)) if (!reader.IsDBNull(0) && !reader.IsDBNull(1))
{ {
LocodeDB.LocodeEntry entry = new LocodeDB.LocodeEntry(); LocodeDB.LocodeEntry entry = new LocodeDB.LocodeEntry();
entry.Locode = reader.GetString(0); entry.Locode = reader.GetString(0);
entry.Name = reader.GetString(1); entry.Name = reader.GetString(1);
results.Add(entry); results.Add(entry);
} }
@ -260,5 +260,14 @@ namespace ENI2
return results; return results;
} }
public static List<HAZPosTemplate> LoadHAZTemplates()
{
SQLiteCommand cmd = new SQLiteCommand(HAZPosTemplate.GetQuery(), _con);
IDataReader reader = cmd.ExecuteReader();
List<HAZPosTemplate> result = HAZPosTemplate.LoadList(reader);
reader.Close();
return result;
}
} }
} }

View File

@ -3309,6 +3309,15 @@ namespace ENI2.Properties {
} }
} }
/// <summary>
/// Looks up a localized string similar to New dangerous goods item.
/// </summary>
public static string textNewDGItem {
get {
return ResourceManager.GetString("textNewDGItem", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to New group. /// Looks up a localized string similar to New group.
/// </summary> /// </summary>

View File

@ -1849,4 +1849,7 @@
<data name="import2" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="import2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\import2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\import2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="textNewDGItem" xml:space="preserve">
<value>New dangerous goods item</value>
</data>
</root> </root>

View File

@ -2,8 +2,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Linq; using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ENI2.Util namespace ENI2.Util
{ {
@ -14,7 +12,7 @@ namespace ENI2.Util
var nAttributes = eValue.GetType().GetField(eValue.ToString()).GetCustomAttributes(typeof(DescriptionAttribute), false); var nAttributes = eValue.GetType().GetField(eValue.ToString()).GetCustomAttributes(typeof(DescriptionAttribute), false);
if (nAttributes.Any()) if (nAttributes.Any())
return (nAttributes.First() as DescriptionAttribute).Description; return (nAttributes.First() as DescriptionAttribute).Description;
return eValue.ToString(); return eValue.ToString();
} }
public static IEnumerable<KeyValuePair<string, string>> GetAllValuesAndDescription(Type t) public static IEnumerable<KeyValuePair<string, string>> GetAllValuesAndDescription(Type t)

View File

@ -12,24 +12,24 @@ using ENI2.Locode;
namespace ENI2.Util namespace ENI2.Util
{ {
static class GlobalStructures static class GlobalStructures
{ {
public static string[] GenderList = public static Dictionary<string, string> GenderDict = new Dictionary<string, string>
{ {
Properties.Resources.textNotKnown, { "0", Properties.Resources.textNotKnown },
Properties.Resources.textMale, { "1", Properties.Resources.textMale },
Properties.Resources.textFemale, { "2", Properties.Resources.textFemale },
Properties.Resources.textNotApplicable { "9", Properties.Resources.textNotApplicable }
}; };
public static string[] IDDocTypeList = public static Dictionary<string, string> IDDocTypeDict = new Dictionary<string, string>
{ {
Properties.Resources.textIdentityCard, { "0", Properties.Resources.textIdentityCard },
Properties.Resources.textPassport, { "1", Properties.Resources.textPassport },
Properties.Resources.textMusterBook, { "2", Properties.Resources.textMusterBook },
Properties.Resources.textPhotoId, { "3", Properties.Resources.textPhotoId },
Properties.Resources.textResidencePermit, { "4", Properties.Resources.textResidencePermit },
Properties.Resources.textOtherLegalIdentityDocument { "5", Properties.Resources.textOtherLegalIdentityDocument }
}; };
public static byte[] ShipSecurityLevels = { 1, 2, 3 }; public static byte[] ShipSecurityLevels = { 1, 2, 3 };

View File

@ -0,0 +1,22 @@
-- Some indices added during database optimization (Aug 22)
CREATE NONCLUSTERED INDEX IX_WAS_ID_WASTE ON [dbo].[Waste] ([WASId])
USE [nsw]
GO
SET ANSI_PADDING ON
GO
/****** Object: Index [IX_Visit_Transit_Core] Script Date: 25.08.2022 09:21:34 ******/
CREATE NONCLUSTERED INDEX [IX_Visit_Transit_Core] ON [dbo].[MessageCore]
(
[VisitId] ASC,
[TransitId] ASC
)
INCLUDE ( [QueryNSWStatus]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX IX_NOT_CLASS_MH ON [dbo].[MessageHeader] ([NotificationClass])

View File

@ -14,7 +14,7 @@ using System.Collections.Generic;
namespace bsmd.database namespace bsmd.database
{ {
public class CREW : DatabaseEntity, ISublistElement public class CREW : DatabaseEntity, ISublistElement, IBulkSaver
{ {
public CREW() public CREW()
@ -272,6 +272,112 @@ namespace bsmd.database
#endregion #endregion
#region Validation
public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
{
if (this.CrewMemberIdentityDocumentType.HasValue)
{
if (this.CrewMemberIdentityDocumentType.Value == 5)
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Doc. type set to OTHER_LEGAL_IDENTITY_DOCUMENT", null, this.Title, this.Identifier, this.Tablename));
}
if (this.CrewMemberIdentityDocumentIssuingState != null)
{
if (this.CrewMemberIdentityDocumentIssuingState.Equals("XX"))
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Id. doc issuing state set to XX", null, this.Title, this.Identifier, this.Tablename));
}
if (this.CrewMemberNationality != null)
{
if (this.CrewMemberNationality.Equals("XX"))
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Nationality set to XX", null, this.Title, this.Identifier, this.Tablename));
}
if (this.CrewMemberIdentityDocumentExpiryDate.HasValue)
{
if (this.CrewMemberIdentityDocumentExpiryDate.Equals(new DateTime(2100, 12, 31)))
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Id doc expiry date set to 31/12/2100", null, this.Title, this.Identifier, this.Tablename));
}
if (this.CrewMemberGender.HasValue)
{
if (this.CrewMemberGender == 0)
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Gender set to unknown", null, this.Title, this.Identifier, this.Tablename));
}
}
#endregion
#region IBulkSaver implementation
public DataTable PrepareBulkInsert(List<DatabaseEntity> databaseEntities)
{
DataTable result = new DataTable();
result.Columns.Add(new DataColumn { ColumnName = "MessageHeaderId", DataType = MessageHeader.Id.GetType() });
result.Columns.Add(new DataColumn { ColumnName = "CrewMemberLastName", DataType = typeof(string), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "CrewMemberFirstName", DataType = typeof(string), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "CrewMemberPlaceOfBirth", DataType = typeof(string), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "CrewMemberDateOfBirth", DataType = typeof(DateTime), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "CrewMemberGender", DataType = typeof(byte), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "CrewMemberNationality", DataType = typeof(string), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "CrewMemberIdentityDocumentType", DataType = typeof(byte), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "CrewMemberIdentityDocumentId", DataType = typeof(string), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "CrewMemberVisaNumber", DataType = typeof(string), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "CrewMemberDuty", DataType = typeof(string), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "Identifier", DataType = typeof(string), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "IsDeparture", DataType = typeof(bool), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "CrewMemberIdentityDocumentIssuingState", DataType = typeof(string), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "CrewMemberIdentityDocumentExpiryDate", DataType = typeof(DateTime), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "NotificationSchengen", DataType = typeof(bool), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "NotificationPAX", DataType = typeof(bool), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "CrewMemberCountryOfBirth", DataType = typeof(string), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "Effects", DataType = typeof(string), AllowDBNull = true });
foreach (CREW crew in databaseEntities)
{
DataRow row = result.NewRow();
row[0] = crew.MessageHeader.Id;
row[1] = crew.CrewMemberLastName ?? (object)DBNull.Value;
row[2] = crew.CrewMemberFirstName ?? (object)DBNull.Value;
row[3] = crew.CrewMemberPlaceOfBirth ?? (object)DBNull.Value;
row[4] = crew.CrewMemberDateOfBirth ?? (object)DBNull.Value;
row[5] = crew.CrewMemberGender ?? (object)DBNull.Value;
row[6] = crew.CrewMemberNationality?.Substring(0,2) ?? (object)DBNull.Value;
row[7] = crew.CrewMemberIdentityDocumentType ?? (object)DBNull.Value;
row[8] = crew.CrewMemberIdentityDocumentId ?? (object)DBNull.Value;
row[9] = crew.CrewMemberVisaNumber ?? (object)DBNull.Value;
row[10] = crew.CrewMemberDuty ?? (object)DBNull.Value;
row[11] = crew.Identifier ?? (object)DBNull.Value;
row[12] = crew.IsDeparture;
row[13] = crew.CrewMemberIdentityDocumentIssuingState?.Substring(0,2) ?? (object)DBNull.Value;
row[14] = crew.CrewMemberIdentityDocumentExpiryDate ?? (object)DBNull.Value;
row[15] = crew.NotificationSchengen ?? (object)DBNull.Value;
row[16] = crew.NotificationPAX ?? (object)DBNull.Value;
if (crew.CrewMemberCountryOfBirth == null)
{
row[17] = DBNull.Value;
}
else
{
if (crew.CrewMemberCountryOfBirth.Length > 2)
row[17] = crew.CrewMemberCountryOfBirth.Substring(0, 2);
else
row[17] = crew.CrewMemberCountryOfBirth;
}
row[18] = crew.Effects ?? (object)DBNull.Value;
result.Rows.Add(row);
}
result.TableName = this.tablename;
return result;
}
#endregion
} }
#region CREWD #region CREWD

View File

@ -729,6 +729,18 @@ namespace bsmd.database
return result; return result;
} }
public void DeleteAllPASForMessage(Guid? id)
{
if (!id.HasValue) return;
using (SqlCommand cmd = new SqlCommand())
{
cmd.CommandText = "DELETE FROM PAS WHERE MessageHeaderId = @MESSAGEHEADERID";
cmd.Parameters.AddWithValue("@MESSAGEHEADERID", id);
int numDel = this.PerformNonQuery(cmd);
_log.InfoFormat("Deleted all elements ({0}) from PAS message", numDel);
}
}
#endregion #endregion
#region internal/private funcs #region internal/private funcs
@ -1611,7 +1623,7 @@ namespace bsmd.database
bulkCopy.WriteToServer(table); bulkCopy.WriteToServer(table);
} }
} }
} }
#endregion #endregion

View File

@ -0,0 +1,136 @@
// Copyright (c) 2020-present schick Informatik
// Description: Container for HAZA subclass templates
using System;
using System.Collections.Generic;
using System.Data;
namespace bsmd.database
{
/// <summary>
/// Container for a dangerous goods template description which is imported from SQLite / Excel DB
/// Instances of this class will be offered to users as templates and respective DG entries created on them:
/// IGC, IMSBC, IBC and MARPOL (not! IMDG)
/// </summary>
public class HAZPosTemplate
{
#region enums
public enum SublistType
{
IBC,
IGC,
IMSBC,
MARPOL
}
#endregion
#region Properties
public string Description { get; set; }
public byte? Hazard { get; set; }
public byte? Flashpoint { get; set; }
public bool? SpecRef15_19 { get; set; }
public bool? MHB { get; set; }
public byte? IMSBC_HAZ { get; set; }
public string UNNr { get; set; }
public string IMOClass { get; set; }
public string Comment { get; set; }
public SublistType TemplateType { get; set; }
public byte? PollutionCategory { get; set; }
public string FP_IBC { get; set; }
#endregion
#region static storage helper classes
public static string GetQuery()
{
return "SELECT Beschreibung, HAZARD_ENUM, FP_ENUM, \"15.19?\", Typ, MHB, IMSBC_HAZ, \"UN-Nr.\", \"IMO-Cl.\", POLLUTION_CATEGORY_ENUM, Bemerkung, FP_IBC FROM GEFAHRGUTLISTE ORDER BY Beschreibung";
}
public static List<HAZPosTemplate> LoadList(IDataReader reader)
{
List<HAZPosTemplate> result = new List<HAZPosTemplate>();
while(reader.Read())
{
if (reader.IsDBNull(4)) continue; // this row has no type -> ignore
HAZPosTemplate hpt = new HAZPosTemplate();
hpt.Description = reader.GetString(0);
if (!reader.IsDBNull(1))
hpt.Hazard = (byte) reader.GetByte(1);
if (!reader.IsDBNull(2))
hpt.Flashpoint = (byte) reader.GetByte(2);
if (!reader.IsDBNull(3))
{
string specRefString = reader.GetString(3);
if (specRefString.Equals("JA", StringComparison.OrdinalIgnoreCase) || specRefString.Equals("Yes", StringComparison.OrdinalIgnoreCase)) hpt.SpecRef15_19 = true;
if (specRefString.Equals("NEIN", StringComparison.OrdinalIgnoreCase) || specRefString.Equals("No", StringComparison.OrdinalIgnoreCase)) hpt.SpecRef15_19 = false;
}
string type = reader.GetString(4);
switch(type)
{
case "IBC": hpt.TemplateType = SublistType.IBC; break;
case "IGC": hpt.TemplateType = SublistType.IGC; break;
case "IMSBC": hpt.TemplateType = SublistType.IMSBC ; break;
case "MARPOL": hpt.TemplateType = SublistType.MARPOL; break;
default:
continue; // ignore this thing
}
if(!reader.IsDBNull(5))
{
string mhbstring = reader.GetString(5);
if (mhbstring.Equals("y", StringComparison.OrdinalIgnoreCase))
hpt.MHB = true;
}
if (!reader.IsDBNull(6))
hpt.IMSBC_HAZ = (byte)reader.GetByte(6);
if (!reader.IsDBNull(7))
hpt.UNNr = reader.GetString(7);
if(!reader.IsDBNull(8))
hpt.IMOClass = reader.GetString(8);
if (!reader.IsDBNull(9))
hpt.PollutionCategory = (byte)reader.GetByte(9);
if (!reader.IsDBNull(10))
hpt.Comment = reader.GetString(10);
if (!reader.IsDBNull(11))
hpt.FP_IBC = reader.GetString(11);
result.Add(hpt);
}
return result;
}
#endregion
#region overrides
public override string ToString()
{
if (this.Description.Length > 75)
return string.Format("{0}...", this.Description.Substring(0, 75));
return Description;
}
#endregion
}
}

View File

@ -1,8 +1,5 @@
using System; using System.Collections.Generic;
using System.Collections.Generic; using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace bsmd.database namespace bsmd.database
{ {
@ -50,4 +47,9 @@ namespace bsmd.database
string Identifier { get; set; } string Identifier { get; set; }
} }
public interface IBulkSaver
{
DataTable PrepareBulkInsert(List<DatabaseEntity> databaseEntities);
}
} }

View File

@ -125,7 +125,7 @@ namespace bsmd.database
// create table columns // create table columns
foreach (PropertyInfo p in properties) foreach (PropertyInfo p in properties)
{ {
if (!(p.CanRead && p.CanWrite)) continue; if (!(p.CanRead && p.CanWrite)) continue;
Type propType = p.PropertyType; Type propType = p.PropertyType;
DataColumn dc = new DataColumn(); DataColumn dc = new DataColumn();
dc.ColumnName = p.Name; dc.ColumnName = p.Name;

View File

@ -692,12 +692,19 @@ namespace bsmd.database
public void SaveElements() public void SaveElements()
{ {
foreach (DatabaseEntity dbEntity in this.Elements) if (CanDoBulkSave())
{ {
DBManager.Instance.Save(dbEntity); this.BulkSaveElements();
if (dbEntity is ISublistContainer sublistContainer) }
else
{
foreach (DatabaseEntity dbEntity in this.Elements)
{ {
(sublistContainer).SaveElements(); DBManager.Instance.Save(dbEntity);
if (dbEntity is ISublistContainer sublistContainer)
{
sublistContainer.SaveElements();
}
} }
} }
} }
@ -857,7 +864,7 @@ namespace bsmd.database
} }
#endregion #endregion
#region IComparable implementation #region IComparable implementation
/// <summary> /// <summary>
@ -903,6 +910,39 @@ namespace bsmd.database
else this.Flags &= (int)~flag; else this.Flags &= (int)~flag;
} }
/// <summary>
/// Bulk save is actually bulk insert and can only be done for certain
/// message classes where bulk save is implemented
/// </summary>
private bool CanDoBulkSave()
{
if(this.MessageNotificationClass == NotificationClass.CREW ||
this.MessageNotificationClass == NotificationClass.CREWD ||
this.MessageNotificationClass == NotificationClass.PAS ||
this.MessageNotificationClass == NotificationClass.PASD)
{
foreach (DatabaseEntity subEntity in this.Elements)
if (!subEntity.IsNew)
return false;
return true;
}
return false;
}
private void BulkSaveElements()
{
if (this.Elements.Count == 0) return; // NOP
if(this.Elements[0] is IBulkSaver ibs)
{
DataTable dt = ibs.PrepareBulkInsert(new List<DatabaseEntity>(this.Elements));
DBManager.Instance.PerformBulkInsert(dt);
}
else
{
throw new InvalidOperationException("bulk save called on classes that do not support it");
}
}
#endregion #endregion
} }
} }

View File

@ -14,14 +14,18 @@ using System.Collections.Generic;
namespace bsmd.database namespace bsmd.database
{ {
public class PAS : DatabaseEntity, ISublistElement public class PAS : DatabaseEntity, ISublistElement, IBulkSaver
{ {
#region Construction
public PAS() public PAS()
{ {
this.tablename = "[dbo].[PAS]"; this.tablename = "[dbo].[PAS]";
} }
#endregion
#region Properties #region Properties
[ShowReport] [ShowReport]
@ -314,19 +318,117 @@ namespace bsmd.database
public override void Validate(List<MessageError> errors, List<MessageViolation> violations) public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
{ {
/* Nach RM Christin / Trello vom 27.11.17 auskommentiert // /* Nach RM Christin / Trello vom 27.11.17 auskommentiert
// und heute (19.10.22) wieder einkommentiert
if (this.PassengerPortOfDisembarkation != null) if (this.PassengerPortOfDisembarkation != null)
{ {
if (this.PassengerPortOfDisembarkation.Equals("ZZUKN")) if (this.PassengerPortOfDisembarkation.Equals("ZZUKN"))
violations.Add(RuleEngine.CreateViolation(ValidationCode.NOT_NULL, "PassengerPortOfDisembarkation", null, this.Title, this.Identifier, this.Tablename)); violations.Add(RuleEngine.CreateViolation(ValidationCode.NOT_NULL, "Port of disembarkation set to ZZUKN", null, this.Title, this.Identifier, this.Tablename));
} }
if (this.PassengerPortOfEmbarkation != null) if (this.PassengerPortOfEmbarkation != null)
{ {
if (this.PassengerPortOfEmbarkation.Equals("ZZUKN")) if (this.PassengerPortOfEmbarkation.Equals("ZZUKN"))
violations.Add(RuleEngine.CreateViolation(ValidationCode.NOT_NULL, "PassengerPortOfEmbarkation", null, this.Title, this.Identifier, this.Tablename)); violations.Add(RuleEngine.CreateViolation(ValidationCode.NOT_NULL, "Port of embarkation set to ZZUKN", null, this.Title, this.Identifier, this.Tablename));
} }
*/
if(this.PassengerIdentityDocumentType.HasValue)
{
if(this.PassengerIdentityDocumentType.Value == 5)
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Doc. type set to OTHER_LEGAL_IDENTITY_DOCUMENT", null, this.Title, this.Identifier, this.Tablename));
}
if(this.PassengerNationality != null)
{
if (this.PassengerNationality.Equals("XX"))
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Nationality set to XX", null, this.Title, this.Identifier, this.Tablename));
}
if (this.PassengerIdentityDocumentIssuingState != null)
{
if (this.PassengerIdentityDocumentIssuingState.Equals("XX"))
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Id. doc issuing state set to XX", null, this.Title, this.Identifier, this.Tablename));
}
if (this.PassengerIdentityDocumentExpiryDate.HasValue)
{
if(this.PassengerIdentityDocumentExpiryDate.Equals(new DateTime(2100, 12, 31)))
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Id doc expiry date set to 31/12/2100", null, this.Title, this.Identifier, this.Tablename));
}
if(this.PassengerGender.HasValue)
{
if(this.PassengerGender == 0)
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Gender set to unknown", null, this.Title, this.Identifier, this.Tablename));
}
}
#endregion
#region IBulkSaver implementation
public DataTable PrepareBulkInsert(List<DatabaseEntity> databaseEntities)
{
DataTable result = new DataTable();
result.Columns.Add(new DataColumn { ColumnName = "MessageHeaderId", DataType = MessageHeader.Id.GetType() });
result.Columns.Add(new DataColumn { ColumnName = "PassengerLastName", DataType = typeof(string), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "PassengerFirstName", DataType = typeof(string), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "PassengerPlaceOfBirth", DataType = typeof(string), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "PassengerDateOfBirth", DataType = typeof(DateTime), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "PassengerGender", DataType = typeof(byte), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "PassengerNationality", DataType = typeof(string), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "PassengerIdentityDocumentType", DataType = typeof(byte), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "PassengerIdentityDocumentId", DataType = typeof(string), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "PassengerVisaNumber", DataType = typeof(string), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "PassengerPortOfEmbarkation", DataType = typeof(string), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "PassengerPortOfDisembarkation", DataType = typeof(string), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "PassengerInTransit", DataType = typeof(bool), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "Identifier", DataType = typeof(string), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "IsDeparture", DataType = typeof(bool), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "PassengerIdentityDocumentIssuingState", DataType = typeof(string), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "PassengerIdentityDocumentExpiryDate", DataType = typeof(DateTime), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "NotificationSchengen", DataType = typeof(bool), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "NotificationPAX", DataType = typeof(bool), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "EmergencyCare", DataType = typeof(string), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "EmergencyContactNumber", DataType = typeof(string), AllowDBNull = true });
result.Columns.Add(new DataColumn { ColumnName = "PassengerCountryOfBirth", DataType = typeof(string), AllowDBNull = true });
foreach (PAS pas in databaseEntities)
{
DataRow row = result.NewRow();
row[0] = pas.MessageHeader.Id;
row[1] = pas.PassengerLastName ?? (object)DBNull.Value;
row[2] = pas.PassengerFirstName ?? (object)DBNull.Value;
row[3] = pas.PassengerPlaceOfBirth ?? (object)DBNull.Value;
row[4] = pas.PassengerDateOfBirth ?? (object)DBNull.Value;
row[5] = pas.PassengerGender ?? (object)DBNull.Value;
row[6] = pas.PassengerNationality ?? (object)DBNull.Value;
row[7] = pas.PassengerIdentityDocumentType ?? (object)DBNull.Value;
row[8] = pas.PassengerIdentityDocumentId ?? (object)DBNull.Value;
row[9] = pas.PassengerVisaNumber ?? (object)DBNull.Value;
row[10] = pas.PassengerPortOfEmbarkation ?? (object)DBNull.Value;
row[11] = pas.PassengerPortOfDisembarkation ?? (object)DBNull.Value;
row[12] = pas.PassengerInTransit ?? (object)DBNull.Value;
row[13] = pas.Identifier ?? (object)DBNull.Value;
row[14] = pas.IsDeparture;
row[15] = pas.PassengerIdentityDocumentIssuingState ?? (object)DBNull.Value;
row[16] = pas.PassengerIdentityDocumentExpiryDate ?? (object)DBNull.Value;
row[17] = pas.NotificationSchengen ?? (object)DBNull.Value;
row[18] = pas.NotificationPAX ?? (object)DBNull.Value;
row[19] = pas.EmergencyCare ?? (object)DBNull.Value;
row[20] = pas.EmergencyContactNumber ?? (object)DBNull.Value;
row[21] = pas.PassengerCountryOfBirth ?? (object)DBNull.Value;
result.Rows.Add(row);
}
result.TableName = this.tablename;
return result;
} }
#endregion #endregion

View File

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

View File

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

View File

@ -271,6 +271,12 @@ namespace bsmd.database
if (this.WasteAmountGeneratedTillNextPort_MTQ > 10000) if (this.WasteAmountGeneratedTillNextPort_MTQ > 10000)
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Waste generated till next port", null, this.Title, this.Identifier, this.Tablename)); violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Waste generated till next port", null, this.Title, this.Identifier, this.Tablename));
if(this.WasteDisposalAmount_MTQ > this.WasteCapacity_MTQ)
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Disposal greater than capacity!", null, this.Title, this.Identifier, this.Tablename));
if((this.WasteAmountGeneratedTillNextPort_MTQ + this.WasteAmountRetained_MTQ) > this.WasteCapacity_MTQ)
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Waste generated+retained greater than capacity!", null, this.Title, this.Identifier, this.Tablename));
} }
#endregion #endregion

View File

@ -113,6 +113,7 @@
<Compile Include="Customer.cs" /> <Compile Include="Customer.cs" />
<Compile Include="Extensions.cs" /> <Compile Include="Extensions.cs" />
<Compile Include="HAZ.cs" /> <Compile Include="HAZ.cs" />
<Compile Include="HAZPosTemplate.cs" />
<Compile Include="IBCPosition.cs" /> <Compile Include="IBCPosition.cs" />
<Compile Include="IDatabaseEntity.cs" /> <Compile Include="IDatabaseEntity.cs" />
<Compile Include="IGCPosition.cs" /> <Compile Include="IGCPosition.cs" />

0
cps.db Normal file
View File

294
misc/GEFAHRGUTLISTE.csv Normal file
View File

@ -0,0 +1,294 @@
Beschreibung;Gefahr;HAZARD_ENUM;FP;FP_ENUM;15.19?;Typ;IMSBC;MHB;IMSBC_MHB;Group;IMSBC_HAZ;UN-Nr.;IMO-Cl.;IBC;POLLUTION_CATEGORY_ENUM;MARPOL;IGC;FP_IBC;Bemerkung
1,3 Pentadiene / Piperylene;P;0;<60°C;2;Ja;IBC;;;;;;;;x (Y);1;;;;
Acetic acid ;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (Z);2;;;;
Acetic acid glacial;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (Z);2;;;;
Acetone ;;;<60°C;2;Nein;IBC;;;;;;;;x (Z);2;;;;
Acrylonitrile (ACN) ;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (Y);1;;;;
Alcoholic beverages, n.o.s. (Wine);;;;; ;IBC;;;;;;;;x (Z);2;;;;
Alkanes (C6-C9);;;>60°C;1;Ja;IBC;;;;;;;;x (X);0;;;;
n-Alkanens (C10+) ;;;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
Alkylate;;;<60°C;2; ;MARPOL;;;;;;;;;;x;;6;
alpha-Methylstyrene ;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (Y);1;;;;
Ammonia aqueous (28% or less);S/P;2;NF;0;Ja;IBC;;;;;;;;x (Y);1;;;NF;
Ammonia / Anhydrous / Ammoniak;;;;; ;IGC;;;;;;1005;2.3;;;;x;;
Ammoniak Liquid 24,5% ;S/P;2;;;Ja;IBC;;;;;;;;x (Y);1;;;;
Ammonium Nitrate Fertilizer ;;;;; ;IMSBC;x;;;B;1;2067;5.1;;;;;;
Ammonium Nitrate with not more than 0,2% total;;;;; ;IMSBC;x;;;B;1;1942;5.1;;;;;;
Ammonium Polyphosphate Solution (APP) ;P;0;>60°C;1;Nein;IBC;;;;;;;;x (Z);2;;;;
Ammonium Sulphate;;;;; ;;;;;;;;;;;;;;Keine Anmeldung, IMSBC Gruppe C
Ammonium nitrate solution (93% or less) ;S/P;2;NF;0;Ja;IBC;;;;;;;;x (Y);1;;;;
Aniline ;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
Anthracene Oil , ;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (X);0;;;;
Anthracite / Coal / Kohle;;;;; ;IMSBC;x;y;;A/B;2;;;;;;;;Gruppe: B (und A)
ATRES / RAT / Atmospheric Residues / Residues (petroleum) atmospheric (APS Bottoms Resid A);;;>60°C;1;;MARPOL;;;;;;;;;;x;;;
AVGAS / Aviation Gasoline / Flugbenzin;;;;;;MARPOL;;;;;;;;;;x;;;
BALED RDF;;;;;;IMSBC;x ;y;;B;1;;;;;;;;
Base Oil / Lubricating oil / SN150/ SN500 / SN900 / VISOM 4 / Ultra S4 / Bright Stock / QHVI4 / QHVI8 / VHVI-4 = DISTILLATES (PETROLEUM) / HYDROTREATED HEAVY PARAFFINIC,;;;>60°C;1; ;MARPOL;;;;;;;;;;x;;;
Benzene / Benzol;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (Y);1;;;-11;
Biodiesel / FAME - Fatty acid methyl esters;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (Y) ;;;;;
Bitumen ;;;>60°C;1;;MARPOL;;;;;;;;;;x;;;
Blei in Blöcken / Lead Ingots;;;;;;;;;;;;;;;;;;; kein Gefahrgut! Aussage Herr Jnassen Rhenus Midgard Nordenham (tel. 21.07.2021)
Butan;;;;;;IGC;;;;;;1011;2.1;;;;x;;
Butene / Buthylen;;;;;;IGC;;;;;;1012;2.1;;;;x;;
Butyl acrylate (all isomers);S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (Y);1;;;;
Calcined clay / Kalzinierter Ton;;;;; ;;;;;;;;;;;;;;Keine Anmeldung, IMSBC Gruppe C
C9 Petroleum Resin;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (Y);1;;;;
Calcium Ammonium Nitrate 27% N / CAN (in Big BAG);;;;; ;;;;;;;;;;;;;;Keine Anmeldung lt. Aussage von Wasserschutzpolizeit Hamburg
Calcium Ammonium Nitrate 27% N / CAN (in BULK);;;;; ;;;;;;;;;;;;;;Keine Anmeldung, IMSBC Gruppe C
Calcium Chloride Solution;P;0;>60°C;1; ;IBC;;;;;;;;x (Z);2;;;;
CARBON BLACK FEEDSTOCK / D8 / ANTHRACENE OIL;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (X);0;x;;;nach Sicherheitsdatenblatt fragen kann IBC oder Marpol sein
Carbon Black Oil Propylene Oxide;;;;;;MARPOL;;;;;;;;;;x;;;
Carbon Dioxide;;;;; ;IGC;;;;;;1013;2.2;;;;x;;
Caromax 28 ;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (X);0;;;;
Caustic potash / Potassium hydroxide solution / Kalilauge ;S/P;2;NF;0;Ja;IBC;;;;;;;;x (Y);1;;;;
Caustic soda / Sodium hydroxide solution / Natronlauge;S/P;2;NF;0; Ja;IBC;;;;;;;;x (Y);1;;;;
China Clay;;;;; ;;;;;;;;;;;;;;Keine Anmeldung lt. Aussage von Herrn Schlicht (S+B) in Absprache mit Wasserschutz
Clay / TON;;;;; ;;;;;;;;;;;;;;Keine Anmeldung, IMSBC Gruppe C
Chloroform ;S/P;2;NF;0;Ja;IBC;;;;;;;;x (Y);1;;;;
Coal Tar ,;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (X);0;;;;
Coal Tar Pitch (Flüssig);S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (X);0;;;;
Coal Tar Pitch / Steinkohlenteerpech (FEST);;;;;;IMSBC;x;y;;B;1;;;;;;;;
Coconut oil ;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
COKE BREEZE / Koksgrus;;;;; ;IMSBC;x;;;;;;;;;;;;"NICHT MHB + KEINE UN-Nummer! Mit UN-Nr. ""0000"" + IMO-class ""1.1"" eingeben + Vermerk: ""UN-no. + IMO-class not available"" (im Jgegis muss es mit ""MHB"" angemeldet werden) - GR. A"
Used cooking oil (mit Triglycerides, C16-C18 and C18 unsaturated) ;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
Used cooking oil (wenn Triglycerides nicht ausdrücklich ausgewiesen) ;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (X);0;;;;
Copper concentrates ;;;;; ;IMSBC;x;;;A;0;3077;9;;;;;;
Copper concentrates (Metal Sulphide Concentrates);;;;; ;IMSBC;x;y;;A/B;2;;;;;;;;
Corn Oil , ;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
Creosete Oil ;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (X);0;;;;
Crude Benzene and mixtures having 10% benzene or more ;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (Y);1;;;;
Cumene / Isopropylbenzene ;P;0;<60°C;2;Ja;IBC;;;;;;;;x (y);1;;;;
Cutterstock / Cutter;;;;; ;MARPOL;;;;;;;;;;x;;;
Cyclohexane;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (Y);1;;;;
DDGS Pellets / Dried Distiller Grains with solubles;;;;;;;;;;;;;;;;;;;Keine Anmeldung
DINP DIALKYL / Diisononylphthalat;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (X);0;;;;
Distillate Hydrocrackers / DHC;;;;; ;MARPOL;;;;;;;;;;x;;;Bottoms Raw marterial for chemical industry Feedingstock for mineral oil industry
DIAMMONIUM PHOSPHATE / DAP;;;;; ;;;;;;;;;;;;;;Keine Anmeldung, IMSBC Gruppe C
1,1- Dichloroethane;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (Z);2;;;;
DIRECT REDUCED IRON;;;;; ;IMSBC;x;y;;B;1;;;;;;;;
"Distillate / D10V / LVG / D8C / D10C / D10JUB / D 600 / D 700 / D 2000
";;;;; ;MARPOL;;;;;;;;;;x;;;
DOLOMITE;;;;; ;;;;;;;;;;;;;;Keine Anmeldung, IMSBC Gruppe C, evtl. Ist auch Dolomitic quicklime gemeint, Nachfragen
Dolomitic quicklime;;;;; ;IMSBC;x;y;;B;1;;;;;;;;
Eisen II Sulphat;;;;; ;;;;;;;;;;;;;;Keine Anmeldung, IMSBC Gruppe C
Eisensilikat granulat / Iron Silicate Granules;;;;;;;;;;;;;;;;;;;Keine Anmeldung, IMSBC Gruppe C
Energy Rich Fuel / Neste Renewable Diesel / NExBTL / HVO / Hydrotreated Vegetable Oils;S/P;2;>60°C;1;;;;;;;;;;;;;;;siehe Bemerkung NExBTL - Renewable Diesel
Ethyl acetate ;P;0;<60°C;2;Ja;IBC;;;;;;;;x (Z);2;;;;
Ethanol / Ethyl alcohol / Grain alcohol / Drinking alcohol;frei lassen;;<60°C;2;Nein;IBC;;;;;;;;x (Z);2;;;;
Ethylene glycol / (Mono-)Ethylenglycol / MEG / Glycol;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (Z);2;;;;
Ethyl tert-butyl ether / ETBE ;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (Y);1;;;;
Ethylene;;;;; ;IGC;;;;;;1038;2.1;;;;X;;
ETHYLENE DICHLORIDE (ETD) ;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (Y) ;;;;;
Etibor / BORAX / PENTAHYDRATE CRUDE;;;;; ;;;;;;;;;;;;;;Keine Anmeldung
EXTRAIT / Vacuum gas oil;;;;;;MARPOL;;;;;;;;;;x;;;
Fatty acids, (C16+);P;0;<60°C;2;Ja;IBC;;;;;;;;x (Y) ;;;;;
FAME / Fatty acid methyl esters / Biodiesel ,;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (Y) ;;;;;
Feed Phosphate / Monocalcium Phosphate;;;;; ;;;;;;;;;;;;;;Keine Anmeldung, IMSBC Gruppe C
Ferroalloys / Ferro Silico Mangan / Ferrolegierung (unter 20 %);;;;; ;;;;;;;;;;;;;;Keine Anmeldung, IMSBC Gruppe C
Ferrochrom;;;;;;;;;;;;;;;;;;;Keine Anmeldung, IMSBC Gruppe C
Ferrosilicochrom 40 / Ferrosilicon;;;;; ;IMSBC;x;;;B;1;1408;4.3;;;;;;
FERROUS METAL / BORINGS / SHAVINGS / TURNINGS / CUTTINGS;;;;; ;IMSBC;x;;;B;1;2793;4.2;;;;;;
Fish Meal treated with Antioxidant;;;;; ;IMSBC;x;;;B;1;2216;9;;;;;;wenn Ladehafen Bremen dann Gruppe C und nicht anzumelden
Fishoil;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (Y) ;;;;;
Fish Silage Protein Concentrate (containing 4% or less formic acid);P;0;NF;0;Ja;IBC;;;;;;;;x (Y) ;;;;;
Fish protein concentrate (containing 4% or less formic acid);P;0;NF;0;Nein;IBC;;;;;;;;x (Z);2;;;;
FLUORSPAR / Flussspat;;;;; ;IMSBC;x;y;;B;1;;;;;;;;
Fly Ash;;;;; ;;;;;;;;;;;;;;Keine Anmeldung
Formaldehyde solutions / Formalin ;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
FORMIC ACID (85% or less acid) , ;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
FORMIC ACID (over 85% acid) , ;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (Y);1;;;;
Foundry Coke / Gießereikoks /COKE;;;;; ;;;;;;;;;;;;;;Keine Anmeldung, IMSBC Gruppe C
Fraction C6 (containing benzene);S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
Gas Condensate;;;<60°C;2; ;MARPOL;;;;;;;;;;x;;;
GAS OIL / Light Cycle Oil;;;>60°C;1; ;MARPOL;;;;;;;;;;x;;;
Gasoline blending stocks / Reformates / Gasoline blending stocks / polymer-fuel /Gasoline blending stocks / alkylates-fuel;;;;; ;MARPOL;;;;;;;;;;x;;;
Glycerine;S;1;>60°C;1;Nein;IBC;;;;;;;;x (Z);2;;;;
Ground Colemanite;;;;; ;;;;;;;;;;;;;;Keine Anmeldung
Gypsum / Gips;;;;; ;;;;;;;;;;;;;;Keine Anmeldung, IMSBC Gruppe C
HCGO / Heavy Cycle Gas Oil;;;;; ;MARPOL;;;;;;;;;;x;;;
HFO ;;;;;;MARPOL;;;;;;;;;;x;;;
Holzstämme / Wooden Poles;;;;; ;IMSBC;x;y;;B;1;;;;;;;;Nur wenn unter Deck, nur wenn in Loser Schüttung!
Hydrochloric Acid;S/P;2;NF;0;Ja;IBC;;;;;;;;x (Z);2;;;NF;
Hydrocarbon Wax / PROWAX 312;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (X);0;;;;
Hydro Cracker Bottoms ;;;;;;MARPOL;;;;;;;;;;x;;;
Hydrotreated Renewable Oil ;S/P;2;>60°C;1; ;IBC;;;;;;;;x (Y);1;;;;
IFO380 ;;;>60°C;1; ;MARPOL;;;;;;;;;;x;;;
ILMENITE CLAY / Ilmenit-Ton;;;;; ;IMSBC;x;;;;;;;;;;;;Anmerkung: Ilmenite für Nordenham= Ilmenit Sand - keine Anmeldung als GG
ILMENITE Concentrate;;;;;;IMSBC;x;;;;;;;;;;;;Keine Anmeldung, IMSBC Gruppe C
IRON ORE / Eisenerz;;;;; ;;;;;;;;;;;;;;Keine Anmeldung, IMSBC Gruppe C
IRON ORE / Eisenerz (FINES);;;;;;IMSBC;x;;;A;0;;;;;;;;x Kein MHB, ohne UN-/IMO-Nr. senden = geht nur im ENI (JGegis will eine Auswahl)
Iso- and cyclo-alkanes (C12+) / LIAV270 ;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (Y);1;;;;
Iso- and cyclo-alkanes (C10-C11+) ;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (Y);1;;;;
Isomerate ;;;<60°C;2;;MARPOL;;;;;;;;;;x ;;;
Isopentane / Pentane ;P;0;<60°C;2;Ja;IBC;;;;;;;;x (Y);1;;;;
Isoprene ;S/P;2;<60°C;2;;IBC;;;;;;;;x (Y);1;;;;
JET A1 / Normal Russian TS-1 / Kerosin / Kerosene;;;<60°C;2; ;MARPOL;;;;;;;;;;X;;;
Kalk ungeschlöscht / LIME UNSLAKED;;;;; ;IMSBC;x;y;;B;1;;;;;;;;
Odourless Kerosene;;;>60°C;1;;MARPOL;;;;;;;;;;x;;;
Kokospalmenschalen;;;;;;IMSBC;x;;;;;;;;;;;;Keine Anmeldung
Lard / Schmalz;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
LCCS / Light Catalytically Cracked Spirit / Light Catalytically Cracked Naphtha;;;;; ;MARPOL;;;;;;;;;;x;;;
Lecithin ;;;;;;IBC;;;;;;;;x (OS);3;;;;
Lead Concentrate ;;;;; ;IMSBC;x;;;A;0;3077;9;;;;;;"Nachfragen ob als Mineral Concentrates (3077/9) oder METAL SULPHIDE CONCENTRATES (MHB) (""Shippers declaration for solid bulk cargos"" anfordern oder auch ""Cargo information for solid bulk cargos"""
Lead Concentrate (Metal Sulphide Concentrates);;;;; ;IMSBC;x;y;;A/B;2;;;;;;;;"Nachfragen ob als Mineral Concentrates (3077/9) oder METAL SULPHIDE CONCENTRATES (MHB) (""Shippers declaration for solid bulk cargos"" anfordern oder auch ""Cargo information for solid bulk cargos"""
Lead Ingots;;;;;;IBC;;;;;;;; ;;;;;Keine Anmeldung lt. Aussage Herr Jnassen Rhenus Midgard Nordenham (tel. 21.07.2021)
Light Vacuum Gas Oil / Petroleum / Petroleum Hydrocarbons;;;;;;MARPOL;;;;;;;;;;x;;;
Ligninsulphonic Acid / Sodium Salt Solution;P;0;>60°C;1;Nein;IBC;;;;;;;;x (Z);2;;;;
Ligno Sulphonate Sodium / Sulphite Lie (Lye) ;P;0;>60°C;1; ;IBC;;;;;;;;x (Z);2;;;;
Lime ;;;;;;IMSBC;x;y;;B;1;;;;;;;;
Limestone / Kalkstein;;;;; ;;;;;;;;;;;;;;Keine Anmeldung
Liquid petroleum paraffin, fraction of C14-C17 <2% aromatics);P;0;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
Lukoil / Crude Oil;;;;; ;MARPOL;;;;;;;;;;x;;;
Magnesium Chloride Solution;P;0;>60°C;1;Nein;IBC;;;;;;;;x (Z);2;;;;
Metal Sulphide Concentrates / Zink / Blei / Silber;;;;; ;IMSBC;x;y;;A/B;2;;;;;;;;
Methanol / Methyl Alcohol ;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (Y) ;;;;;
Methyl Acrylate ;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (Y);1;;;;
Methyl Alcohol / Methanol ;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (Y) ;;;;;
Methyl Isobutyl Ketone ;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (Z);2;;;;
Methylendiphenylisocyanate / MDI / Polymethylene polyphenyl isocyanate ;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (Y) ;;;;;
Methyl Methacrylate Monomer / MMM ;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (Y) ;;;;;
Methyl Tert-Butyl Ether / MTBE ;P;0;<60°C;2;Ja;IBC;;;;;;;;x (Z);2;;;;
Mixed Fatty acid / MFA;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (Y) ;;;;;
Mixed Xylene ;P;0;<60°C;2;Ja;IBC;;;;;;;;x (Y);1;;;;
Molasses;;;NF;0; ;IBC;;;;;;;;x (OS);3;;;;Nicht anmeldepflichtig - Ausnahme: BREMEN (lt Auskunft von Herrn Kraft 09.01.2018)//FÜR BREMEN ANMELDEN ÜBER J GEGIS - an DBH - ohne Visit ID
Monoammonium Phosphate / MAP;;;;; ;;;;;;;;;;;;;;Keine Anmeldung
Monocalcium Phosphate / MCP / Futtermittel;;;;; ;IMSBC;x;y;;A/B;2;;;;;;;;Verpackt (IMDG) nicht anmeldepflichtig
Monoethylen Glycol / MEG;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (Z);2;;;;
Muriate of potash / Kaliumchlorid;;;;; ;;;;;;;;;;;;;;Keine Anmeldung
n-Alkanes (C10+) / N-Paraffine / Paraffine Normal;P;0;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
N-Butanol / N-BUTYL ALCOHOL;;;<60°C;2; ;IBC;;;;;;;;x (Z);2;;;;
N-paraffines / N-ALKANES (C10+);P;0;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
Naphtha ;;;<60°C;2;;MARPOL;;;;;;;;;;x;;;
Naphthalene / Molten;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (X);0;;;;
Nepherlin Matrix 350 / Sand / Glas / Porzellan;;;;; ;;;;;;;;;;;;;;
NESSOL 40 (Noxious liquid, F, (6) n.o.s White Spirit);P;0;<60°C;2;Ja;IBC;;;;;;;;x (Y);1;;;;
Nessol D40 (Noxious liquid, F, (8) n.o.s. (siehe Noxious liquid…); ;; ;; ;IBC;;;;;;;; ;;;;;
Nessol D60 ( (contains Iso- und Cycloalkanes (C10-C11) (siehe Noxious liquid...); ;; ;; ;IBC;;;;;;;; ;;;;;
Nessol D100 (contains Iso- und Cycloalkanes (C12+) ; ;; ;; ;IBC;;;;;;;; ;;;;;
NExBTL / Renewable Diesel;;;>60°C;1;;IBC;;;;;;;;x (Y);1;;;>60;Risks: nicht zu finden in IBC-Code
Refinery NexTAME / Noxious liquid, F, (4) n.o.s. (trade name ...., contains ....) ;;;<60°C;2;Ja;IBC;;;;;;;;x (X);0;;;;
Nickelconzentrat ;;;;;;IMSBC;x;;;A;0;;;;;;;;
Nitric acid (70% and over) ;S/P;2;NF;0;Ja;IBC;;;;;;;;x (Y);1;;;;
Nitric acid (less than 70%) ;S/P;2;NF;0;Ja;IBC;;;;;;;;x (Y);1;;;;
Nonene / All Isomers;P;0;<60°C;2; ;IBC;;;;;;;;x (Y);1;;;;siehe auch Propylene Trimer
NON OXY EBOB / Gasoline;;;;;;MARPOL;;;;;;;;;;x;;;
Normal Russian TS-1 Kerosene;;;;;;MARPOL;;;;;;;;;;x;;>23;
"Noxious liquid, NF, (5) n.o.s. / Trade Name (Nexbase 3050;3020;3030,3043) / Containscontains Iso- and cyclo-alkanes ";P;0;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
Noxious liquid, NF(5) n.o.s. LI 220 HF contains White Spirit, low ;P;0;<60°C;2;Ja;IBC;;;;;;;;x (Y);1;;;;
Noxious liquid, NF(5) n.o.s.(Solvesso 100, contains Alkyl (C3-C4) benzenes) ;P;0;<60°C;2;Ja;IBC;;;;;;;;x (Y);1;;;;
Noxious liquid, NF, (7) n.o.s. (Exxsol D80 , contains iso-and cycloalkanes(C12+));P;0;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
Noxious liquid, NF, (7) n.o.s. ((EXXSOL D60 und auch Nessol D60, contains iso-and cycloalkanes (C10-C11));P;0;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
Noxious liquid, F, (8) n.o.s. (NESSOL D40 contains Iso- and cycloalkanes (C10-C11)) ;P;0;<60°C;2;ja;IBC;;;;;;;;x (Y);1;;;;
NPK Fertilizer / Ammonium Nitrate Based Fertilizer (Non Hazardous);;;;; ;;;;;;;;;;;;;;Keine Anmeldung
Nynas VR5000 / Bitumen;;;>60°C;1;;MARPOL;;;;;;;;;;x;;;
NYTRO TAURUS / Insulating Oil;;;;;;MARPOL;;;;;;;;;;x;;;
Octene;P;0;<60°C;2;Ja;IBC;;;;;;;;x (Y);1;;;;
Odourless Kerosene D70 ;;;;;;MARPOL;;;;;;;;;;x;;;
Olivines / Mineralgemisch gehört Mineralklasse der „Silikate und Germanate“ ;;;;;;;;;;;;;;;;;;;Keine Anmeldung
Olive Stones (crushed) / Seed Cake / Oil Cake;;;;; ;IMSBC;x;;;B;1;1386;4.2;;;;;;
ORTHO-XYLENE ;P;0;<60°C;2;Ja;IBC;;;;;;;;x (Y);1;;;;
Palm fatty acid distillate / PFAD;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
Palmkernexpellers / pulverisierte Kernschalen;;;;;;;;;;;;;;;;;;;Keine Anmeldung lt. J.Müller Brake - siehe aber auch SEED CAKE
PALM KERNEL OIL / CPKO / Crude Palm Kernel Oil;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
PALM KERNEL STEARIN ;P;0;>60°C;1;Ja;;;;;;;;;;;;;;
PALM MID-FRACTION ;P;0;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
PALM OIL ;P;0;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
PALM OLEINE ;P;0;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
Palm stearin ;P;0;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
Palmitic Acid ;;;;; ;IBC;;;;;;;;x (Y);1;;;;
n-Paraffins (C10-C20) / N-ALKANES (C10+);P;0;>60°C;1; ;IBC;;;;;;;;x (Y);1;;;;
Paraffin wax, highly-refined ;P;0;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
Paraffin wax, semi-refined ;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (X);0;;;;
PARA XYLENE ;P;0;<60°C;2;Ja;IBC;;;;;;;;x (Y);1;;;;
Pea Coke;;;;; ;;;;;;;;;;;;;;Keine Anmeldung
PEAT MOSS / Torf;;;;; ;IMSBC;x;y;;A/B;2;;;;;;;;Für den Kielkanal nicht anmelden lt. Rücksprache UCA+Herrn Langbein/01.02.2016 => gültig für UCA/S+B
Peat (milled);;;;; ;;;;;;;;;;;;;;Keine Anmeldung lt. Herrn Schütte für NOK nicht anmelden/09.02.2021
Pentadiene / 1,3-Pentadiene;P;0;<60°C;2;Ja;IBC;;;;;;;;x (Y);1;;;;
Perchloroethylene ;S/P;2;NF;0;;IBC;;;;;;;;x (Y);1;;;;
PETROLEUM COKE / calcined or uncalcined oder Calcined Coke / Petcoke;;;;; ;IMSBC;x;y;;B;1;;;;;;;;
PGI / Propylene Glycol Industrial;S/P;2;>60°C;1;?;IBC;;;;;;;;x (Z);2;;;;
Phenol;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
Phosphoric Acid ;S/P;2;NF;0;Ja;IBC;;;;;;;;x (Z);2;;;;
PITCH / Pech;;;;; ;IMSBC;x;y;;B;1;;;;;;;;In Bulk/Pitch Verpackt (MSDS = Material Safetey Data Sheet anfordern)
PME / Biodiesel;;;;; ;IBC;;;;;;;;x (Y);1;;;;
Polymethylene Polyphenyl Isocyanate ;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (Y) ;;;;;
Polyolefin (molecular weight 300+) ;P;0;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
Potash / Pottasche;;;;; ;;;;;;;;;;;;;;Keine Anmeldung
Potassium Hydroxide Solution / Caustic Potash / Kaliumhydroxidlösung;S/P;2;NF;0;Ja;IBC;;;;;;;;x (Y);1;;;;
Propylbenzene / all isomers;P;0;<60°C;2;Ja;IBC;;;;;;;;x (Y);1;;;;
Propylene;;;;; ;IGC;;;;;;1077;2.2;;;;x;;
Propylene Dichloride / 1,2-DICHLOROPROPANE;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (Y) ;;;;;
Propylene Glycol Monoalkyl Ether / DOWANOL PM;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (Z);2;;;;
Propylene Oxide; ;; ;; ;IBC;;;;;;1280;3; ;;;x;;
Propylene Tetramer ;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (X);0;;;;
Propylene Trimer ;P;0;<60°C;2;Ja;IBC;;;;;;;;x (Y);1;;;;
Pyrolysis Fuel Oil;;;;; ;IBC;;;;;;;;?;;?;;;
Pyrolysis Gasoline containing benzene / Pygas /Aromatic hydrocarbons / C6-8 / Naphtha-Raffinate Pyrolyzate-derived ;S/P;2;<60°C;2;Ja;IBC;;;;;;;; x (Y) ;;;;;
Pyrite;;;;;;;;;;;;;;;;;;;"Achtung! Kann ""IMSBC: Gruppe C"" (also nicht anmeldepflichig sein) oder auch ""Gruppe: A"" bzw. ""Gruppe: A/B"" (somit Anmeldepflichtig)- beim Kunden nachfragen und ""Shippers declaration for solid bulk cargos"" oder es nennt sich auch ""Cargo information for solid bulk cargos"" anfordern"
Quicklime / Kalk ungelöscht / Lime / Burnt Lime / Un-slaked Lime / Building Lime / Calcia / Fat Lime / Chemical Lime / Fluxing Lime / Hard Burnt Lime / Soft Burnt Lime / Pebble Lime / Calcium Oxide / Calcium Monoxide / Calcined Limestone / Calcium oxide / CaO;;;;;;IMSBC;x;Y;;B;1;;;;;;;;
Rapeseed oil / Rapsöl;P;0;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
Rape seed oil fatty acid methyl esters ;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
BALED RDF;;;;;;IMSBC;x;y;;B;1;;;;;;;;beim KD/Schiff nach Blatt „Shipper's Declaration for Solid Bulk Cargos“ oder „Cargo Information for solid bulk cargos“„ fragen - 13.12.2021
Refinery NexTAME / Noxious liquid, F, (4) n.o.s. (trade name ...., contains ....);P;0;<60°C;2;Ja.;IBC;;;;;;;;x (y);1;;;;
Reformate / Naphtha / Gas Oil / UMS / Unleaded mo gas / Motor Gas;;;;;;MARPOL;;;;;;;;;;x;;;
RDF pellets / Refuse Derived Fuel;;;;; ;;;;;;;;;;;;;;Keine Anmeldung
Resin Oil / Distilled ;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (Y);1;;;;
RME 0,4MG/11 / FAME;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
Sawn Timber / Schnittholz / Sägeholz;;;;; ;IMSBC;x;;;;;;;;;;;;nur wenn als Bulk (also keine Verpackung jeglicher Art (Drahtseile, Kunststoffbänder) und unter Deck
SEED Cake mit einem Ölgehalt von höchstens 1,5% und einem Feuchtigkeitsgehalt von höchstens 11% ///with not more than 1.5% oil and not more than 11% moisture.;;;;;;IMSBC;x;;;B;1;2217;4.2;;;;;;
SEED Cake containing vegetable oil a) durch mechanisches Pressen gewonnene Ölsaatenrückstände, die mehr als 10% Öl oder mehr als 20% Öl und Feuchtigkeit zusammen enthalten / (a) mechanically expelled seeds, containing more than 10% of oil or more than 20% of oil and moisture combined.);;;;;;IMSBC;x;;;B;1;1386;4.2;;;;;;
Shale Oil;;;;; ;MARPOL;;;;;;;;;;x;;;
Slack Wax / Petroleum / Hydrocarbon Wax;S/P;2;>60°C;1; ;IBC;;;;;;;;x (X);0;;;;
Slop Water;;;;; ;;;;;;;;;;;;;;Keine Anmeldung lt. Johann/16.12.12
Slops;;;;; ;;;;;;;;;;;;;;
Slurry / Residues / Petroleum;;;;; ;MARPOL;;;;;;;;;;x ;;;
Small Arms = Waffen zur Schiffsausrüstung gehörig;;;;; ;;;;;;;;;;;;;;Keine Anmeldung lt. Aussage von Fr. Kauschmann/16.05.2013 (09:50 Uhr)
Solvent ;;;;;;;;;;;;;;;;;;;Sicherheitsdatenblatt anfordern!!!
Sodium hydroxide solution / Caustic soda / Natronlauge;S/P;2;NF;0;Ja;IBC;;;;;;;;x (Y);;;;;
Sodium Sulphate in Bulk;;;;; ;;;;;;;;;;;;;;Keine Anmeldung lt. Aussage von Herrn Illing Gefahrgutauskunfststelle Hamburg/14.02.14-10.25 Uhr
Soyabean meal / SBM / Sojabohnenmehl;;;;; ;IMSBC;x;y;;;;;;;;;;;"Kann Cat. A, B oder C sein (abhängig von der Zusammensetzung),
wenn keine genaue Angabe => Anfragen, ob anmledepflichtig oder nicht,
Wenn Port of Loading = Brake oder Hamburg => Cat. C und damit nicht anmeldepflichtig"
Soyabean Oil ,;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
Soja protein concentrat / SPC;;;;;;;;;;;;;;;;;;;Keine Anmeldung
Steel Turnings;;;;; ;IMSBC;x;;;B;1;2793;4.2;;;;;;
Styrene Monomer ,;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (Y);1;;;;
Sulphur (molten) ;S;1;>60°C;1;Nein;IMSBC; ;;;;;;;x (Z);2;;;;
Sulphuric Acid;S/P;2;NF;0;Ja;IBC;;;;;;;;x (Y);1;;;;
Sunflower Husk Pellets in bulk;;;;;;;;;;;;;;;;;;;Keine Anmeldung, Gruppe C - tel Aussage Hr. Meiners (J.Müller)
Sunflower Seed Oil ;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (Y) ;;;;;
Tall oil fatty acid / TOFA (resin acids less than 20%) ;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
Tall oil pitch ;P;0;>60°C;1;Ja;IBC;;;;;;;;x (Y);1;;;;
Tallow fatty acid;P;0;>60°C;1;Ja;IMSBC; ;;;;;;;x (Y);1;;;;
tert-Amyl ethyl ether / TAEE ;P;0;<60°C;2;Ja;IBC;;;;;;;;x (Z);2;;;;
tert-Amyl methyl ether / TAME;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (X);0;;;;
Toasted meals / geröstete Mehle;;;;; ;IMSBC;x;;;;;;;;;;;;Group: B oder C - beim KD nach Blatt „Shipper's Declaration for Solid Bulk Cargos“ oder „Cargo Information for solid bulk cargos“„ fragen
Toluene ;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (Y);1;;;;
Transformer oil / Insulating oil (z.B. NS8);;;;; ;MARPOL;;;;;;;;;;x;;;
Turpentine (z. B. LI200) ;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (X);0;;;;
UMS / Gasoline;;;;;;MARPOL;;;;;;;;;;x;;;
Nynas Naphthenic / Tyre Oils;;;;; ;MARPOL;;;;;;;;;;x;;;
Ultra-Low Sulphur Fuel Oil / ULSFO;;;;;;MARPOL;;;;;;;;;;x;;;
Urea Grain in bulk ;;;;; ;;;;;;;;;;;;;;Keine Anmeldung, IMSBC Gruppe C
Urea Ammonium Nitrate solution / UAN (containing less than 1% free ammonia) ;S/P;2;NF;0;Ja;IBC;;;;;;;;x (Y);1;;;;
Urea solution ;S/P;2;<60°C;2;Nein;IBC;;;;;;;;x (Z);2;;;;
Urea Grain in bulk;;;;;;;;;;;;;;;;;;;Keine Anmeldung, IMSBC Gruppe C
VGO / Vakuum Gas Öl / Schweres Vakuumgasöl / HVGO;;;<60°C;2; ;MARPOL;;;;;;3082;9;;;x;;;
Vegetable acid oils;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (Y) ;;;;;
Versene 100 / ETHYLENEDIAMINETETRAACETIC ACID NA4-SALT;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (Y);1;;;;
Versenex 80 / Diethylenetriaminepentaacetic acid / pentasodium salt solution;P;0;>60°C;1;Nein;IBC;;;;;;;;x (Z);2;;;;
Vinyl Acetate monomer;S/P;2;<60°C;2;Ja;IBC;;;;;;;;x (Y) ;;;;;
VISTAR HS / Distillates Petroleum;;;;;;MARPOL;;;;;;;;;;x;;;
Wash Oil / Creosote oil / METHYLNAPHTHALENE acenaphthene fraction;S/P;2;>60°C;1;Ja;IBC;;;;;;;;x (X);0;;;;
Washed Waelz Oxide / Zink / zinkhaltiger Staub;;;;;;IMSBC;x;;;A;0;;;;;;;;lt. Rhenus Midgard/Hr. Janssen
Wilfarin PA1698 RSPO (siehe Fatty acids, (C16+) );P;0;>60°C;1;Ja;;;;;;;;;;;;;;
WOOD PELLETS ;;;;; ;IMSBC;x;y;;B;1;;;;;;;;
Wood pulp;;;;;;;;;;;;;;;;;;;nicht anmelden = Aussage J.Müller, kein DG
Wood pulp pellets ;;;;; ;IMSBC;x;y;;B;1;;;;;;;;
WOODCHIPS ;;;;; ;IMSBC;x;y;;B;1;;;;;;;;
Wooden poles / Holzstämme;;;;; ;IMSBC;x;y;;B;1;;;;;;;;NUR UNTER DECK (in Luken) anzumeldem - DECKSLADUNG NICHT! (außer für Baltic Lloyd, Rostock - ALLES anmelden!) lt. Herrn Ronneberger
Xylenes / Ortho-Xylene / Para Xylene;P;0;<60°C;2;Ja;IBC;;;;;;;;x (Y);1; ;;;
Zellulose / Cellulose / Wood pulp;;;;; ;;;;;;;;;;;;;;"Keine Anmeldung,
Nur falls Bulk-Ladung"
Zinc Concentrates / MRM BULK CONCENTRATES / Mineral Concentrates;;;;; ;IMSBC;x;;;A;0;3077;9;;;;;;"Nachfragen ob als Mineral Concentrates (3077/9) oder METAL SULPHIDE CONCENTRATES (MHB) (""Shippers declaration for solid bulk cargos"" anfordern oder auch ""Cargo information for solid bulk cargos"""
Zinc Concentrates / MRM BULK CONCENTRATES / METAL SULPHIDE CONCENTRATES;;;;; ;IMSBC;x;y;;A/B;2;;;;;;;;"Nachfragen ob als Mineral Concentrates (3077/9) oder METAL SULPHIDE CONCENTRATES (MHB) (""Shippers declaration for solid bulk cargos"" anfordern oder auch ""Cargo information for solid bulk cargos"""
1 Beschreibung Gefahr HAZARD_ENUM FP FP_ENUM 15.19? Typ IMSBC MHB IMSBC_MHB Group IMSBC_HAZ UN-Nr. IMO-Cl. IBC POLLUTION_CATEGORY_ENUM MARPOL IGC FP_IBC Bemerkung
2 1,3 Pentadiene / Piperylene P 0 <60°C 2 Ja IBC x (Y) 1
3 Acetic acid S/P 2 <60°C 2 Ja IBC x (Z) 2
4 Acetic acid glacial S/P 2 <60°C 2 Ja IBC x (Z) 2
5 Acetone <60°C 2 Nein IBC x (Z) 2
6 Acrylonitrile (ACN) S/P 2 <60°C 2 Ja IBC x (Y) 1
7 Alcoholic beverages, n.o.s. (Wine) IBC x (Z) 2
8 Alkanes (C6-C9) >60°C 1 Ja IBC x (X) 0
9 n-Alkanens (C10+) >60°C 1 Ja IBC x (Y) 1
10 Alkylate <60°C 2 MARPOL x 6
11 alpha-Methylstyrene S/P 2 <60°C 2 Ja IBC x (Y) 1
12 Ammonia aqueous (28% or less) S/P 2 NF 0 Ja IBC x (Y) 1 NF
13 Ammonia / Anhydrous / Ammoniak IGC 1005 2.3 x
14 Ammoniak Liquid 24,5% S/P 2 Ja IBC x (Y) 1
15 Ammonium Nitrate Fertilizer IMSBC x B 1 2067 5.1
16 Ammonium Nitrate with not more than 0,2% total IMSBC x B 1 1942 5.1
17 Ammonium Polyphosphate Solution (APP) P 0 >60°C 1 Nein IBC x (Z) 2
18 Ammonium Sulphate Keine Anmeldung, IMSBC Gruppe C
19 Ammonium nitrate solution (93% or less) S/P 2 NF 0 Ja IBC x (Y) 1
20 Aniline S/P 2 >60°C 1 Ja IBC x (Y) 1
21 Anthracene Oil , S/P 2 >60°C 1 Ja IBC x (X) 0
22 Anthracite / Coal / Kohle IMSBC x y A/B 2 Gruppe: B (und A)
23 ATRES / RAT / Atmospheric Residues / Residues (petroleum) atmospheric (APS Bottoms Resid A) >60°C 1 MARPOL x
24 AVGAS / Aviation Gasoline / Flugbenzin MARPOL x
25 BALED RDF IMSBC x y B 1
26 Base Oil / Lubricating oil / SN150/ SN500 / SN900 / VISOM 4 / Ultra S4 / Bright Stock / QHVI4 / QHVI8 / VHVI-4 = DISTILLATES (PETROLEUM) / HYDROTREATED HEAVY PARAFFINIC, >60°C 1 MARPOL x
27 Benzene / Benzol S/P 2 <60°C 2 Ja IBC x (Y) 1 -11
28 Biodiesel / FAME - Fatty acid methyl esters S/P 2 >60°C 1 Ja IBC x (Y)
29 Bitumen >60°C 1 MARPOL x
30 Blei in Blöcken / Lead Ingots kein Gefahrgut! Aussage Herr Jnassen Rhenus Midgard Nordenham (tel. 21.07.2021)
31 Butan IGC 1011 2.1 x
32 Butene / Buthylen IGC 1012 2.1 x
33 Butyl acrylate (all isomers) S/P 2 <60°C 2 Ja IBC x (Y) 1
34 Calcined clay / Kalzinierter Ton Keine Anmeldung, IMSBC Gruppe C
35 C9 Petroleum Resin S/P 2 <60°C 2 Ja IBC x (Y) 1
36 Calcium Ammonium Nitrate 27% N / CAN (in Big BAG) Keine Anmeldung lt. Aussage von Wasserschutzpolizeit Hamburg
37 Calcium Ammonium Nitrate 27% N / CAN (in BULK) Keine Anmeldung, IMSBC Gruppe C
38 Calcium Chloride Solution P 0 >60°C 1 IBC x (Z) 2
39 CARBON BLACK FEEDSTOCK / D8 / ANTHRACENE OIL S/P 2 >60°C 1 Ja IBC x (X) 0 x nach Sicherheitsdatenblatt fragen kann IBC oder Marpol sein
40 Carbon Black Oil Propylene Oxide MARPOL x
41 Carbon Dioxide IGC 1013 2.2 x
42 Caromax 28 S/P 2 >60°C 1 Ja IBC x (X) 0
43 Caustic potash / Potassium hydroxide solution / Kalilauge S/P 2 NF 0 Ja IBC x (Y) 1
44 Caustic soda / Sodium hydroxide solution / Natronlauge S/P 2 NF 0 Ja IBC x (Y) 1
45 China Clay Keine Anmeldung lt. Aussage von Herrn Schlicht (S+B) in Absprache mit Wasserschutz
46 Clay / TON Keine Anmeldung, IMSBC Gruppe C
47 Chloroform S/P 2 NF 0 Ja IBC x (Y) 1
48 Coal Tar , S/P 2 >60°C 1 Ja IBC x (X) 0
49 Coal Tar Pitch (Flüssig) S/P 2 >60°C 1 Ja IBC x (X) 0
50 Coal Tar Pitch / Steinkohlenteerpech (FEST) IMSBC x y B 1
51 Coconut oil S/P 2 >60°C 1 Ja IBC x (Y) 1
52 COKE BREEZE / Koksgrus IMSBC x NICHT MHB + KEINE UN-Nummer! Mit UN-Nr. "0000" + IMO-class "1.1" eingeben + Vermerk: "UN-no. + IMO-class not available" (im Jgegis muss es mit "MHB" angemeldet werden) - GR. A
53 Used cooking oil (mit Triglycerides, C16-C18 and C18 unsaturated) S/P 2 >60°C 1 Ja IBC x (Y) 1
54 Used cooking oil (wenn Triglycerides nicht ausdrücklich ausgewiesen) S/P 2 >60°C 1 Ja IBC x (X) 0
55 Copper concentrates IMSBC x A 0 3077 9
56 Copper concentrates (Metal Sulphide Concentrates) IMSBC x y A/B 2
57 Corn Oil , S/P 2 >60°C 1 Ja IBC x (Y) 1
58 Creosete Oil S/P 2 >60°C 1 Ja IBC x (X) 0
59 Crude Benzene and mixtures having 10% benzene or more S/P 2 <60°C 2 Ja IBC x (Y) 1
60 Cumene / Isopropylbenzene P 0 <60°C 2 Ja IBC x (y) 1
61 Cutterstock / Cutter MARPOL x
62 Cyclohexane S/P 2 <60°C 2 Ja IBC x (Y) 1
63 DDGS Pellets / Dried Distiller Grains with solubles Keine Anmeldung
64 DINP DIALKYL / Diisononylphthalat S/P 2 >60°C 1 Ja IBC x (X) 0
65 Distillate Hydrocrackers / DHC MARPOL x Bottoms Raw marterial for chemical industry Feedingstock for mineral oil industry
66 DIAMMONIUM PHOSPHATE / DAP Keine Anmeldung, IMSBC Gruppe C
67 1,1- Dichloroethane S/P 2 <60°C 2 Ja IBC x (Z) 2
68 DIRECT REDUCED IRON IMSBC x y B 1
69 Distillate / D10V / LVG / D8C / D10C / D10JUB / D 600 / D 700 / D 2000 MARPOL x
70 DOLOMITE Keine Anmeldung, IMSBC Gruppe C, evtl. Ist auch Dolomitic quicklime gemeint, Nachfragen
71 Dolomitic quicklime IMSBC x y B 1
72 Eisen II Sulphat Keine Anmeldung, IMSBC Gruppe C
73 Eisensilikat granulat / Iron Silicate Granules Keine Anmeldung, IMSBC Gruppe C
74 Energy Rich Fuel / Neste Renewable Diesel / NExBTL / HVO / Hydrotreated Vegetable Oils S/P 2 >60°C 1 siehe Bemerkung NExBTL - Renewable Diesel
75 Ethyl acetate P 0 <60°C 2 Ja IBC x (Z) 2
76 Ethanol / Ethyl alcohol / Grain alcohol / Drinking alcohol frei lassen <60°C 2 Nein IBC x (Z) 2
77 Ethylene glycol / (Mono-)Ethylenglycol / MEG / Glycol S/P 2 >60°C 1 Ja IBC x (Z) 2
78 Ethyl tert-butyl ether / ETBE S/P 2 <60°C 2 Ja IBC x (Y) 1
79 Ethylene IGC 1038 2.1 X
80 ETHYLENE DICHLORIDE (ETD) S/P 2 <60°C 2 Ja IBC x (Y)
81 Etibor / BORAX / PENTAHYDRATE CRUDE Keine Anmeldung
82 EXTRAIT / Vacuum gas oil MARPOL x
83 Fatty acids, (C16+) P 0 <60°C 2 Ja IBC x (Y)
84 FAME / Fatty acid methyl esters / Biodiesel , S/P 2 >60°C 1 Ja IBC x (Y)
85 Feed Phosphate / Monocalcium Phosphate Keine Anmeldung, IMSBC Gruppe C
86 Ferroalloys / Ferro Silico Mangan / Ferrolegierung (unter 20 %) Keine Anmeldung, IMSBC Gruppe C
87 Ferrochrom Keine Anmeldung, IMSBC Gruppe C
88 Ferrosilicochrom 40 / Ferrosilicon IMSBC x B 1 1408 4.3
89 FERROUS METAL / BORINGS / SHAVINGS / TURNINGS / CUTTINGS IMSBC x B 1 2793 4.2
90 Fish Meal treated with Antioxidant IMSBC x B 1 2216 9 wenn Ladehafen Bremen dann Gruppe C und nicht anzumelden
91 Fishoil S/P 2 >60°C 1 Ja IBC x (Y)
92 Fish Silage Protein Concentrate (containing 4% or less formic acid) P 0 NF 0 Ja IBC x (Y)
93 Fish protein concentrate (containing 4% or less formic acid) P 0 NF 0 Nein IBC x (Z) 2
94 FLUORSPAR / Flussspat IMSBC x y B 1
95 Fly Ash Keine Anmeldung
96 Formaldehyde solutions / Formalin S/P 2 >60°C 1 Ja IBC x (Y) 1
97 FORMIC ACID (85% or less acid) , S/P 2 >60°C 1 Ja IBC x (Y) 1
98 FORMIC ACID (over 85% acid) , S/P 2 <60°C 2 Ja IBC x (Y) 1
99 Foundry Coke / Gießereikoks /COKE Keine Anmeldung, IMSBC Gruppe C
100 Fraction C6 (containing benzene) S/P 2 >60°C 1 Ja IBC x (Y) 1
101 Gas Condensate <60°C 2 MARPOL x
102 GAS OIL / Light Cycle Oil >60°C 1 MARPOL x
103 Gasoline blending stocks / Reformates / Gasoline blending stocks / polymer-fuel /Gasoline blending stocks / alkylates-fuel MARPOL x
104 Glycerine S 1 >60°C 1 Nein IBC x (Z) 2
105 Ground Colemanite Keine Anmeldung
106 Gypsum / Gips Keine Anmeldung, IMSBC Gruppe C
107 HCGO / Heavy Cycle Gas Oil MARPOL x
108 HFO MARPOL x
109 Holzstämme / Wooden Poles IMSBC x y B 1 Nur wenn unter Deck, nur wenn in Loser Schüttung!
110 Hydrochloric Acid S/P 2 NF 0 Ja IBC x (Z) 2 NF
111 Hydrocarbon Wax / PROWAX 312 S/P 2 >60°C 1 Ja IBC x (X) 0
112 Hydro Cracker Bottoms MARPOL x
113 Hydrotreated Renewable Oil S/P 2 >60°C 1 IBC x (Y) 1
114 IFO380 >60°C 1 MARPOL x
115 ILMENITE CLAY / Ilmenit-Ton IMSBC x Anmerkung: Ilmenite für Nordenham= Ilmenit Sand - keine Anmeldung als GG
116 ILMENITE Concentrate IMSBC x Keine Anmeldung, IMSBC Gruppe C
117 IRON ORE / Eisenerz Keine Anmeldung, IMSBC Gruppe C
118 IRON ORE / Eisenerz (FINES) IMSBC x A 0 x Kein MHB, ohne UN-/IMO-Nr. senden = geht nur im ENI (JGegis will eine Auswahl)
119 Iso- and cyclo-alkanes (C12+) / LIAV270 S/P 2 <60°C 2 Ja IBC x (Y) 1
120 Iso- and cyclo-alkanes (C10-C11+) S/P 2 <60°C 2 Ja IBC x (Y) 1
121 Isomerate <60°C 2 MARPOL x
122 Isopentane / Pentane P 0 <60°C 2 Ja IBC x (Y) 1
123 Isoprene S/P 2 <60°C 2 IBC x (Y) 1
124 JET A1 / Normal Russian TS-1 / Kerosin / Kerosene <60°C 2 MARPOL X
125 Kalk ungeschlöscht / LIME UNSLAKED IMSBC x y B 1
126 Odourless Kerosene >60°C 1 MARPOL x
127 Kokospalmenschalen IMSBC x Keine Anmeldung
128 Lard / Schmalz S/P 2 >60°C 1 Ja IBC x (Y) 1
129 LCCS / Light Catalytically Cracked Spirit / Light Catalytically Cracked Naphtha MARPOL x
130 Lecithin IBC x (OS) 3
131 Lead Concentrate IMSBC x A 0 3077 9 Nachfragen ob als Mineral Concentrates (3077/9) oder METAL SULPHIDE CONCENTRATES (MHB) ("Shippers declaration for solid bulk cargos" anfordern oder auch "Cargo information for solid bulk cargos"
132 Lead Concentrate (Metal Sulphide Concentrates) IMSBC x y A/B 2 Nachfragen ob als Mineral Concentrates (3077/9) oder METAL SULPHIDE CONCENTRATES (MHB) ("Shippers declaration for solid bulk cargos" anfordern oder auch "Cargo information for solid bulk cargos"
133 Lead Ingots IBC Keine Anmeldung lt. Aussage Herr Jnassen Rhenus Midgard Nordenham (tel. 21.07.2021)
134 Light Vacuum Gas Oil / Petroleum / Petroleum Hydrocarbons MARPOL x
135 Ligninsulphonic Acid / Sodium Salt Solution P 0 >60°C 1 Nein IBC x (Z) 2
136 Ligno Sulphonate Sodium / Sulphite Lie (Lye) P 0 >60°C 1 IBC x (Z) 2
137 Lime IMSBC x y B 1
138 Limestone / Kalkstein Keine Anmeldung
139 Liquid petroleum paraffin, fraction of C14-C17 <2% aromatics) P 0 >60°C 1 Ja IBC x (Y) 1
140 Lukoil / Crude Oil MARPOL x
141 Magnesium Chloride Solution P 0 >60°C 1 Nein IBC x (Z) 2
142 Metal Sulphide Concentrates / Zink / Blei / Silber IMSBC x y A/B 2
143 Methanol / Methyl Alcohol S/P 2 <60°C 2 Ja IBC x (Y)
144 Methyl Acrylate S/P 2 <60°C 2 Ja IBC x (Y) 1
145 Methyl Alcohol / Methanol S/P 2 <60°C 2 Ja IBC x (Y)
146 Methyl Isobutyl Ketone S/P 2 <60°C 2 Ja IBC x (Z) 2
147 Methylendiphenylisocyanate / MDI / Polymethylene polyphenyl isocyanate S/P 2 >60°C 1 Ja IBC x (Y)
148 Methyl Methacrylate Monomer / MMM S/P 2 <60°C 2 Ja IBC x (Y)
149 Methyl Tert-Butyl Ether / MTBE P 0 <60°C 2 Ja IBC x (Z) 2
150 Mixed Fatty acid / MFA S/P 2 >60°C 1 Ja IBC x (Y)
151 Mixed Xylene P 0 <60°C 2 Ja IBC x (Y) 1
152 Molasses NF 0 IBC x (OS) 3 Nicht anmeldepflichtig - Ausnahme: BREMEN (lt Auskunft von Herrn Kraft 09.01.2018)//FÜR BREMEN ANMELDEN ÜBER J GEGIS - an DBH - ohne Visit ID
153 Monoammonium Phosphate / MAP Keine Anmeldung
154 Monocalcium Phosphate / MCP / Futtermittel IMSBC x y A/B 2 Verpackt (IMDG) nicht anmeldepflichtig
155 Monoethylen Glycol / MEG S/P 2 >60°C 1 Ja IBC x (Z) 2
156 Muriate of potash / Kaliumchlorid Keine Anmeldung
157 n-Alkanes (C10+) / N-Paraffine / Paraffine Normal P 0 >60°C 1 Ja IBC x (Y) 1
158 N-Butanol / N-BUTYL ALCOHOL <60°C 2 IBC x (Z) 2
159 N-paraffines / N-ALKANES (C10+) P 0 >60°C 1 Ja IBC x (Y) 1
160 Naphtha <60°C 2 MARPOL x
161 Naphthalene / Molten S/P 2 >60°C 1 Ja IBC x (X) 0
162 Nepherlin Matrix 350 / Sand / Glas / Porzellan
163 NESSOL 40 (Noxious liquid, F, (6) n.o.s White Spirit) P 0 <60°C 2 Ja IBC x (Y) 1
164 Nessol D40 (Noxious liquid, F, (8) n.o.s. (siehe Noxious liquid…) IBC
165 Nessol D60 ( (contains Iso- und Cycloalkanes (C10-C11) (siehe Noxious liquid...) IBC
166 Nessol D100 (contains Iso- und Cycloalkanes (C12+) IBC
167 NExBTL / Renewable Diesel >60°C 1 IBC x (Y) 1 >60 Risks: nicht zu finden in IBC-Code
168 Refinery NexTAME / Noxious liquid, F, (4) n.o.s. (trade name ...., contains ....) <60°C 2 Ja IBC x (X) 0
169 Nickelconzentrat IMSBC x A 0
170 Nitric acid (70% and over) S/P 2 NF 0 Ja IBC x (Y) 1
171 Nitric acid (less than 70%) S/P 2 NF 0 Ja IBC x (Y) 1
172 Nonene / All Isomers P 0 <60°C 2 IBC x (Y) 1 siehe auch Propylene Trimer
173 NON OXY EBOB / Gasoline MARPOL x
174 Normal Russian TS-1 Kerosene MARPOL x >23
175 Noxious liquid, NF, (5) n.o.s. / Trade Name (Nexbase 3050;3020;3030,3043) / Containscontains Iso- and cyclo-alkanes P 0 >60°C 1 Ja IBC x (Y) 1
176 Noxious liquid, NF(5) n.o.s. LI 220 HF contains White Spirit, low P 0 <60°C 2 Ja IBC x (Y) 1
177 Noxious liquid, NF(5) n.o.s.(Solvesso 100, contains Alkyl (C3-C4) benzenes) P 0 <60°C 2 Ja IBC x (Y) 1
178 Noxious liquid, NF, (7) n.o.s. (Exxsol D80 , contains iso-and cycloalkanes(C12+)) P 0 >60°C 1 Ja IBC x (Y) 1
179 Noxious liquid, NF, (7) n.o.s. ((EXXSOL D60 und auch Nessol D60, contains iso-and cycloalkanes (C10-C11)) P 0 >60°C 1 Ja IBC x (Y) 1
180 Noxious liquid, F, (8) n.o.s. (NESSOL D40 contains Iso- and cycloalkanes (C10-C11)) P 0 <60°C 2 ja IBC x (Y) 1
181 NPK Fertilizer / Ammonium Nitrate Based Fertilizer (Non Hazardous) Keine Anmeldung
182 Nynas VR5000 / Bitumen >60°C 1 MARPOL x
183 NYTRO TAURUS / Insulating Oil MARPOL x
184 Octene P 0 <60°C 2 Ja IBC x (Y) 1
185 Odourless Kerosene D70 MARPOL x
186 Olivines / Mineralgemisch gehört Mineralklasse der „Silikate und Germanate“ Keine Anmeldung
187 Olive Stones (crushed) / Seed Cake / Oil Cake IMSBC x B 1 1386 4.2
188 ORTHO-XYLENE P 0 <60°C 2 Ja IBC x (Y) 1
189 Palm fatty acid distillate / PFAD S/P 2 >60°C 1 Ja IBC x (Y) 1
190 Palmkernexpellers / pulverisierte Kernschalen Keine Anmeldung lt. J.Müller Brake - siehe aber auch SEED CAKE
191 PALM KERNEL OIL / CPKO / Crude Palm Kernel Oil S/P 2 >60°C 1 Ja IBC x (Y) 1
192 PALM KERNEL STEARIN P 0 >60°C 1 Ja
193 PALM MID-FRACTION P 0 >60°C 1 Ja IBC x (Y) 1
194 PALM OIL P 0 >60°C 1 Ja IBC x (Y) 1
195 PALM OLEINE P 0 >60°C 1 Ja IBC x (Y) 1
196 Palm stearin P 0 >60°C 1 Ja IBC x (Y) 1
197 Palmitic Acid IBC x (Y) 1
198 n-Paraffins (C10-C20) / N-ALKANES (C10+) P 0 >60°C 1 IBC x (Y) 1
199 Paraffin wax, highly-refined P 0 >60°C 1 Ja IBC x (Y) 1
200 Paraffin wax, semi-refined S/P 2 >60°C 1 Ja IBC x (X) 0
201 PARA XYLENE P 0 <60°C 2 Ja IBC x (Y) 1
202 Pea Coke Keine Anmeldung
203 PEAT MOSS / Torf IMSBC x y A/B 2 Für den Kielkanal nicht anmelden lt. Rücksprache UCA+Herrn Langbein/01.02.2016 => gültig für UCA/S+B
204 Peat (milled) Keine Anmeldung lt. Herrn Schütte für NOK nicht anmelden/09.02.2021
205 Pentadiene / 1,3-Pentadiene P 0 <60°C 2 Ja IBC x (Y) 1
206 Perchloroethylene S/P 2 NF 0 IBC x (Y) 1
207 PETROLEUM COKE / calcined or uncalcined oder Calcined Coke / Petcoke IMSBC x y B 1
208 PGI / Propylene Glycol Industrial S/P 2 >60°C 1 ? IBC x (Z) 2
209 Phenol S/P 2 >60°C 1 Ja IBC x (Y) 1
210 Phosphoric Acid S/P 2 NF 0 Ja IBC x (Z) 2
211 PITCH / Pech IMSBC x y B 1 In Bulk/Pitch Verpackt (MSDS = Material Safetey Data Sheet anfordern)
212 PME / Biodiesel IBC x (Y) 1
213 Polymethylene Polyphenyl Isocyanate S/P 2 >60°C 1 Ja IBC x (Y)
214 Polyolefin (molecular weight 300+) P 0 >60°C 1 Ja IBC x (Y) 1
215 Potash / Pottasche Keine Anmeldung
216 Potassium Hydroxide Solution / Caustic Potash / Kaliumhydroxidlösung S/P 2 NF 0 Ja IBC x (Y) 1
217 Propylbenzene / all isomers P 0 <60°C 2 Ja IBC x (Y) 1
218 Propylene IGC 1077 2.2 x
219 Propylene Dichloride / 1,2-DICHLOROPROPANE S/P 2 <60°C 2 Ja IBC x (Y)
220 Propylene Glycol Monoalkyl Ether / DOWANOL PM S/P 2 <60°C 2 Ja IBC x (Z) 2
221 Propylene Oxide IBC 1280 3 x
222 Propylene Tetramer S/P 2 <60°C 2 Ja IBC x (X) 0
223 Propylene Trimer P 0 <60°C 2 Ja IBC x (Y) 1
224 Pyrolysis Fuel Oil IBC ? ?
225 Pyrolysis Gasoline containing benzene / Pygas /Aromatic hydrocarbons / C6-8 / Naphtha-Raffinate Pyrolyzate-derived S/P 2 <60°C 2 Ja IBC x (Y)
226 Pyrite Achtung! Kann "IMSBC: Gruppe C" (also nicht anmeldepflichig sein) oder auch "Gruppe: A" bzw. "Gruppe: A/B" (somit Anmeldepflichtig)- beim Kunden nachfragen und "Shippers declaration for solid bulk cargos" oder es nennt sich auch "Cargo information for solid bulk cargos" anfordern
227 Quicklime / Kalk ungelöscht / Lime / Burnt Lime / Un-slaked Lime / Building Lime / Calcia / Fat Lime / Chemical Lime / Fluxing Lime / Hard Burnt Lime / Soft Burnt Lime / Pebble Lime / Calcium Oxide / Calcium Monoxide / Calcined Limestone / Calcium oxide / CaO IMSBC x Y B 1
228 Rapeseed oil / Rapsöl P 0 >60°C 1 Ja IBC x (Y) 1
229 Rape seed oil fatty acid methyl esters S/P 2 >60°C 1 Ja IBC x (Y) 1
230 BALED RDF IMSBC x y B 1 beim KD/Schiff nach Blatt „Shipper's Declaration for Solid Bulk Cargos“ oder „Cargo Information for solid bulk cargos“„ fragen - 13.12.2021
231 Refinery NexTAME / Noxious liquid, F, (4) n.o.s. (trade name ...., contains ....) P 0 <60°C 2 Ja. IBC x (y) 1
232 Reformate / Naphtha / Gas Oil / UMS / Unleaded mo gas / Motor Gas MARPOL x
233 RDF pellets / Refuse Derived Fuel Keine Anmeldung
234 Resin Oil / Distilled S/P 2 <60°C 2 Ja IBC x (Y) 1
235 RME 0,4MG/11 / FAME S/P 2 >60°C 1 Ja IBC x (Y) 1
236 Sawn Timber / Schnittholz / Sägeholz IMSBC x nur wenn als Bulk (also keine Verpackung jeglicher Art (Drahtseile, Kunststoffbänder) und unter Deck
237 SEED Cake mit einem Ölgehalt von höchstens 1,5% und einem Feuchtigkeitsgehalt von höchstens 11% ///with not more than 1.5% oil and not more than 11% moisture. IMSBC x B 1 2217 4.2
238 SEED Cake containing vegetable oil a) durch mechanisches Pressen gewonnene Ölsaatenrückstände, die mehr als 10% Öl oder mehr als 20% Öl und Feuchtigkeit zusammen enthalten / (a) mechanically expelled seeds, containing more than 10% of oil or more than 20% of oil and moisture combined.) IMSBC x B 1 1386 4.2
239 Shale Oil MARPOL x
240 Slack Wax / Petroleum / Hydrocarbon Wax S/P 2 >60°C 1 IBC x (X) 0
241 Slop Water Keine Anmeldung lt. Johann/16.12.12
242 Slops
243 Slurry / Residues / Petroleum MARPOL x
244 Small Arms = Waffen zur Schiffsausrüstung gehörig Keine Anmeldung lt. Aussage von Fr. Kauschmann/16.05.2013 (09:50 Uhr)
245 Solvent Sicherheitsdatenblatt anfordern!!!
246 Sodium hydroxide solution / Caustic soda / Natronlauge S/P 2 NF 0 Ja IBC x (Y)
247 Sodium Sulphate in Bulk Keine Anmeldung lt. Aussage von Herrn Illing Gefahrgutauskunfststelle Hamburg/14.02.14-10.25 Uhr
248 Soyabean meal / SBM / Sojabohnenmehl IMSBC x y Kann Cat. A, B oder C sein (abhängig von der Zusammensetzung), wenn keine genaue Angabe => Anfragen, ob anmledepflichtig oder nicht, Wenn Port of Loading = Brake oder Hamburg => Cat. C und damit nicht anmeldepflichtig
249 Soyabean Oil , S/P 2 >60°C 1 Ja IBC x (Y) 1
250 Soja protein concentrat / SPC Keine Anmeldung
251 Steel Turnings IMSBC x B 1 2793 4.2
252 Styrene Monomer , S/P 2 <60°C 2 Ja IBC x (Y) 1
253 Sulphur (molten) S 1 >60°C 1 Nein IMSBC x (Z) 2
254 Sulphuric Acid S/P 2 NF 0 Ja IBC x (Y) 1
255 Sunflower Husk Pellets in bulk Keine Anmeldung, Gruppe C - tel Aussage Hr. Meiners (J.Müller)
256 Sunflower Seed Oil S/P 2 >60°C 1 Ja IBC x (Y)
257 Tall oil fatty acid / TOFA (resin acids less than 20%) S/P 2 >60°C 1 Ja IBC x (Y) 1
258 Tall oil pitch P 0 >60°C 1 Ja IBC x (Y) 1
259 Tallow fatty acid P 0 >60°C 1 Ja IMSBC x (Y) 1
260 tert-Amyl ethyl ether / TAEE P 0 <60°C 2 Ja IBC x (Z) 2
261 tert-Amyl methyl ether / TAME S/P 2 <60°C 2 Ja IBC x (X) 0
262 Toasted meals / geröstete Mehle IMSBC x Group: B oder C - beim KD nach Blatt „Shipper's Declaration for Solid Bulk Cargos“ oder „Cargo Information for solid bulk cargos“„ fragen
263 Toluene S/P 2 <60°C 2 Ja IBC x (Y) 1
264 Transformer oil / Insulating oil (z.B. NS8) MARPOL x
265 Turpentine (z. B. LI200) S/P 2 <60°C 2 Ja IBC x (X) 0
266 UMS / Gasoline MARPOL x
267 Nynas Naphthenic / Tyre Oils MARPOL x
268 Ultra-Low Sulphur Fuel Oil / ULSFO MARPOL x
269 Urea Grain in bulk Keine Anmeldung, IMSBC Gruppe C
270 Urea Ammonium Nitrate solution / UAN (containing less than 1% free ammonia) S/P 2 NF 0 Ja IBC x (Y) 1
271 Urea solution S/P 2 <60°C 2 Nein IBC x (Z) 2
272 Urea Grain in bulk Keine Anmeldung, IMSBC Gruppe C
273 VGO / Vakuum Gas Öl / Schweres Vakuumgasöl / HVGO <60°C 2 MARPOL 3082 9 x
274 Vegetable acid oils S/P 2 >60°C 1 Ja IBC x (Y)
275 Versene 100 / ETHYLENEDIAMINETETRAACETIC ACID NA4-SALT S/P 2 <60°C 2 Ja IBC x (Y) 1
276 Versenex 80 / Diethylenetriaminepentaacetic acid / pentasodium salt solution P 0 >60°C 1 Nein IBC x (Z) 2
277 Vinyl Acetate monomer S/P 2 <60°C 2 Ja IBC x (Y)
278 VISTAR HS / Distillates Petroleum MARPOL x
279 Wash Oil / Creosote oil / METHYLNAPHTHALENE acenaphthene fraction S/P 2 >60°C 1 Ja IBC x (X) 0
280 Washed Waelz Oxide / Zink / zinkhaltiger Staub IMSBC x A 0 lt. Rhenus Midgard/Hr. Janssen
281 Wilfarin PA1698 RSPO (siehe Fatty acids, (C16+) ) P 0 >60°C 1 Ja
282 WOOD PELLETS IMSBC x y B 1
283 Wood pulp nicht anmelden = Aussage J.Müller, kein DG
284 Wood pulp pellets IMSBC x y B 1
285 WOODCHIPS IMSBC x y B 1
286 Wooden poles / Holzstämme IMSBC x y B 1 NUR UNTER DECK (in Luken) anzumeldem - DECKSLADUNG NICHT! (außer für Baltic Lloyd, Rostock - ALLES anmelden!) lt. Herrn Ronneberger
287 Xylenes / Ortho-Xylene / Para Xylene P 0 <60°C 2 Ja IBC x (Y) 1
288 Zellulose / Cellulose / Wood pulp Keine Anmeldung, Nur falls Bulk-Ladung
289 Zinc Concentrates / MRM BULK CONCENTRATES / Mineral Concentrates IMSBC x A 0 3077 9 Nachfragen ob als Mineral Concentrates (3077/9) oder METAL SULPHIDE CONCENTRATES (MHB) ("Shippers declaration for solid bulk cargos" anfordern oder auch "Cargo information for solid bulk cargos"
290 Zinc Concentrates / MRM BULK CONCENTRATES / METAL SULPHIDE CONCENTRATES IMSBC x y A/B 2 Nachfragen ob als Mineral Concentrates (3077/9) oder METAL SULPHIDE CONCENTRATES (MHB) ("Shippers declaration for solid bulk cargos" anfordern oder auch "Cargo information for solid bulk cargos"

BIN
misc/GEFAHRGUTLISTE.xlsx Normal file

Binary file not shown.

BIN
misc/SSN LOCODES_2022.xlsx Normal file

Binary file not shown.

Binary file not shown.

17
misc/import_sqlite.py Normal file
View File

@ -0,0 +1,17 @@
import sqlite3
import pandas as pd
import os
abspath = os.path.abspath(__file__)
dname = os.path.dirname(abspath)
os.chdir(dname)
con = sqlite3.connect('cps.db')
wb = pd.read_excel('GEFAHRGUTLISTE.xlsx',sheet_name = None)
for sheet in wb:
wb[sheet].to_sql(sheet,con,index=False)
con.commit()
con.close()
print('done')

19
misc/info_SSN_Locodes.txt Normal file
View File

@ -0,0 +1,19 @@
Neue SSN Locode Liste?
.xslx in CSV umwandeln
direkt in SQLite importieren (als neue Tabelle). Ich habe die alte Liste gelöscht und
die neue umbenannt.
Die neuen Einträge anzeigen lassen:
select SSN_2022.* from SSN_2022
left outer join SSN_LOCODES on SSN_2022.LocationCode = SSN_LOCODES.LocationCode
where SSN_LOCODES.LocationCode is null
order by SSN_2022.LocationCode
"Gemeinsame" Einträge anzeigen lassen:
SELECT * FROM SSN_LOCODES
INTERSECT
SELECT * FROM SSN_2022

View File

@ -2,8 +2,11 @@
2) Prüfen ob das ENI App logo richtig ist 2) Prüfen ob das ENI App logo richtig ist
3) VS: Publish: Folder Location und Url richtig auswählen 3) VS: Publish: Folder Location und Url richtig auswählen
4) Signing: "Sign the ClickOnce manifests": Hier für Prod das Zertifikat 4) Signing: "Sign the ClickOnce manifests": Hier für Prod das Zertifikat
auswählen, das am 15.7.22 abläuft. Das Test Zertifikat läuft am 12.11.22 ab. auswählen, das am 10.5.23 abläuft. Das Test Zertifikat läuft am 12.11.22 ab.
Auswahl über "Select from Store.." Auswahl über "Select from Store.."
5) komplett neu bauen (clean!) 5) Release build einstellen
6) In Description bei Product name "ENI" statt "ENI Testversion" 6) komplett neu bauen (clean!)
7) Build-Typ auf "Release" 7) In Publish -> Options -> Description bei Product name "ENI" statt "ENI Testversion"
8) Publish now
9) Upload
10) last/next Version.txt pflegen

View File

@ -0,0 +1,10 @@
# Procedere um Gefahrgut zu aktualisieren
____
Wird verwendet in Dangerous Goods, wenn der Button NewDGItem gedrückt Wird.
1) bei geliefertem Excel unnötige Spalten entfernen
2) als CSV speichern
3) beim Import in DB Browser für SQLite ("Import CSV into Table") darauf achten, dass UTF-8 ausgewählt ist
4) Im DB Browser die relevanten Spalten von TEXT auf NUMERIC stellen