Merge branch 'release/eni_7.7'

This commit is contained in:
Daniel Schick 2023-01-25 18:10:46 +01:00
commit 888f33ae09
34 changed files with 4117 additions and 622 deletions

View File

@ -119,7 +119,7 @@ namespace ENI2.Controls
{ {
var grid = sender as ENIDataGrid; var grid = sender as ENIDataGrid;
if (Key.Delete == e.Key) if (Key.Delete == e.Key)
this.deleteItem(null, null); this.deleteItem(null, null);
} }
} }

View File

@ -109,6 +109,7 @@ namespace ENI2.Controls
thePicker.Value = new DateTime(year, month, day, hour, minute, 0); thePicker.Value = new DateTime(year, month, day, hour, minute, 0);
} }
catch (FormatException) { } catch (FormatException) { }
catch (ArgumentOutOfRangeException) { thePicker.Value = null; }
} }
} }
@ -121,10 +122,11 @@ namespace ENI2.Controls
string timevalText = rd.Match(thePicker.Text).Captures[0].Value; string timevalText = rd.Match(thePicker.Text).Captures[0].Value;
int day = Int32.Parse(timevalText.Substring(0, 2)); int day = Int32.Parse(timevalText.Substring(0, 2));
int month = Int32.Parse(timevalText.Substring(2, 2)); int month = Int32.Parse(timevalText.Substring(2, 2));
int year = Int32.Parse(timevalText.Substring(4, 4)); int year = Int32.Parse(timevalText.Substring(4, 4));
thePicker.SelectedDate = new DateTime(year, month, day, 0, 0, 0); thePicker.SelectedDate = new DateTime(year, month, day, 0, 0, 0);
} }
catch (FormatException) { } catch (FormatException) { }
catch (ArgumentOutOfRangeException) { thePicker.SelectedDate = null; }
} }
} }

View File

@ -20,6 +20,7 @@
<DataGridTextColumn Header="{x:Static p:Resources.textLogin}" Binding="{Binding Logon}" IsReadOnly="True" Width="0.1*" /> <DataGridTextColumn Header="{x:Static p:Resources.textLogin}" Binding="{Binding Logon}" IsReadOnly="True" Width="0.1*" />
<DataGridTextColumn Header="{x:Static p:Resources.textEMail}" Binding="{Binding UserEMail}" IsReadOnly="True" Width="0.2*" /> <DataGridTextColumn Header="{x:Static p:Resources.textEMail}" Binding="{Binding UserEMail}" IsReadOnly="True" Width="0.2*" />
<DataGridCheckBoxColumn Header="{x:Static p:Resources.textAdministrator}" Binding="{Binding IsAdmin}" IsReadOnly="True" Width="0.1*" /> <DataGridCheckBoxColumn Header="{x:Static p:Resources.textAdministrator}" Binding="{Binding IsAdmin}" IsReadOnly="True" Width="0.1*" />
<DataGridCheckBoxColumn Header="{x:Static p:Resources.textEditor}" Binding="{Binding IsEditor}" IsReadOnly="True" Width="0.1*" />
<DataGridTextColumn Header="{x:Static p:Resources.textCreated}" Binding="{Binding Created}" IsReadOnly="True" Width="0.1*" /> <DataGridTextColumn Header="{x:Static p:Resources.textCreated}" Binding="{Binding Created}" IsReadOnly="True" Width="0.1*" />
<DataGridTextColumn Header="{x:Static p:Resources.textChanged}" Binding="{Binding Changed}" IsReadOnly="True" Width="0.1*" /> <DataGridTextColumn Header="{x:Static p:Resources.textChanged}" Binding="{Binding Changed}" IsReadOnly="True" Width="0.1*" />
</DataGrid.Columns> </DataGrid.Columns>

View File

@ -59,7 +59,7 @@ namespace ENI2.Controls
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(selectedParty); DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(selectedParty);
} }
} }
} }
} }
#region grid event handler #region grid event handler
@ -98,13 +98,13 @@ namespace ENI2.Controls
{ {
ReportingParty rp = new ReportingParty(); ReportingParty rp = new ReportingParty();
EditReportingPartyDialog ebd = new EditReportingPartyDialog(); EditReportingPartyDialog ebd = new EditReportingPartyDialog();
ebd.ReportingParty = rp; ebd.ReportingParty = rp;
if (ebd.ShowDialog() ?? false) if (ebd.ShowDialog() ?? false)
{ {
DBManager.Instance.GetReportingPartyDict().Add(Guid.NewGuid(), rp); DBManager.Instance.GetReportingPartyDict().Add(Guid.NewGuid(), rp);
this.ReportingParties.Add(rp); this.ReportingParties.Add(rp);
this.dataGridReportingParties.Items.Refresh(); this.dataGridReportingParties.Items.Refresh();
} }
} }

View File

@ -298,7 +298,9 @@ namespace ENI2
int year = Int32.Parse(timevalText.Substring(4, 4)); int year = Int32.Parse(timevalText.Substring(4, 4));
thePicker.SelectedDate = new DateTime(year, month, day, 0, 0, 0); thePicker.SelectedDate = new DateTime(year, month, day, 0, 0, 0);
} }
catch (FormatException) { } catch (Exception) {
thePicker.SelectedDate = null;
}
} }
} }

View File

@ -106,6 +106,26 @@ namespace ENI2
} }
} }
public bool HasCriticalInfoMissing(out string messageText)
{
messageText = "";
// Hier haben wir Logik für Spezialfälle, z.B. dass für BRE und BRV bestimmte Meldeklassen gesendet werden *müssen*
if(this.Core.PoC.Equals("DEBRV") || this.Core.PoC.Equals("DEBRE"))
{
foreach(Message aMessage in _messages)
{
if((aMessage.MessageNotificationClass == Message.NotificationClass.NOA_NOD) && (aMessage.InternalStatus != Message.BSMDStatus.CONFIRMED)) { messageText = "NOA_NOD"; return true; }
if ((aMessage.MessageNotificationClass == Message.NotificationClass.AGNT) && (aMessage.InternalStatus != Message.BSMDStatus.CONFIRMED)) { messageText = "AGNT"; return true; }
if ((aMessage.MessageNotificationClass == Message.NotificationClass.INFO) && (aMessage.InternalStatus != Message.BSMDStatus.CONFIRMED)) { messageText = "INFO"; return true; }
if ((aMessage.MessageNotificationClass == Message.NotificationClass.SEC) && (aMessage.InternalStatus != Message.BSMDStatus.CONFIRMED)) { messageText = "SEC"; return true; }
if ((aMessage.MessageNotificationClass == Message.NotificationClass.TIEFA) && (aMessage.InternalStatus != Message.BSMDStatus.CONFIRMED)) { messageText = "TIEFA"; return true; }
}
}
return false;
}
#endregion #endregion
#region Construction #region Construction

View File

@ -67,6 +67,9 @@ namespace ENI2.DetailViewControls
this.RegisterTextboxChange(this.textBox_AgentPostalCode, Message.NotificationClass.AGNT); this.RegisterTextboxChange(this.textBox_AgentPostalCode, Message.NotificationClass.AGNT);
this.RegisterTextboxChange(this.textBox_AgentStreetAndNumber, Message.NotificationClass.AGNT); this.RegisterTextboxChange(this.textBox_AgentStreetAndNumber, Message.NotificationClass.AGNT);
this.RegisterTextboxChange(this.textBox_AgentCountry, Message.NotificationClass.AGNT); this.RegisterTextboxChange(this.textBox_AgentCountry, Message.NotificationClass.AGNT);
this.buttonSaveTemplate.IsEnabled = DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].IsEditor;
this.buttonDeleteTemplate.IsEnabled = DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].IsEditor;
} }
public override void Initialize() public override void Initialize()
@ -108,7 +111,7 @@ namespace ENI2.DetailViewControls
this.dataGridCallPurposes.EditRequested += DataGridCallPurposes_EditRequested; this.dataGridCallPurposes.EditRequested += DataGridCallPurposes_EditRequested;
this.dataGridCallPurposes.AddingNewItem += DataGridCallPurposes_AddingNewItem; this.dataGridCallPurposes.AddingNewItem += DataGridCallPurposes_AddingNewItem;
this.dataGridCallPurposes.CreateRequested += DataGridCallPurposes_CreateRequested; this.dataGridCallPurposes.CreateRequested += DataGridCallPurposes_CreateRequested;
this.dataGridCallPurposes.DeleteRequested += DataGridCallPurposes_DeleteRequested; this.dataGridCallPurposes.DeleteRequested += DataGridCallPurposes_DeleteRequested;
this.agentGroupBox.DataContext = _agnt; this.agentGroupBox.DataContext = _agnt;
@ -138,8 +141,7 @@ namespace ENI2.DetailViewControls
private void DataGridCallPurposes_DeleteRequested(DatabaseEntity obj) private void DataGridCallPurposes_DeleteRequested(DatabaseEntity obj)
{ {
CallPurpose cp = obj as CallPurpose; if (obj is CallPurpose cp)
if (cp != null)
{ {
// are you sure dialog is in base class // are you sure dialog is in base class
_noa_nod.CallPurposes.Remove(cp); _noa_nod.CallPurposes.Remove(cp);
@ -151,7 +153,7 @@ namespace ENI2.DetailViewControls
} }
private void DataGridCallPurposes_CreateRequested() private void DataGridCallPurposes_CreateRequested()
{ {
EditCallPurposeDialog ecpd = new EditCallPurposeDialog(); EditCallPurposeDialog ecpd = new EditCallPurposeDialog();
ecpd.AddClicked += () => ecpd.AddClicked += () =>
{ {
@ -256,16 +258,15 @@ namespace ENI2.DetailViewControls
private void comboBox_AgentTemplate_SelectionChanged(object sender, SelectionChangedEventArgs e) private void comboBox_AgentTemplate_SelectionChanged(object sender, SelectionChangedEventArgs e)
{ {
Trace.WriteLine("combo selection changed"); Trace.WriteLine("combo selection changed");
AGNT_Template at = this.comboBox_AgentTemplate.SelectedItem as AGNT_Template; if (this.comboBox_AgentTemplate.SelectedItem is AGNT_Template at)
if(at != null)
{ {
this.textBoxTemplateTitle.Text = at.AgentTitle; this.textBoxTemplateTitle.Text = at.AgentTitle;
this.buttonDeleteTemplate.IsEnabled = true; this.buttonDeleteTemplate.IsEnabled = true;
this.buttonSetTemplate.IsEnabled = true; this.buttonSetTemplate.IsEnabled = true;
this._currentTemplate = at; this._currentTemplate = at;
} }
} }
private void buttonDeleteTemplate_Click(object sender, RoutedEventArgs e) private void buttonDeleteTemplate_Click(object sender, RoutedEventArgs e)
{ {
@ -308,21 +309,21 @@ namespace ENI2.DetailViewControls
{ {
if (MessageBox.Show("A template with this name already exists, overwrite?", "Confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.No) if (MessageBox.Show("A template with this name already exists, overwrite?", "Confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.No)
return; return;
} }
this._currentTemplate = createFromCurrentText(title, existingTemplate); this._currentTemplate = createFromCurrentText(title, existingTemplate);
DBManager.Instance.Save(this._currentTemplate); DBManager.Instance.Save(this._currentTemplate);
if(existingTemplate == null) if(existingTemplate == null)
{ {
comboBox_AgentTemplate.ItemsSource = null; comboBox_AgentTemplate.ItemsSource = null;
_agntTemplates.Add(this._currentTemplate); _agntTemplates.Add(this._currentTemplate);
_agntTemplates.Sort(); _agntTemplates.Sort();
comboBox_AgentTemplate.ItemsSource = _agntTemplates; comboBox_AgentTemplate.ItemsSource = _agntTemplates;
} }
MessageBox.Show("Template saved", "OK", MessageBoxButton.OK, MessageBoxImage.Information); MessageBox.Show("Template saved", "OK", MessageBoxButton.OK, MessageBoxImage.Information);
} }
private void buttonUndoTemplate_Click(object sender, RoutedEventArgs e) private void buttonUndoTemplate_Click(object sender, RoutedEventArgs e)
{ {
@ -349,7 +350,7 @@ namespace ENI2.DetailViewControls
this.textBox_AgentStreetAndNumber.GetBindingExpression(TextBox.TextProperty).UpdateSource(); this.textBox_AgentStreetAndNumber.GetBindingExpression(TextBox.TextProperty).UpdateSource();
this.buttonUndoTemplate.IsEnabled = false; // can't undo after undo this.buttonUndoTemplate.IsEnabled = false; // can't undo after undo
} }
private void buttonSetTemplate_Click(object sender, RoutedEventArgs e) private void buttonSetTemplate_Click(object sender, RoutedEventArgs e)
{ {

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>4</ApplicationRevision> <ApplicationRevision>8</ApplicationRevision>
<ApplicationVersion>7.6.0.%2a</ApplicationVersion> <ApplicationVersion>7.7.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut> <CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted> <PublishWizardCompleted>true</PublishWizardCompleted>
@ -996,7 +996,7 @@
</PropertyGroup> </PropertyGroup>
<Error Condition="!Exists('packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets'))" /> <Error Condition="!Exists('packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets'))" />
</Target> </Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild"> <Target Name="BeforeBuild">
</Target> </Target>

View File

@ -19,7 +19,7 @@ Copyright (c) 2017 schick Informatik
<RowDefinition Height="28" /> <RowDefinition Height="28" />
<RowDefinition Height="28" /> <RowDefinition Height="28" />
<RowDefinition Height="28" /> <RowDefinition Height="28" />
<RowDefinition Height="28" /> <RowDefinition Height="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" /> <ColumnDefinition Width="1*" />
@ -35,6 +35,8 @@ Copyright (c) 2017 schick Informatik
<Label Name="labelPortOfLoading" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textCargoPortOfLoading}" /> <Label Name="labelPortOfLoading" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textCargoPortOfLoading}" />
<Label Name="labelPortOfDischarge" Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textCargoPortOfDischarge}" /> <Label Name="labelPortOfDischarge" Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textCargoPortOfDischarge}" />
<Label Name="labelCodeNST3" Grid.Row="1" Grid.Column="2" Content="{x:Static p:Resources.textCargoCodeNST3}" /> <Label Name="labelCodeNST3" Grid.Row="1" Grid.Column="2" Content="{x:Static p:Resources.textCargoCodeNST3}" />
<Label Name="labelSearchNST2007" Grid.Row="3" Grid.Column="2" Content="{x:Static p:Resources.textSearchNST}" HorizontalAlignment="Right" />
<ComboBox Grid.Row="0" Grid.Column="1" Name="comboBoxHandlingType" Margin="2" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True"/> <ComboBox Grid.Row="0" Grid.Column="1" Name="comboBoxHandlingType" Margin="2" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True"/>
<ComboBox Grid.Row="0" Grid.Column="3" Name="comboBoxLACodes" Margin="2" IsEditable="True" SelectedValuePath="Key" DisplayMemberPath="Value" StaysOpenOnEdit="True" IsTextSearchEnabled="True"/> <ComboBox Grid.Row="0" Grid.Column="3" Name="comboBoxLACodes" Margin="2" IsEditable="True" SelectedValuePath="Key" DisplayMemberPath="Value" StaysOpenOnEdit="True" IsTextSearchEnabled="True"/>
@ -43,7 +45,26 @@ Copyright (c) 2017 schick Informatik
<xctk:IntegerUpDown Grid.Row="2" Grid.Column="1" Name="integerUpDownNumberOfItems" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2,2,2,2" TextAlignment="Left"/> <xctk:IntegerUpDown Grid.Row="2" Grid.Column="1" Name="integerUpDownNumberOfItems" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2,2,2,2" TextAlignment="Left"/>
<xctk:DoubleUpDown Grid.Row="3" Grid.Column="1" Name="doubleUpDownGrossQuantity" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2,2,2,2" FormatString="N3" TextAlignment="Left"/> <xctk:DoubleUpDown Grid.Row="3" Grid.Column="1" Name="doubleUpDownGrossQuantity" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2,2,2,2" FormatString="N3" TextAlignment="Left"/>
<enictrl:LocodeControl Grid.Column="1" Grid.Row="4" Width="Auto" x:Name="locodeControl_PortOfLoading" /> <enictrl:LocodeControl Grid.Column="1" Grid.Row="4" Width="Auto" x:Name="locodeControl_PortOfLoading" />
<enictrl:LocodeControl Grid.Column="1" Grid.Row="5" Width="Auto" x:Name="locodeControl_PortOfDischarge" /> <enictrl:LocodeControl Grid.Column="1" Grid.Row="5" Width="Auto" x:Name="locodeControl_PortOfDischarge" Height="28" VerticalAlignment="Top"/>
<TextBox Grid.Row="3" Grid.Column="3" Margin="2" Name="textBoxSearchNSTList" TextChanged="textBoxSearchNSTList_TextChanged" VerticalContentAlignment="Center" />
<Grid Grid.Row="4" Grid.Column="3" Grid.RowSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="28" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="28" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<ListBox Name="listBoxNST2007" Margin="2" Grid.RowSpan="2" DisplayMemberPath="Key" MouseDoubleClick="listBoxNST2007_MouseDoubleClick" />
<!--ComboBox Name="comboBoxSelectNST2007ListItem" Margin="2" DisplayMemberPath="Key" Grid.RowSpan="2" /-->
<Button Name="buttonSetTemplate" Margin="2" Click="buttonSetTemplate_Click" BorderThickness="0" Background="Transparent" ToolTip="Apply template" HorizontalContentAlignment="Right" Grid.Column="1">
<StackPanel Orientation="Horizontal">
<Image Source="../Resources/check.png" Margin="0,0,0,0" Height="20" Width="20" />
</StackPanel>
</Button>
</Grid>
</Grid> </Grid>
</enictrl:EditWindowBase> </enictrl:EditWindowBase>

View File

@ -2,13 +2,14 @@
// Description: LADG Bearbeitungsdialog // Description: LADG Bearbeitungsdialog
// //
using System;
using System.Linq;
using System.Windows; using System.Windows;
using System.Collections.Generic; using System.Collections.Generic;
using bsmd.database; using bsmd.database;
using ENI2.Controls; using ENI2.Controls;
using System.Collections.ObjectModel;
using System.Windows.Data;
namespace ENI2.EditControls namespace ENI2.EditControls
{ {
@ -30,13 +31,17 @@ namespace ENI2.EditControls
Properties.Resources.textDischarge Properties.Resources.textDischarge
}; };
private static List<KeyValuePair<string, string>> _nstList = null;
public EditLADGDialog() public EditLADGDialog()
{ {
InitializeComponent(); InitializeComponent();
Loaded += EditLADGDialog_Loaded; Loaded += EditLADGDialog_Loaded;
if (_nstList == null)
_nstList = LocalizedLookup.GetNST2007List();
} }
public LADG LADG { get; set; } public LADG LADG { get; set; }
public MessageCore Core { get; set; } public MessageCore Core { get; set; }
@ -55,16 +60,16 @@ namespace ENI2.EditControls
if (this.LADG.CargoHandlingType.HasValue) if (this.LADG.CargoHandlingType.HasValue)
this.comboBoxHandlingType.SelectedIndex = this.LADG.CargoHandlingType.Value; this.comboBoxHandlingType.SelectedIndex = this.LADG.CargoHandlingType.Value;
this.comboBoxLACodes.ItemsSource = LADG.LACodes; this.comboBoxLACodes.ItemsSource = LADG.LACodes;
this.comboBoxLACodes.SelectedValue = this.LADG.CargoLACode; this.comboBoxLACodes.SelectedValue = this.LADG.CargoLACode;
this.integerUpDownNumberOfItems.Value = this.LADG.CargoNumberOfItems; this.integerUpDownNumberOfItems.Value = this.LADG.CargoNumberOfItems;
this.doubleUpDownGrossQuantity.Value = this.LADG.CargoGrossQuantity_TNE; this.doubleUpDownGrossQuantity.Value = this.LADG.CargoGrossQuantity_TNE;
this.locodeControl_PortOfLoading.LocodeValue = this.LADG.PortOfLoading; this.locodeControl_PortOfLoading.LocodeValue = this.LADG.PortOfLoading;
this.locodeControl_PortOfDischarge.LocodeValue = this.LADG.PortOfDischarge; this.locodeControl_PortOfDischarge.LocodeValue = this.LADG.PortOfDischarge;
this.comboBoxLACodes.SelectedValue = this.LADG.CargoLACode; this.comboBoxLACodes.SelectedValue = this.LADG.CargoLACode;
this.comboBoxNSTCode.ItemsSource = LADG.CargoCodesNST; this.comboBoxNSTCode.ItemsSource = LADG.CargoCodesNST;
this.comboBoxNSTCode.SelectedValue = this.LADG.CargoCodeNST; this.comboBoxNSTCode.SelectedValue = this.LADG.CargoCodeNST;
this.comboBoxNSTCode.SelectionChanged += ComboBoxNSTCode_SelectionChanged; this.comboBoxNSTCode.SelectionChanged += ComboBoxNSTCode_SelectionChanged;
this.comboBoxNST3Code.ItemsSource = LADG.CargoCodesNST3; this.comboBoxNST3Code.ItemsSource = LADG.CargoCodesNST3;
@ -93,7 +98,7 @@ namespace ENI2.EditControls
{ {
if (this.comboBoxNSTCode.SelectedItem == null) return; if (this.comboBoxNSTCode.SelectedItem == null) return;
// filter ItemsSource von NST3 // filter ItemsSource von NST3
KeyValuePair<string, string> selectedItem = (KeyValuePair < string, string> ) this.comboBoxNSTCode.SelectedItem; KeyValuePair<string, string> selectedItem = (KeyValuePair < string, string> ) this.comboBoxNSTCode.SelectedItem;
string key = selectedItem.Key; string key = selectedItem.Key;
if (key.Length == 1) key = "0" + key; if (key.Length == 1) key = "0" + key;
List<KeyValuePair<string, string>> filteredItemsSource = new List<KeyValuePair<string, string>>(); List<KeyValuePair<string, string>> filteredItemsSource = new List<KeyValuePair<string, string>>();
@ -102,7 +107,7 @@ namespace ENI2.EditControls
if (aPair.Value.StartsWith(key)) if (aPair.Value.StartsWith(key))
filteredItemsSource.Add(aPair); filteredItemsSource.Add(aPair);
} }
this.comboBoxNST3Code.ItemsSource = filteredItemsSource; this.comboBoxNST3Code.ItemsSource = filteredItemsSource;
} }
private void EditLADGDialog_OKClicked() private void EditLADGDialog_OKClicked()
@ -110,7 +115,44 @@ namespace ENI2.EditControls
this.CopyValuesToEntity(); this.CopyValuesToEntity();
} }
#endregion #endregion
#region NST2007 list search/select event handler
private void textBoxSearchNSTList_TextChanged(object sender, System.Windows.Controls.TextChangedEventArgs e)
{
if (textBoxSearchNSTList.Text.IsNullOrEmpty() || (textBoxSearchNSTList.Text.Length == 1))
{
this.listBoxNST2007.ItemsSource = null;
// this.comboBoxSelectNST2007ListItem.ItemsSource = null;
}
else
{
var result = _nstList.Where(kvp => kvp.Key.Contains(textBoxSearchNSTList.Text, StringComparison.OrdinalIgnoreCase));
this.listBoxNST2007.ItemsSource = result;
//this.comboBoxSelectNST2007ListItem.ItemsSource = result;
}
}
private void buttonSetTemplate_Click(object sender, RoutedEventArgs e)
{
if(this.listBoxNST2007.SelectedItem != null)
{
KeyValuePair<string, string> selectedTemplate = (KeyValuePair<string, string>) this.listBoxNST2007.SelectedItem;
if(selectedTemplate.Value.Length == 3)
{
this.comboBoxNSTCode.SelectedValue = selectedTemplate.Value.Substring(0, 2);
this.comboBoxNST3Code.SelectedValue = selectedTemplate.Value.Substring(2, 1);
}
}
}
private void listBoxNST2007_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
this.buttonSetTemplate_Click(null, null);
}
#endregion
} }
} }

View File

@ -48,6 +48,7 @@
<Label Name="labelArchived" Grid.Row="8" Grid.Column="0" Content="{x:Static p:Resources.textArchived}" HorizontalContentAlignment="Right" /> <Label Name="labelArchived" Grid.Row="8" Grid.Column="0" Content="{x:Static p:Resources.textArchived}" HorizontalContentAlignment="Right" />
<Label Name="labelCreated" Grid.Row="9" Grid.Column="0" Content="{x:Static p:Resources.textCreated}" HorizontalContentAlignment="Right" /> <Label Name="labelCreated" Grid.Row="9" Grid.Column="0" Content="{x:Static p:Resources.textCreated}" HorizontalContentAlignment="Right" />
<Label Name="labelChanged" Grid.Row="9" Grid.Column="2" Content="{x:Static p:Resources.textChanged}" HorizontalContentAlignment="Right" /> <Label Name="labelChanged" Grid.Row="9" Grid.Column="2" Content="{x:Static p:Resources.textChanged}" HorizontalContentAlignment="Right" />
<Label Name="labelEditor" Grid.Row="8" Grid.Column="2" Content="{x:Static p:Resources.textEditor}" HorizontalContentAlignment="Right" />
<TextBox Grid.Row="0" Grid.Column="1" Width="auto" Name="textBoxName" Margin="2" MaxLength="100" VerticalContentAlignment="Center" /> <TextBox Grid.Row="0" Grid.Column="1" Width="auto" Name="textBoxName" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
<TextBox Grid.Row="0" Grid.Column="3" Width="auto" Name="textBoxEMail" Margin="2" MaxLength="100" VerticalContentAlignment="Center" /> <TextBox Grid.Row="0" Grid.Column="3" Width="auto" Name="textBoxEMail" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
@ -64,6 +65,7 @@
<PasswordBox Grid.Row="6" Grid.Column="3" Width="auto" Name="passwordBoxPassword" Margin="2" VerticalContentAlignment="Center" /> <PasswordBox Grid.Row="6" Grid.Column="3" Width="auto" Name="passwordBoxPassword" Margin="2" VerticalContentAlignment="Center" />
<TextBox Grid.Row="7" Grid.Column="1" Width="auto" Name="textBoxUserEMail" Margin="2" MaxLength="100" VerticalContentAlignment="Center" /> <TextBox Grid.Row="7" Grid.Column="1" Width="auto" Name="textBoxUserEMail" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
<CheckBox Grid.Row="7" Grid.Column="3" VerticalAlignment="Center" Name="checkBoxAdministrator" Margin="2" /> <CheckBox Grid.Row="7" Grid.Column="3" VerticalAlignment="Center" Name="checkBoxAdministrator" Margin="2" />
<CheckBox Grid.Row="8" Grid.Column="3" VerticalAlignment="Center" Name="checkBoxEditor" Margin="2" />
<CheckBox Grid.Row="8" Grid.Column="1" VerticalAlignment="Center" Name="checkBoxArchived" Margin="2" /> <CheckBox Grid.Row="8" Grid.Column="1" VerticalAlignment="Center" Name="checkBoxArchived" Margin="2" />
<Label Grid.Row="9" Grid.Column="1" Name="dateTimePickerCreated" FontStyle="Italic" /> <Label Grid.Row="9" Grid.Column="1" Name="dateTimePickerCreated" FontStyle="Italic" />

View File

@ -39,6 +39,7 @@ namespace ENI2.EditControls
this.checkBoxAdministrator.IsChecked = this.ReportingParty.IsAdmin; this.checkBoxAdministrator.IsChecked = this.ReportingParty.IsAdmin;
this.checkBoxArchived.IsChecked = this.ReportingParty.IsArchived; this.checkBoxArchived.IsChecked = this.ReportingParty.IsArchived;
this.checkBoxEditor.IsChecked = this.ReportingParty.IsEditor;
this.dateTimePickerChanged.Content = this.ReportingParty.Changed.HasValue ? this.ReportingParty.Changed.ToString() : ""; this.dateTimePickerChanged.Content = this.ReportingParty.Changed.HasValue ? this.ReportingParty.Changed.ToString() : "";
this.dateTimePickerCreated.Content = this.ReportingParty.Created.HasValue ? this.ReportingParty.Created.ToString() : ""; this.dateTimePickerCreated.Content = this.ReportingParty.Created.HasValue ? this.ReportingParty.Created.ToString() : "";
@ -67,8 +68,9 @@ namespace ENI2.EditControls
this.ReportingParty.SetPassword(this.passwordBoxPassword.Password); this.ReportingParty.SetPassword(this.passwordBoxPassword.Password);
} }
this.ReportingParty.IsAdmin = this.checkBoxAdministrator.IsChecked ?? false; this.ReportingParty.IsAdmin = this.checkBoxAdministrator.IsChecked ?? false;
this.ReportingParty.IsArchived = this.checkBoxArchived.IsChecked ?? false; this.ReportingParty.IsArchived = this.checkBoxArchived.IsChecked ?? false;
this.ReportingParty.IsEditor = this.checkBoxEditor.IsChecked ?? false;
// save value // save value
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(this.ReportingParty); DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(this.ReportingParty);

View File

@ -29,7 +29,7 @@
<Label Name="labelIMO" Grid.Column="1" Grid.Row="2"/> <Label Name="labelIMO" Grid.Column="1" Grid.Row="2"/>
<Label Name="statusLabel" HorizontalAlignment="Center" Content="{x:Static p:Resources.textWaitForId}" Background="LemonChiffon" Grid.Row="3" Grid.ColumnSpan="2"/> <Label Name="statusLabel" HorizontalAlignment="Center" Content="{x:Static p:Resources.textWaitForId}" Background="LemonChiffon" Grid.Row="3" Grid.ColumnSpan="2"/>
<TextBox IsReadOnly="True" Name="textBoxId" MouseDown="textBoxId_MouseDown" FontWeight="Bold" HorizontalAlignment="Center" VerticalContentAlignment="Center" Margin="2" Grid.Row="4" Grid.ColumnSpan="2"/> <TextBox IsReadOnly="True" Name="textBoxId" MouseDown="textBoxId_MouseDown" FontWeight="Bold" HorizontalAlignment="Center" VerticalContentAlignment="Center" Margin="2" Grid.Row="4" Grid.ColumnSpan="2"/>
<Label Name="clickToCopyLabel" Content=" -> click to copy" HorizontalAlignment="Center" Grid.Row="5" Grid.ColumnSpan="2" MouseDown="textBoxId_MouseDown" Visibility="Hidden"/> <Button Name="clickToCopyButton" Content=" -&gt; click to copy &lt;- " HorizontalAlignment="Center" Grid.Row="5" Grid.ColumnSpan="2" Click="clickToCopyButton_Click" Visibility="Hidden" Margin="2"/>
<Button Grid.Row="6" Grid.Column="0" HorizontalAlignment="Left" Content="Close and open Id" Margin="2" Width="100" Click="Button_Click_1" /> <Button Grid.Row="6" Grid.Column="0" HorizontalAlignment="Left" Content="Close and open Id" Margin="2" Width="100" Click="Button_Click_1" />
<Button Grid.Row="6" Grid.Column="1" HorizontalAlignment="Right" Content="Close" Margin="2" Width="100" Click="Button_Click" /> <Button Grid.Row="6" Grid.Column="1" HorizontalAlignment="Right" Content="Close" Margin="2" Width="100" Click="Button_Click" />
</Grid> </Grid>

View File

@ -38,15 +38,10 @@ namespace ENI2.EditControls
this.DisplayId = id; this.DisplayId = id;
this.statusLabel.Content = Properties.Resources.textIdReceived; this.statusLabel.Content = Properties.Resources.textIdReceived;
this.statusLabel.Background = Brushes.LightGreen; this.statusLabel.Background = Brushes.LightGreen;
this.clickToCopyLabel.Visibility = Visibility.Visible; this.clickToCopyButton.Visibility = Visibility.Visible;
})); }));
} }
private void textBoxId_MouseDown(object sender, MouseButtonEventArgs e)
{
Clipboard.SetText(this.textBoxId.Text);
}
private void Button_Click(object sender, RoutedEventArgs e) private void Button_Click(object sender, RoutedEventArgs e)
{ {
this.Close(); this.Close();
@ -67,5 +62,16 @@ namespace ENI2.EditControls
this.labelIMO.Content = this.Core.IMO.IsNullOrEmpty() ? this.Core.ENI : this.Core.IMO; this.labelIMO.Content = this.Core.IMO.IsNullOrEmpty() ? this.Core.ENI : this.Core.IMO;
} }
} }
private void clickToCopyButton_Click(object sender, RoutedEventArgs e)
{
Clipboard.SetText(this.textBoxId.Text);
this.clickToCopyButton.Background = Brushes.LightGreen;
}
private void textBoxId_MouseDown(object sender, MouseButtonEventArgs e)
{
Clipboard.SetText(this.textBoxId.Text);
}
} }
} }

View File

@ -7,27 +7,25 @@
// //
// Copyright (c) 2015 Informatikbüro Daniel Schick. All rights reserved. // Copyright (c) 2015 Informatikbüro Daniel Schick. All rights reserved.
using log4net; using bsmd.database;
using ENI2.Locode;
using Microsoft.Office.Interop.Excel; using Microsoft.Office.Interop.Excel;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
using System.Globalization; using System.Globalization;
using System.Linq; using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using ENI2.Locode;
using bsmd.database;
using System.Text.RegularExpressions;
namespace ENI2.Excel namespace ENI2.Excel
{ {
internal class ExcelReader : ExcelBase internal class ExcelReader : ExcelBase
{ {
internal enum ReadState
{ NONE, OK, WARN, FAIL };
internal enum ReadState { NONE, OK, WARN, FAIL }; internal enum SheetTypeEnum
{ BSMD, DAKOSY };
internal enum SheetTypeEnum { BSMD, DAKOSY };
private readonly SheetTypeEnum _sheetType = SheetTypeEnum.BSMD; private readonly SheetTypeEnum _sheetType = SheetTypeEnum.BSMD;
@ -36,15 +34,16 @@ namespace ENI2.Excel
public ExcelReader(string filePath, bool openReadonly = true, bool createNameFields = true) public ExcelReader(string filePath, bool openReadonly = true, bool createNameFields = true)
{ {
this._workBook = _excelWorkbooks.Open(filePath, 0, openReadonly, 5, "", "", false, XlPlatform.xlWindows, "", false, false, 0, false, false, false); this._workBook = _excelWorkbooks.Open(filePath, 0, openReadonly, 5, "", "", false, XlPlatform.xlWindows, "", false, false, 0, false, false, false);
if(createNameFields) if (createNameFields)
this.InitNameFields(); this.InitNameFields();
// Determine if this is a Dakosy or BSMD Sheet // Determine if this is a Dakosy or BSMD Sheet
if(createNameFields) if (createNameFields)
_sheetType = (_nameDict.Count > 10) ? SheetTypeEnum.BSMD : SheetTypeEnum.DAKOSY; _sheetType = (_nameDict.Count > 10) ? SheetTypeEnum.BSMD : SheetTypeEnum.DAKOSY;
} }
public SheetTypeEnum SheetType { get { return _sheetType; } } public SheetTypeEnum SheetType
{ get { return _sheetType; } }
internal static void SaveMessage(Message message) internal static void SaveMessage(Message message)
{ {
@ -80,7 +79,7 @@ namespace ENI2.Excel
if (result != null) if (result != null)
{ {
result = result.Trim(); result = result.Trim();
if(result.Length > 0) if (result.Length > 0)
{ {
result = result.Clean(); result = result.Clean();
} }
@ -120,7 +119,7 @@ namespace ENI2.Excel
if (!val.IsNullOrEmpty()) if (!val.IsNullOrEmpty())
{ {
val = val.ToUpper(); val = val.ToUpper();
string portName = LocodeDB.SSNPortNameFromLocode(val); string portName = LocodeDB.SSNPortNameFromLocode(val);
if (portName.IsNullOrEmpty()) if (portName.IsNullOrEmpty())
{ {
_log.WarnFormat("unknown Locode {0}", val); _log.WarnFormat("unknown Locode {0}", val);
@ -135,7 +134,7 @@ namespace ENI2.Excel
string val = ReadText(lookup); string val = ReadText(lookup);
if (val.IsNullOrEmpty()) return null; if (val.IsNullOrEmpty()) return null;
if(int.TryParse(val, out int result)) if (int.TryParse(val, out int result))
{ {
if ((result < 10) || (result > 99)) if ((result < 10) || (result > 99))
_log.WarnFormat("invalid cargo LA code {0}", result); _log.WarnFormat("invalid cargo LA code {0}", result);
@ -154,16 +153,17 @@ namespace ENI2.Excel
string val = this.ReadText(lookup); string val = this.ReadText(lookup);
if (val != null) if (val != null)
{ {
if (val.Equals("m", StringComparison.CurrentCultureIgnoreCase) || val.Equals("male", StringComparison.CurrentCultureIgnoreCase)) { if (val.Equals("m", StringComparison.CurrentCultureIgnoreCase) || val.Equals("male", StringComparison.CurrentCultureIgnoreCase))
{
result = 1; result = 1;
} }
else if (val.Equals("f", StringComparison.CurrentCultureIgnoreCase) || val.Equals("female", StringComparison.CurrentCultureIgnoreCase)) else if (val.Equals("f", StringComparison.CurrentCultureIgnoreCase) || val.Equals("female", StringComparison.CurrentCultureIgnoreCase))
{ {
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("d", StringComparison.CurrentCultureIgnoreCase) || val.Equals("d", StringComparison.CurrentCultureIgnoreCase) ||
val.Equals("diverse", StringComparison.CurrentCultureIgnoreCase)) val.Equals("diverse", StringComparison.CurrentCultureIgnoreCase))
{ {
result = 9; result = 9;
@ -173,7 +173,7 @@ namespace ENI2.Excel
result = 0; result = 0;
} }
} }
if(result == null) if (result == null)
{ {
_log.ErrorFormat("error reading gender on {0}", lookup); _log.ErrorFormat("error reading gender on {0}", lookup);
} }
@ -192,7 +192,7 @@ namespace ENI2.Excel
if (val.Equals("picture_id", StringComparison.CurrentCultureIgnoreCase) || val.Equals("picture id", StringComparison.CurrentCultureIgnoreCase) || val.Equals("4")) result = 3; if (val.Equals("picture_id", StringComparison.CurrentCultureIgnoreCase) || val.Equals("picture id", StringComparison.CurrentCultureIgnoreCase) || val.Equals("4")) result = 3;
if (val.Equals("residental_permit", StringComparison.CurrentCultureIgnoreCase) || val.Equals("residental permit", StringComparison.CurrentCultureIgnoreCase) || val.Equals("5")) result = 4; if (val.Equals("residental_permit", StringComparison.CurrentCultureIgnoreCase) || val.Equals("residental permit", StringComparison.CurrentCultureIgnoreCase) || val.Equals("5")) result = 4;
if (val.Equals("other_legal_identity_document", StringComparison.CurrentCultureIgnoreCase) || val.Equals("other legal identity document", StringComparison.CurrentCultureIgnoreCase) || val.Equals("6")) result = 5; if (val.Equals("other_legal_identity_document", StringComparison.CurrentCultureIgnoreCase) || val.Equals("other legal identity document", StringComparison.CurrentCultureIgnoreCase) || val.Equals("6")) result = 5;
if (val.Equals("ic", StringComparison.CurrentCultureIgnoreCase)) result = 0; if (val.Equals("ic", StringComparison.CurrentCultureIgnoreCase)) result = 0;
} }
if (!result.HasValue) if (!result.HasValue)
@ -243,11 +243,11 @@ namespace ENI2.Excel
string val = this.ReadText(lookup); string val = this.ReadText(lookup);
byte? result = null; byte? result = null;
if(val != null) if (val != null)
{ {
if ((val.IndexOf("load", StringComparison.OrdinalIgnoreCase) >= 0) || val.Equals("1")) result = 0; if ((val.IndexOf("load", StringComparison.OrdinalIgnoreCase) >= 0) || val.Equals("1")) result = 0;
if ((val.IndexOf("discharge", StringComparison.OrdinalIgnoreCase) >= 0) || val.Equals("2")) result = 1; if ((val.IndexOf("discharge", StringComparison.OrdinalIgnoreCase) >= 0) || val.Equals("2")) result = 1;
if ((val.IndexOf("transit", StringComparison.OrdinalIgnoreCase) >= 0) || val.Equals("3")) result = 2; if ((val.IndexOf("transit", StringComparison.OrdinalIgnoreCase) >= 0) || val.Equals("3")) result = 2;
} }
if (!result.HasValue) if (!result.HasValue)
@ -275,7 +275,7 @@ namespace ENI2.Excel
_log.ErrorFormat("Wrong ISO code {0}", val); _log.ErrorFormat("Wrong ISO code {0}", val);
val = ""; val = "";
} }
} }
} }
return val; return val;
} }
@ -302,7 +302,7 @@ namespace ENI2.Excel
string val = this.ReadText(lookup); string val = this.ReadText(lookup);
byte? result = null; byte? result = null;
if(val!= null) if (val != null)
{ {
if (val == "I") result = 0; if (val == "I") result = 0;
if (val == "1") result = 0; if (val == "1") result = 0;
@ -310,7 +310,7 @@ namespace ENI2.Excel
if (val == "2") result = 1; if (val == "2") result = 1;
if (val == "III") result = 2; if (val == "III") result = 2;
if (val == "3") result = 2; if (val == "3") result = 2;
if (val.Equals("NONE", StringComparison.OrdinalIgnoreCase)) result = 0; if (val.Equals("NONE", StringComparison.OrdinalIgnoreCase)) result = 0;
} }
if (!result.HasValue) if (!result.HasValue)
@ -323,7 +323,7 @@ namespace ENI2.Excel
{ {
string val = this.ReadText(lookup); string val = this.ReadText(lookup);
bool isValid = false; bool isValid = false;
if(!val.IsNullOrEmpty()) if (!val.IsNullOrEmpty())
{ {
if (int.TryParse(val, out int typeVal)) if (int.TryParse(val, out int typeVal))
{ {
@ -371,13 +371,13 @@ namespace ENI2.Excel
_log.ErrorFormat("cannot read delivery {0}", lookup); _log.ErrorFormat("cannot read delivery {0}", lookup);
return result; return result;
} }
internal byte? ReadHazards(string lookup) internal byte? ReadHazards(string lookup)
{ {
string val = this.ReadText(lookup); string val = this.ReadText(lookup);
byte? result = null; byte? result = null;
if(val != null) if (val != null)
{ {
if (val.Equals("p", StringComparison.OrdinalIgnoreCase)) return 0; if (val.Equals("p", StringComparison.OrdinalIgnoreCase)) return 0;
if (val.Equals("s", StringComparison.OrdinalIgnoreCase)) return 1; if (val.Equals("s", StringComparison.OrdinalIgnoreCase)) return 1;
@ -390,7 +390,7 @@ namespace ENI2.Excel
{ {
string val = this.ReadText(lookup); string val = this.ReadText(lookup);
byte? result = null; byte? result = null;
if(val != null) if (val != null)
{ {
if (val.Equals("a", StringComparison.OrdinalIgnoreCase)) return 0; if (val.Equals("a", StringComparison.OrdinalIgnoreCase)) return 0;
if (val.Equals("b", StringComparison.OrdinalIgnoreCase)) return 1; if (val.Equals("b", StringComparison.OrdinalIgnoreCase)) return 1;
@ -401,8 +401,8 @@ namespace ENI2.Excel
internal DateTime? ReadBirthDate(string lookup) internal DateTime? ReadBirthDate(string lookup)
{ {
DateTime? result = this.ReadDate(lookup); DateTime? result = this.ReadDate(lookup);
if(result.HasValue) if (result.HasValue)
{ {
if (result.Value > DateTime.Now) if (result.Value > DateTime.Now)
_log.WarnFormat("Birth date implausible for {0} : {1}", lookup, result); _log.WarnFormat("Birth date implausible for {0} : {1}", lookup, result);
@ -420,7 +420,7 @@ namespace ENI2.Excel
{ {
var val = _nameDict[lookup].RefersToRange.Value; var val = _nameDict[lookup].RefersToRange.Value;
if (val is DateTime) if (val is DateTime)
{ {
date = val; date = val;
} }
else if (val is double) else if (val is double)
@ -430,7 +430,7 @@ namespace ENI2.Excel
date = DateTime.FromOADate(val); date = DateTime.FromOADate(val);
} }
catch (ArgumentException) { /* .. */ } catch (ArgumentException) { /* .. */ }
if(date == null) if (date == null)
{ {
CultureInfo provider = CultureInfo.InvariantCulture; CultureInfo provider = CultureInfo.InvariantCulture;
string dateString = val.ToString(); string dateString = val.ToString();
@ -446,22 +446,37 @@ namespace ENI2.Excel
date = tmpDate; date = tmpDate;
} }
if (date == null)
{
string[] formats = { "d/M/yyyy", "dd/M/yyyy", "d/MM/yyyy", "dd/MM/yyyy", "d/MMM/yyyy", "dd/MMM/yyyy", "yyyy-MM-dd", "yyyy-mm-d", "dd-MM-yyyy" };
if (DateTime.TryParseExact(val, formats, NumberFormatInfo.InvariantInfo, DateTimeStyles.None, out DateTime tmpDate))
date = tmpDate;
}
if (date == null)
{
CultureInfo en = CultureInfo.CreateSpecificCulture("en-US");
string[] formats = { "d/M/yyyy", "dd/M/yyyy", "d/MM/yyyy", "dd/MM/yyyy", "d/MMM/yyyy", "dd/MMM/yyyy", "yyyy-MM-dd", "yyyy-mm-d", "dd-MM-yyyy" };
if (DateTime.TryParseExact(val, formats, en, DateTimeStyles.None, out DateTime tmpDate))
return tmpDate;
}
if (date != null) if (date != null)
{ {
if ((date.Value < new DateTime(1899, 1, 1)) || (date.Value > new DateTime(2130, 1, 1))) if ((date.Value < new DateTime(1899, 1, 1)) || (date.Value > new DateTime(2130, 1, 1)))
{ {
date = null; // this can't be right date = null; // this can't be right
} }
} }
} }
return date; return date;
} }
catch (Exception) catch (Exception)
{ {
_log.WarnFormat("error parsing datetime for lookup {0}", lookup); _log.WarnFormat("error parsing datetime for lookup {0}", lookup);
return null; return null;
} }
} }
internal DateTime? ReadDateTime(string dateField, string timeField) internal DateTime? ReadDateTime(string dateField, string timeField)
@ -470,26 +485,26 @@ namespace ENI2.Excel
DateTime? etaDate = this.ReadDate(dateField); DateTime? etaDate = this.ReadDate(dateField);
DateTime? etaTime = this.ReadTime(timeField); DateTime? etaTime = this.ReadTime(timeField);
if (etaDate != null) if (etaDate != null)
{ {
if (etaTime != null) if (etaTime != null)
{ {
result = new DateTime(etaDate.Value.Year, etaDate.Value.Month, etaDate.Value.Day, etaTime.Value.Hour, etaTime.Value.Minute, etaTime.Value.Second, DateTimeKind.Local); result = new DateTime(etaDate.Value.Year, etaDate.Value.Month, etaDate.Value.Day, etaTime.Value.Hour, etaTime.Value.Minute, etaTime.Value.Second, DateTimeKind.Local);
result = result.Value.ToUniversalTime(); result = result.Value.ToUniversalTime();
} }
else else
{ {
result = new DateTime(etaDate.Value.Year, etaDate.Value.Month, etaDate.Value.Day, 0, 0, 0, DateTimeKind.Local); result = new DateTime(etaDate.Value.Year, etaDate.Value.Month, etaDate.Value.Day, 0, 0, 0, DateTimeKind.Local);
result = result.Value.ToUniversalTime(); result = result.Value.ToUniversalTime();
} }
} }
return result; return result;
} }
internal DateTime? ReadTime(string lookup) internal DateTime? ReadTime(string lookup)
{ {
DateTime? result = null; DateTime? result = null;
try try
{ {
if (_nameDict.ContainsKey(lookup)) if (_nameDict.ContainsKey(lookup))
@ -505,7 +520,7 @@ namespace ENI2.Excel
{ {
result = DateTime.FromOADate(val); result = DateTime.FromOADate(val);
} }
catch(ArgumentException) { } catch (ArgumentException) { }
if (result == null) if (result == null)
{ {
@ -520,7 +535,8 @@ namespace ENI2.Excel
} }
} }
if (val is string) { if (val is string)
{
if (((string)val).EndsWith("lt", StringComparison.OrdinalIgnoreCase)) if (((string)val).EndsWith("lt", StringComparison.OrdinalIgnoreCase))
val = ((string)val).Substring(0, ((string)val).Length - 2).Trim(); val = ((string)val).Substring(0, ((string)val).Length - 2).Trim();
else else
@ -549,21 +565,21 @@ namespace ENI2.Excel
if (DateTime.TryParseExact(dateString, format, provider, DateTimeStyles.None, out DateTime tmpDate)) if (DateTime.TryParseExact(dateString, format, provider, DateTimeStyles.None, out DateTime tmpDate))
result = tmpDate; result = tmpDate;
} }
} }
} }
} }
catch (Exception) catch (Exception)
{ {
_log.WarnFormat("error reading time for lookup {0}", lookup); _log.WarnFormat("error reading time for lookup {0}", lookup);
} }
return result; return result;
} }
internal double ReadNumberDefaultZero(string lookup) internal double ReadNumberDefaultZero(string lookup)
{ {
double? result = this.ReadNumber(lookup); double? result = this.ReadNumber(lookup);
if(!result.HasValue) if (!result.HasValue)
{ {
result = 0; result = 0;
} }
@ -573,9 +589,9 @@ namespace ENI2.Excel
internal bool? ReadBoolean(string lookup) internal bool? ReadBoolean(string lookup)
{ {
string val = this.ReadText(lookup); string val = this.ReadText(lookup);
if (val == null) if (val == null)
return null; return null;
if ((val == "y") || (val == "Y") || val.Equals("yes", StringComparison.OrdinalIgnoreCase) || (val == "1") || (val == "x") || (val == "X")) if ((val == "y") || (val == "Y") || val.Equals("yes", StringComparison.OrdinalIgnoreCase) || (val == "1") || (val == "x") || (val == "X"))
return true; return true;
@ -584,17 +600,30 @@ namespace ENI2.Excel
#region Dakosy-specific functions #region Dakosy-specific functions
internal bool HasWorksheetNamed(string sheetName)
{
try
{
Worksheet theWorkSheet = _workBook.Worksheets[sheetName];
return theWorkSheet != null;
}
catch (Exception)
{
return false;
}
}
internal string ReadCellAsText(string sheetName, string range) internal string ReadCellAsText(string sheetName, string range)
{ {
try try
{ {
Worksheet workSheet = (Worksheet) _workBook.Worksheets[sheetName]; Worksheet workSheet = (Worksheet)_workBook.Worksheets[sheetName];
string result = workSheet.Range[range].Text.ToString(); string result = workSheet.Range[range].Text.ToString();
if (!result.IsNullOrEmpty()) if (!result.IsNullOrEmpty())
result = result.Trim().Clean(); result = result.Trim().Clean();
return result; return result;
} }
catch(Exception e) catch (Exception e)
{ {
_log.Warn(e.Message); _log.Warn(e.Message);
} }
@ -627,7 +656,6 @@ namespace ENI2.Excel
Range aRange = workSheet.Range[range]; Range aRange = workSheet.Range[range];
if (aRange != null) if (aRange != null)
{ {
} }
} }
catch (Exception e) catch (Exception e)
@ -690,23 +718,19 @@ namespace ENI2.Excel
string dateString = ReadCellAsText(sheetName, range); string dateString = ReadCellAsText(sheetName, range);
if (dateString != null) if (dateString != null)
{ {
CultureInfo provider = CultureInfo.InvariantCulture; string[] formats = { "yyyy/MM/dd HH:mm", "yyyy/MM/dd", "dd.MM.yyyy", "dd-MM-yyyy", "d/M/yyyy", "dd/M/yyyy", "d/MM/yyyy", "dd/MM/yyyy", "d/MMM/yyyy", "dd/MMM/yyyy", "yyyy-MM-dd", "yyyy-mm-d" };
const string dateTimeFormat = "yyyy/MM/dd HH:mm"; if (DateTime.TryParseExact(dateString, formats, NumberFormatInfo.InvariantInfo, DateTimeStyles.None, out DateTime tmpDate))
if (DateTime.TryParseExact(dateString, dateTimeFormat, provider, DateTimeStyles.None, out DateTime tmpDate)) return tmpDate;
return tmpDate.ToUniversalTime(); CultureInfo en = CultureInfo.CreateSpecificCulture("en-US");
const string dateFormat = "yyyy/MM/dd"; if (DateTime.TryParseExact(dateString, formats, en, DateTimeStyles.None, out DateTime tmpDate2))
if (DateTime.TryParseExact(dateString, dateFormat, provider, DateTimeStyles.None, out DateTime tmpDate2))
return tmpDate2; return tmpDate2;
const string dateFormat2 = "dd.MM.yyyy";
if (DateTime.TryParseExact(dateString, dateFormat2, provider, DateTimeStyles.None, out DateTime tmpDate3))
return tmpDate3;
return null; return null;
} }
else return null; else
return null;
} }
#endregion #endregion Dakosy-specific functions
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -27,7 +27,7 @@ namespace ENI2
{ {
Dictionary<int, string> result = new Dictionary<int, string>(); Dictionary<int, string> result = new Dictionary<int, string>();
string query = string.Format("SELECT key, text FROM LADG_CargoHandlingCodes WHERE langKey = '{0}'", languageCode); string query = string.Format("SELECT key, text FROM LADG_CargoHandlingCodes WHERE langKey = '{0}'", languageCode);
SQLiteCommand cmd = new SQLiteCommand(query, _con); SQLiteCommand cmd = new SQLiteCommand(query, _con);
IDataReader reader = cmd.ExecuteReader(); IDataReader reader = cmd.ExecuteReader();
int key; int key;
@ -48,19 +48,19 @@ namespace ENI2
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;
string portarea = null; string portarea = null;
if (!reader.IsDBNull(0)) code = reader.GetString(0); if (!reader.IsDBNull(0)) code = reader.GetString(0);
if (!reader.IsDBNull(1)) portarea = reader.GetString(1); if (!reader.IsDBNull(1)) portarea = reader.GetString(1);
if((code != null) && (portarea != null)) if ((code != null) && (portarea != null))
{ {
result[code] = string.Format("{0}-{1}", code, portarea); result[code] = string.Format("{0}-{1}", code, portarea);
} }
} }
reader.Close(); reader.Close();
return result; return result;
} }
public static bool PortAreaExists(string locode, string portArea) public static bool PortAreaExists(string locode, string portArea)
@ -68,7 +68,7 @@ namespace ENI2
if (locode.IsNullOrEmpty() || portArea.IsNullOrEmpty()) return false; if (locode.IsNullOrEmpty() || portArea.IsNullOrEmpty()) return false;
string query = string.Format("SELECT COUNT(*) FROM INFO_PortArea WHERE Locode = '{0}' AND Code = '{1}'", locode, portArea); string query = string.Format("SELECT COUNT(*) FROM INFO_PortArea WHERE Locode = '{0}' AND Code = '{1}'", locode, portArea);
SQLiteCommand cmd = new SQLiteCommand(query, _con); SQLiteCommand cmd = new SQLiteCommand(query, _con);
long numResults = (long) cmd.ExecuteScalar(); long numResults = (long)cmd.ExecuteScalar();
return numResults > 0; return numResults > 0;
} }
@ -85,7 +85,7 @@ namespace ENI2
string query = string.Format("SELECT Code, Name FROM Nationality ORDER BY Code"); string query = string.Format("SELECT Code, Name FROM Nationality ORDER BY Code");
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;
string name = null; string name = null;
@ -142,7 +142,7 @@ namespace ENI2
string query = string.Format("SELECT PortArea from INFO_PortArea WHERE Code = '{0}'", code); string query = string.Format("SELECT PortArea from INFO_PortArea WHERE Code = '{0}'", code);
SQLiteCommand cmd = new SQLiteCommand(query, _con); SQLiteCommand cmd = new SQLiteCommand(query, _con);
IDataReader reader = cmd.ExecuteReader(); IDataReader reader = cmd.ExecuteReader();
if(reader.Read()) if (reader.Read())
{ {
if (!reader.IsDBNull(0)) result = reader.GetString(0); if (!reader.IsDBNull(0)) result = reader.GetString(0);
} }
@ -182,7 +182,7 @@ namespace ENI2
if (!reader.IsDBNull(0)) code = reader.GetInt32(0); if (!reader.IsDBNull(0)) code = reader.GetInt32(0);
if (!reader.IsDBNull(1)) name = reader.GetString(1); if (!reader.IsDBNull(1)) name = reader.GetString(1);
if ((code != null) && (name != null)) if ((code != null) && (name != null))
result[(int) code] = string.Format("{0} {1}", code, name); result[(int)code] = string.Format("{0} {1}", code, name);
} }
reader.Close(); reader.Close();
return result; return result;
@ -235,7 +235,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)
@ -250,7 +250,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);
@ -269,5 +269,24 @@ namespace ENI2
return result; return result;
} }
public static List<KeyValuePair<string, string>> GetNST2007List()
{
List<KeyValuePair<string, string>> result = new List<KeyValuePair<string, string>>();
string query = string.Format("SELECT Description, NST2007 FROM LADG_NST2007 ORDER BY Description");
SQLiteCommand cmd = new SQLiteCommand(query, _con);
IDataReader reader = cmd.ExecuteReader();
while (reader.Read())
{
if (reader.IsDBNull(0)) continue;
string desc = reader.GetString(0);
string code = reader.GetString(1);
KeyValuePair<string, string> kvp = new KeyValuePair<string, string>(desc, code);
result.Add(kvp);
}
reader.Close();
return result;
}
} }
} }

View File

@ -83,7 +83,7 @@ namespace ENI2
{ {
if (!openTabs.ContainsKey(aMessageCore.Id.Value)) if (!openTabs.ContainsKey(aMessageCore.Id.Value))
{ {
ClosableTabItem searchResultItem = new ClosableTabItem(); ClosableTabItem searchResultItem = new ClosableTabItem();
// try to lock the item // try to lock the item
Guid lockedUserId = Guid.Empty; Guid lockedUserId = Guid.Empty;
@ -185,7 +185,7 @@ namespace ENI2
} }
mBuilder.AppendLine(); mBuilder.AppendLine();
mBuilder.Append(Properties.Resources.textConfirmUnsentMessages); mBuilder.Append(Properties.Resources.textConfirmUnsentMessages);
if (MessageBox.Show(mBuilder.ToString(), Properties.Resources.textConfirmation, MessageBoxButton.YesNo, if (MessageBox.Show(mBuilder.ToString(), Properties.Resources.textConfirmation, MessageBoxButton.YesNo,
MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.No) MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.No)
e.Cancel = true; e.Cancel = true;
} }
@ -202,11 +202,23 @@ namespace ENI2
} }
mBuilder.AppendLine(); mBuilder.AppendLine();
mBuilder.Append(Properties.Resources.textConfirmUnconfirmedMessages); mBuilder.Append(Properties.Resources.textConfirmUnconfirmedMessages);
if (MessageBox.Show(mBuilder.ToString(), Properties.Resources.textConfirmation, MessageBoxButton.YesNo, if (MessageBox.Show(mBuilder.ToString(), Properties.Resources.textConfirmation, MessageBoxButton.YesNo,
MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.No) MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.No)
e.Cancel = true; e.Cancel = true;
} }
// Dez.22: Special case for BRE/BRV: Warning if some messages are not "confirmed"
if(drc.Core.PoC.Equals("DEBRE")||drc.Core.PoC.Equals("DEBRV"))
{
if(drc.HasCriticalInfoMissing(out string missingClass))
{
_log.WarnFormat("set close warning because at least {0} is missing from BRE/BRV arrival", missingClass);
if (MessageBox.Show(string.Format(Properties.Resources.textSpecialCaseBREBRV, missingClass), Properties.Resources.textConfirmation, MessageBoxButton.YesNo,
MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.No)
e.Cancel = true;
}
}
if (!e.Cancel) if (!e.Cancel)
{ {
if (lockedCores.ContainsKey(tabItem)) if (lockedCores.ContainsKey(tabItem))
@ -265,7 +277,7 @@ namespace ENI2
Dictionary<Guid, ReportingParty> repPartyDict = DBManager.Instance.GetReportingPartyDict(); Dictionary<Guid, ReportingParty> repPartyDict = DBManager.Instance.GetReportingPartyDict();
this.rpControl.ReportingParties = new ObservableCollection<ReportingParty>(repPartyDict.Values); this.rpControl.ReportingParties = new ObservableCollection<ReportingParty>(repPartyDict.Values);
} }
this.rootContainer.Children.Add(this.rpControl); this.rootContainer.Children.Add(this.rpControl);
} }
else if(sender == this.buttonPOListe) else if(sender == this.buttonPOListe)
{ {

View File

@ -2040,6 +2040,15 @@ namespace ENI2.Properties {
} }
} }
/// <summary>
/// Looks up a localized string similar to Editor.
/// </summary>
public static string textEditor {
get {
return ResourceManager.GetString("textEditor", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Edit rules. /// Looks up a localized string similar to Edit rules.
/// </summary> /// </summary>
@ -4236,6 +4245,15 @@ namespace ENI2.Properties {
} }
} }
/// <summary>
/// Looks up a localized string similar to Search NST2007 list.
/// </summary>
public static string textSearchNST {
get {
return ResourceManager.GetString("textSearchNST", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to SEC - Security. /// Looks up a localized string similar to SEC - Security.
/// </summary> /// </summary>
@ -4533,6 +4551,15 @@ namespace ENI2.Properties {
} }
} }
/// <summary>
/// Looks up a localized string similar to At least one of NOA_NOD, AGNT, INFO, SEC, TIEFA hasn&apos;t been sent for DEBRE/DEBRV: ({0}) Close anyway?.
/// </summary>
public static string textSpecialCaseBREBRV {
get {
return ResourceManager.GetString("textSpecialCaseBREBRV", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Special requirements. /// Looks up a localized string similar to Special requirements.
/// </summary> /// </summary>

View File

@ -1852,4 +1852,13 @@
<data name="textNewDGItem" xml:space="preserve"> <data name="textNewDGItem" xml:space="preserve">
<value>New dangerous goods item</value> <value>New dangerous goods item</value>
</data> </data>
<data name="textEditor" xml:space="preserve">
<value>Editor</value>
</data>
<data name="textSearchNST" xml:space="preserve">
<value>Search NST2007 list</value>
</data>
<data name="textSpecialCaseBREBRV" xml:space="preserve">
<value>At least one of NOA_NOD, AGNT, INFO, SEC, TIEFA hasn't been sent for DEBRE/DEBRV: ({0}) Close anyway?</value>
</data>
</root> </root>

View File

@ -24,7 +24,7 @@ namespace bsmd.database
#region Properties #region Properties
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] // [Validation(ValidationCode.NOT_NULL)] // damit sieht die Validierung "sauberer" aus (v7.7, Dez. 2022)
[LookupName("ATA.ATAPortOfCall")] [LookupName("ATA.ATAPortOfCall")]
[ENI2Validation] [ENI2Validation]
public DateTime? ATAPortOfCall { get; set; } public DateTime? ATAPortOfCall { get; set; }

View File

@ -24,7 +24,7 @@ namespace bsmd.database
#region Properties #region Properties
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] // [Validation(ValidationCode.NOT_NULL)] // damit sieht die Validierung "sauberer" aus (v7.7, Dez. 2022)
[LookupName("ATD.ATDPortOfCall")] [LookupName("ATD.ATDPortOfCall")]
[ENI2Validation] [ENI2Validation]
public DateTime? ATDPortOfCall { get; set; } public DateTime? ATDPortOfCall { get; set; }

View File

@ -256,34 +256,26 @@ namespace bsmd.database
public override void Validate(List<MessageError> errors, List<MessageViolation> violations) public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
{ {
if (this.GetValidationBlock() == ValidationBlock.BLOCK1) if (this.GetValidationBlock() == ValidationBlock.BLOCK1) // VISIT
{ {
if(this.ETDFromPortOfCall.HasValue && this.ETAToPortOfCall.HasValue && if(this.ETDFromPortOfCall.HasValue && this.ETAToPortOfCall.HasValue && (this.ETDFromPortOfCall < this.ETAToPortOfCall))
(this.ETDFromPortOfCall < this.ETAToPortOfCall))
errors.Add(RuleEngine.CreateError(ValidationCode.E121, "ETDFromPortOfCall implausible", this.ETDFromPortOfCall?.ToLocalTime().ToString(), this.Title, null, this.Tablename)); errors.Add(RuleEngine.CreateError(ValidationCode.E121, "ETDFromPortOfCall implausible", this.ETDFromPortOfCall?.ToLocalTime().ToString(), this.Title, null, this.Tablename));
// 8.11.20 Validierung gegen ETA /ETD in der Vergangenheit // 8.11.20 Validierung gegen ETA /ETD in der Vergangenheit
if((this.ETAToPortOfCall < DateTime.Now) || (this.ETAToPortOfCall.HasValue && this.ETAToPortOfCall.Value.ToLocalTime().IsTimeEmpty())) if((this.ETAToPortOfCall < DateTime.Now) || (this.ETAToPortOfCall.HasValue && this.ETAToPortOfCall.Value.ToLocalTime().IsTimeEmpty()))
{ {
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETAToPortOfCall: might be implausible", this.ETAToPortOfCall.Value.ToLocalTime().ToString(), this.Title, null, this.Tablename)); violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETAToPortOfCall: might be implausible", this.ETAToPortOfCall.Value.ToLocalTime().ToString(), this.Title, null, this.Tablename));
}
// NSW 7.1 ETDFromLastPort Pflichtfeld, wenn LastPort != ZZUKN
if(!this.LastPort.IsNullOrEmpty() && !this.LastPort.Equals("ZZUKN") && !this.ETDFromLastPort.HasValue)
{
errors.Add(RuleEngine.CreateError(ValidationCode.E125, "ETDFromLastPort must be provided for a given last port", "", this.Title, null, this.Tablename));
} }
if((this.ETDFromLastPort < DateTime.Now.AddDays(-14)) || (this.ETDFromLastPort.HasValue && this.ETDFromLastPort.Value.ToLocalTime().IsTimeEmpty()))
{
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETDFromLastPort: might be implausible", this.ETDFromLastPort.Value.ToLocalTime().ToString(), this.Title, null, this.Tablename));
}
if ((this.ETDFromPortOfCall < DateTime.Now.AddDays(-14)) || (this.ETDFromPortOfCall > DateTime.Now.AddDays(14)) || (this.ETDFromPortOfCall.HasValue && this.ETDFromPortOfCall.Value.ToLocalTime().IsTimeEmpty())) if ((this.ETDFromPortOfCall < DateTime.Now.AddDays(-14)) || (this.ETDFromPortOfCall > DateTime.Now.AddDays(14)) || (this.ETDFromPortOfCall.HasValue && this.ETDFromPortOfCall.Value.ToLocalTime().IsTimeEmpty()))
{ {
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETDFromPortOfCall: might be implausible", this.ETDFromPortOfCall.Value.ToLocalTime().ToString(), this.Title, null, this.Tablename)); violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETDFromPortOfCall: might be implausible", this.ETDFromPortOfCall.Value.ToLocalTime().ToString(), this.Title, null, this.Tablename));
} }
if ((this.ETAToNextPort < DateTime.Now) || (this.ETAToNextPort > DateTime.Now.AddDays(14)) || (this.ETAToNextPort.HasValue && this.ETAToNextPort.Value.ToLocalTime().IsTimeEmpty()))
{ if (this.ETDFromPortOfCall.HasValue && this.ETAToNextPort.HasValue && (this.NextPort?.Equals("ZZUKN") == false) && (this.ETAToNextPort <= ETDFromPortOfCall))
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETAToNextPort: might be implausible", this.ETAToNextPort.Value.ToLocalTime().ToString(), this.Title, null, this.Tablename)); errors.Add(RuleEngine.CreateError(ValidationCode.E122, "ETAToNextPort", null, this.Title, null, this.Tablename));
}
if (this.ETDFromLastPort.HasValue && this.ETAToPortOfCall.HasValue && (this.ETDFromLastPort >= this.ETAToPortOfCall))
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "ETDFromLastPort", null, this.Title, null, this.Tablename));
if (this.CallPurposes.IsNullOrEmpty()) if (this.CallPurposes.IsNullOrEmpty())
{ {
@ -300,34 +292,47 @@ namespace bsmd.database
} }
} }
} }
else else // TRANSIT
{ {
if (this.ETDFromKielCanal.HasValue && this.ETAToKielCanal.HasValue && (this.ETDFromKielCanal < this.ETAToKielCanal)) if (this.ETDFromKielCanal.HasValue && this.ETAToKielCanal.HasValue && (this.ETDFromKielCanal < this.ETAToKielCanal))
errors.Add(RuleEngine.CreateError(ValidationCode.E121, "ETDFromKielCanal implausible", this.ETDFromKielCanal.Value.ToLocalTime().ToString(), this.Title, null, this.Tablename)); errors.Add(RuleEngine.CreateError(ValidationCode.E121, "ETDFromKielCanal implausible", this.ETDFromKielCanal.Value.ToLocalTime().ToString(), this.Title, null, this.Tablename));
if(this.ETDFromKielCanal.HasValue && this.ETDFromKielCanal.Value.ToLocalTime().IsTimeEmpty()) if ((this.ETAToKielCanal < DateTime.Now) || (this.ETAToKielCanal.HasValue && this.ETAToKielCanal.Value.ToLocalTime().IsTimeEmpty()))
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETAToKielCanal: might be implausible", this.ETAToKielCanal.Value.ToLocalTime().ToString(), this.Title, null, this.Tablename));
if ((this.ETDFromKielCanal < DateTime.Now.AddDays(-14)) || (this.ETDFromKielCanal > DateTime.Now.AddDays(14)) || (this.ETDFromKielCanal.HasValue && this.ETDFromKielCanal.Value.ToLocalTime().IsTimeEmpty()))
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETDFromKielCanal: might be implausible", this.ETDFromKielCanal.Value.ToLocalTime().ToString(), this.Title, null, this.Tablename)); violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETDFromKielCanal: might be implausible", this.ETDFromKielCanal.Value.ToLocalTime().ToString(), this.Title, null, this.Tablename));
if(this.ETAToKielCanal.HasValue && this.ETAToKielCanal.Value.ToLocalTime().IsTimeEmpty()) if (this.ETDFromKielCanal.HasValue && this.ETAToNextPort.HasValue && (this.NextPort?.Equals("ZZUKN") == false) && (this.ETAToNextPort <= ETDFromKielCanal))
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETAToKielCanal: might be implausible", this.ETAToKielCanal.Value.ToLocalTime().ToString(), this.Title, null, this.Tablename)); errors.Add(RuleEngine.CreateError(ValidationCode.E122, "ETAToNextPort", null, this.Title, null, this.Tablename));
if (this.ETDFromLastPort.HasValue && this.ETAToKielCanal.HasValue && (this.ETDFromLastPort >= this.ETAToKielCanal))
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "ETDFromLastPort", null, this.Title, null, this.Tablename));
} }
if((this.LastPort?.Equals("ZZUKN") == true) && this.ETDFromLastPort.HasValue) // NSW 7.1 ETDFromLastPort Pflichtfeld, wenn LastPort != ZZUKN
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE_ZZUKN, "ETDFromLastPort cannot be set if ZZUKN", null, this.Title, null, this.Tablename)); if (!this.LastPort.IsNullOrEmpty() && !this.LastPort.Equals("ZZUKN") && !this.ETDFromLastPort.HasValue)
{
errors.Add(RuleEngine.CreateError(ValidationCode.E125, "ETDFromLastPort must be provided for a given last port", "", this.Title, null, this.Tablename));
}
if ((this.ETDFromLastPort < DateTime.Now.AddDays(-14)) || (this.ETDFromLastPort.HasValue && this.ETDFromLastPort.Value.ToLocalTime().IsTimeEmpty()))
{
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETDFromLastPort: might be implausible", this.ETDFromLastPort.Value.ToLocalTime().ToString(), this.Title, null, this.Tablename));
}
if ((this.ETAToNextPort < DateTime.Now) || (this.ETAToNextPort > DateTime.Now.AddDays(14)) || (this.ETAToNextPort.HasValue && this.ETAToNextPort.Value.ToLocalTime().IsTimeEmpty()))
{
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETAToNextPort: might be implausible", this.ETAToNextPort.Value.ToLocalTime().ToString(), this.Title, null, this.Tablename));
}
if (this.ETDFromPortOfCall.HasValue && this.ETAToNextPort.HasValue && (this.NextPort?.Equals("ZZUKN") == false) && if ((this.LastPort?.Equals("ZZUKN") == true) && this.ETDFromLastPort.HasValue)
(this.ETAToNextPort <= ETDFromPortOfCall)) errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE_ZZUKN, "ETDFromLastPort cannot be set if ZZUKN", null, this.Title, null, this.Tablename));
errors.Add(RuleEngine.CreateError(ValidationCode.E122, "ETAToNextPort", null, this.Title, null, this.Tablename));
if ((this.NextPort?.Equals("ZZUKN") == false) && !this.ETAToNextPort.HasValue) if ((this.NextPort?.Equals("ZZUKN") == false) && !this.ETAToNextPort.HasValue)
errors.Add(RuleEngine.CreateError(ValidationCode.NOT_NULL, "ETAToNextPort missing", null, this.Title, null, this.Tablename)); errors.Add(RuleEngine.CreateError(ValidationCode.NOT_NULL, "ETAToNextPort missing", null, this.Title, null, this.Tablename));
if((this.NextPort?.Equals("ZZUKN") == true) && this.ETAToNextPort.HasValue) if((this.NextPort?.Equals("ZZUKN") == true) && this.ETAToNextPort.HasValue)
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE_ZZUKN, "ETAToNextPort cannot be set if ZZUKN", null, this.Title, null, this.Tablename)); errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE_ZZUKN, "ETAToNextPort cannot be set if ZZUKN", null, this.Title, null, this.Tablename));
if (this.ETDFromLastPort.HasValue && this.ETAToPortOfCall.HasValue && (this.ETDFromLastPort >= this.ETAToPortOfCall))
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "ETDFromLastPort", null, this.Title, null, this.Tablename));
} }
public override DatabaseEntity.ValidationBlock GetValidationBlock() public override DatabaseEntity.ValidationBlock GetValidationBlock()

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.6.0")] [assembly: AssemblyInformationalVersion("7.7.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.6.0.*")] [assembly: AssemblyVersion("7.7.0.*")]

View File

@ -42,7 +42,11 @@ namespace bsmd.database
/// <summary> /// <summary>
/// System-User (Testing, Tool) /// System-User (Testing, Tool)
/// </summary> /// </summary>
SYSTEM = 4 SYSTEM = 4,
/// <summary>
/// kann bestimmte Dinge (e.g. templates) im ENI bearbeiten
/// </summary>
EDITOR = 8
}; };
#endregion #endregion
@ -156,6 +160,12 @@ namespace bsmd.database
set { this.SetUserFlag(value, UserFlags.ADMIN); } set { this.SetUserFlag(value, UserFlags.ADMIN); }
} }
public bool IsEditor
{
get { return (this.Flags & (int)UserFlags.EDITOR) != 0; }
set { this.SetUserFlag(value, UserFlags.EDITOR); }
}
#endregion #endregion
#endregion #endregion

3011
misc/LADG_NST2007.csv Normal file

File diff suppressed because it is too large Load Diff

17
misc/bsmd-emswe_eu.csr Normal file
View File

@ -0,0 +1,17 @@
-----BEGIN CERTIFICATE REQUEST-----
MIICsDCCAZgCAQAwazELMAkGA1UEBhMCREUxDzANBgNVBAgMBkJyZW1lbjEPMA0G
A1UEBwwGQnJlbWVuMSIwIAYDVQQKDBlCcmVtZXIgU2NoaWZmc21lbGRlZGllbnN0
MRYwFAYDVQQDDA1ic21kLWVtc3dlLmV1MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
MIIBCgKCAQEApvboTA8dRaz1hBcv3y6v+CBIdE3jUPNqOsZAjGuD9+gpCFv9F/ve
r+kQGvfRCPTPTPk7FM4hC2TKGk6PwmshkWdru4c4S7mYJW3KGe7t0wIgv/g1FkUV
eR5sXl4zvHnBXuV+ciuqb8RVW7izuNHVVUFAVhUlGROBb2ERqW5Cq7JCUM68H6l6
ZAW0yltrO0BSEV6UTxja3f9K4Sz1AcvXXxFeJGUoUZ9J83n3kS5vGyyjeqA3mz7j
NrkYxvXgRJHw4qBxnNtj0Yk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8pn
mj1rVqoyAgB/jQT5Q/fXIfDM0IwaZcWWc4lu70nzbpqgXzPXrC0IdkuRtfMoDI88
6u/DhTWwmA==
-----END CERTIFICATE-----

Binary file not shown.

View File

@ -1,12 +1,9 @@
1) copyprod.cmd ausführen (damit app.config richtig überschrieben wird) 1) copyprod.cmd ausführen (damit app.config richtig überschrieben wird)
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 10.5.23 abläuft. Das Test Zertifikat läuft am 12.11.22 ab. Schiffsmelder CA auswählen, das am 02/24 abläuft.
Auswahl über "Select from Store.." Auswahl über "Select from Store.."
5) Release build einstellen 5) Release Build einstellen
6) komplett neu bauen (clean!) 6) komplett neu bauen (clean!)
7) In Publish -> Options -> Description bei Product name "ENI" statt "ENI Testversion" 7) In Description bei Product name "ENI" statt "ENI Testversion"
8) Publish now
9) Upload
10) last/next Version.txt pflegen

View File

@ -0,0 +1,27 @@
-----BEGIN CERTIFICATE-----
MIIEqjCCA5KgAwIBAgIQAnmsRYvBskWr+YBTzSybsTANBgkqhkiG9w0BAQsFADBh
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBD
QTAeFw0xNzExMjcxMjQ2MTBaFw0yNzExMjcxMjQ2MTBaMG4xCzAJBgNVBAYTAlVT
MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j
b20xLTArBgNVBAMTJEVuY3J5cHRpb24gRXZlcnl3aGVyZSBEViBUTFMgQ0EgLSBH
MTCCASIwDQYJKoZIh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