Version 3.8.0: Restliche Korrekturen / DB für neue Testrunde
This commit is contained in:
parent
7260368a16
commit
e6c38968d1
@ -58,6 +58,7 @@ namespace ENI2.Controls
|
||||
public event Action<DatabaseEntity> EditRequested;
|
||||
public event Action<DatabaseEntity> DeleteRequested;
|
||||
public event Action CreateRequested;
|
||||
public event Action RefreshGrid;
|
||||
|
||||
public event Action<DatabaseEntity> PrintRequested;
|
||||
public event Action<DatabaseEntity> ExportRequested;
|
||||
@ -179,10 +180,13 @@ namespace ENI2.Controls
|
||||
{
|
||||
this.DeleteRequested?.Invoke(deleteItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.RefreshGrid?.Invoke();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void editItem(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
@ -21,8 +21,8 @@ namespace ENI2.Controls
|
||||
{
|
||||
private List<string> _locodeList = new List<string>();
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
private bool _comboSelect;
|
||||
|
||||
private bool _comboSelect;
|
||||
|
||||
public LocodeControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
@ -43,8 +43,44 @@ namespace ENI2.Controls
|
||||
{
|
||||
get { return this._locodeList; }
|
||||
set { this._locodeList = value; }
|
||||
}
|
||||
|
||||
public string SelectedItem
|
||||
{
|
||||
get { return this.comboBoxLocode.SelectedItem as string; }
|
||||
set {
|
||||
this._locodeList.Clear();
|
||||
|
||||
string portName = this.UseSSNCodes ? LocalizedLookup.SSNPortNameFromLocode(value) : LocodeDB.PortNameFromLocode(value);
|
||||
LocodeState locodeState = portName.IsNullOrEmpty() ? LocodeState.INVALID : LocodeState.OK;
|
||||
this.SetLocodeStateImage(this.imageLocodeState, locodeState);
|
||||
|
||||
if (locodeState == LocodeState.OK)
|
||||
{
|
||||
string valString = string.Format("{0} - {1}", value, portName);
|
||||
this._locodeList.Add(valString);
|
||||
this.comboBoxLocode.ItemsSource = this.LocodeList;
|
||||
this.comboBoxLocode.SelectedItem = valString;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Actual value for DataBinding
|
||||
/// </summary>
|
||||
public string LocodeValue
|
||||
{
|
||||
get { return (string)GetValue(LocodeValueProperty); }
|
||||
set { SetValue(LocodeValueProperty, value); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Use alternate Locode Source (for NOA_NOD NextPort if unspecif. (888))
|
||||
/// </summary>
|
||||
public bool UseSSNCodes { get; set; }
|
||||
|
||||
#region static methods
|
||||
|
||||
public static readonly DependencyProperty LocodeValueProperty = DependencyProperty.Register("LocodeValue", typeof(string), typeof(LocodeControl),
|
||||
new UIPropertyMetadata(LocodeValueChangedHandler));
|
||||
|
||||
@ -58,37 +94,7 @@ namespace ENI2.Controls
|
||||
((LocodeControl)sender).SelectedItem = e.NewValue.ToString();//.Substring(0,5);
|
||||
}
|
||||
|
||||
|
||||
public string SelectedItem
|
||||
{
|
||||
get { return this.comboBoxLocode.SelectedItem as string; }
|
||||
set {
|
||||
this._locodeList.Clear();
|
||||
|
||||
string portName = LocodeDB.PortNameFromLocode(value);
|
||||
LocodeState locodeState = portName.IsNullOrEmpty() ? LocodeState.INVALID : LocodeState.OK;
|
||||
this.SetLocodeStateImage(this.imageLocodeState, locodeState);
|
||||
|
||||
if (locodeState == LocodeState.OK)
|
||||
{
|
||||
string valString = string.Format("{0} - {1}", value, portName);
|
||||
this._locodeList.Add(valString);
|
||||
this.comboBoxLocode.ItemsSource = this.LocodeList;
|
||||
this.comboBoxLocode.SelectedItem = valString;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Actual value for DataBinding
|
||||
/// </summary>
|
||||
public string LocodeValue
|
||||
{
|
||||
get { return (string)GetValue(LocodeValueProperty); }
|
||||
set { SetValue(LocodeValueProperty, value); }
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region event handler
|
||||
|
||||
@ -116,7 +122,7 @@ namespace ENI2.Controls
|
||||
if (this.comboBoxLocode.Text.Length == 5)
|
||||
{
|
||||
string directLocode = this.comboBoxLocode.Text.Trim().ToUpper();
|
||||
string portname = LocodeDB.PortNameFromLocode(directLocode);
|
||||
string portname = this.UseSSNCodes ? LocalizedLookup.SSNPortNameFromLocode(directLocode) : LocodeDB.PortNameFromLocode(directLocode);
|
||||
bool isLocode = !portname.IsNullOrEmpty();
|
||||
if (isLocode)
|
||||
{
|
||||
@ -131,7 +137,8 @@ namespace ENI2.Controls
|
||||
if (!locodeFound)
|
||||
{
|
||||
// assume this is a harbour name typed out..
|
||||
List<LocodeDB.LocodeEntry> locodeEntries = LocodeDB.AllLocodesForCityNameAsEntries("%" + this.comboBoxLocode.Text + "%");
|
||||
string lookupString = string.Format("%{0}%", this.comboBoxLocode.Text.Trim());
|
||||
List<LocodeDB.LocodeEntry> locodeEntries = this.UseSSNCodes ? LocalizedLookup.SSNAllLocodesForCityNameAsEntries(lookupString) : LocodeDB.AllLocodesForCityNameAsEntries(lookupString);
|
||||
locodeEntries.Sort();
|
||||
|
||||
foreach (LocodeDB.LocodeEntry entry in locodeEntries)
|
||||
|
||||
@ -98,6 +98,7 @@ namespace ENI2.DetailViewControls
|
||||
this.dataGridCrewList.EditRequested += DataGridCrewList_EditRequested;
|
||||
this.dataGridCrewList.DeleteRequested += DataGridCrewList_DeleteRequested;
|
||||
this.dataGridCrewList.CreateRequested += DataGridCrewList_CreateRequested;
|
||||
this.dataGridCrewList.RefreshGrid += DataGridCrewList_RefreshGrid;
|
||||
|
||||
#endregion
|
||||
|
||||
@ -115,10 +116,11 @@ namespace ENI2.DetailViewControls
|
||||
this.dataGridPassengerList.EditRequested += DataGridPassengerList_EditRequested;
|
||||
this.dataGridPassengerList.DeleteRequested += DataGridPassengerList_DeleteRequested;
|
||||
this.dataGridPassengerList.CreateRequested += DataGridPassengerList_CreateRequested;
|
||||
this.dataGridPassengerList.RefreshGrid += DataGridPassengerList_RefreshGrid;
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#region port of itinerary grid
|
||||
|
||||
@ -234,13 +236,17 @@ namespace ENI2.DetailViewControls
|
||||
{
|
||||
// are you sure dialog is in base class
|
||||
_pasMessage.Elements.Remove(pas);
|
||||
DBManager.Instance.Delete(pas);
|
||||
DatabaseEntity.ResetIdentifiers(_pasMessage.Elements);
|
||||
this.SublistElementChanged(Message.NotificationClass.PAS);
|
||||
this.dataGridPassengerList.Items.Refresh();
|
||||
DBManager.Instance.Delete(pas);
|
||||
}
|
||||
}
|
||||
|
||||
private void DataGridPassengerList_RefreshGrid()
|
||||
{
|
||||
DatabaseEntity.ResetIdentifiers(_pasMessage.Elements);
|
||||
this.SublistElementChanged(Message.NotificationClass.PAS);
|
||||
this.dataGridPassengerList.Items.Refresh();
|
||||
}
|
||||
|
||||
private void DataGridPassengerList_EditRequested(DatabaseEntity obj)
|
||||
{
|
||||
EditPASDialog epd = new EditPASDialog();
|
||||
@ -311,13 +317,17 @@ namespace ENI2.DetailViewControls
|
||||
{
|
||||
// are you sure dialog is in base class
|
||||
_crewMessage.Elements.Remove(crew);
|
||||
DBManager.Instance.Delete(crew);
|
||||
DatabaseEntity.ResetIdentifiers(_crewMessage.Elements);
|
||||
this.SublistElementChanged(Message.NotificationClass.CREW);
|
||||
this.dataGridCrewList.Items.Refresh();
|
||||
DBManager.Instance.Delete(crew);
|
||||
}
|
||||
}
|
||||
|
||||
private void DataGridCrewList_RefreshGrid()
|
||||
{
|
||||
DatabaseEntity.ResetIdentifiers(_crewMessage.Elements);
|
||||
this.SublistElementChanged(Message.NotificationClass.CREW);
|
||||
this.dataGridCrewList.Items.Refresh();
|
||||
}
|
||||
|
||||
private void DataGridCrewList_EditRequested(DatabaseEntity obj)
|
||||
{
|
||||
EditCREWDialog ecd = new EditCREWDialog();
|
||||
|
||||
@ -213,7 +213,7 @@
|
||||
<DataTemplate>
|
||||
<Image x:Name="imageSendSuccess"/>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding Path=SuccessfullySent}" Value="True">
|
||||
<DataTrigger Binding="{Binding Path=SendSuccess}" Value="True">
|
||||
<Setter Property="Source" Value="/Resources/bullet_ball_green.png" TargetName="imageSendSuccess"/>
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
|
||||
@ -530,6 +530,11 @@ namespace ENI2.DetailViewControls
|
||||
|
||||
this.Dispatcher.BeginInvoke(new Action(() =>
|
||||
{
|
||||
MessageCore reloadedCore = DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).GetMessageCoreById(this.Core.Id.Value);
|
||||
CoreStatusInfoDialog csid = new CoreStatusInfoDialog();
|
||||
csid.IsModal = false;
|
||||
csid.Core = reloadedCore;
|
||||
csid.Show();
|
||||
this.busyIndicator.IsBusy = false;
|
||||
this.OnRequestReload();
|
||||
}));
|
||||
@ -558,6 +563,12 @@ namespace ENI2.DetailViewControls
|
||||
spvd.IsModal = false;
|
||||
spvd.DisplayObject = this.Core;
|
||||
spvd.Show();
|
||||
|
||||
//CoreStatusInfoDialog csid = new CoreStatusInfoDialog();
|
||||
//csid.IsModal = false;
|
||||
//csid.Core = this.Core;
|
||||
//csid.Show();
|
||||
|
||||
}
|
||||
|
||||
private void buttonErrors_Click(object sender, RoutedEventArgs e)
|
||||
|
||||
@ -48,7 +48,7 @@
|
||||
<xctk:DateTimePicker Grid.Column="3" Grid.Row="1" Value="{Binding ETDFromKielCanal, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePicker_ETDFromKielCanal" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="False" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left"/>
|
||||
<enictrl:LocodeControl Grid.Column="1" Grid.Row="2" Width="Auto" x:Name="locodeControl_LastPort" LocodeValue="{Binding LastPort, Mode=TwoWay}"/>
|
||||
<xctk:DateTimePicker Grid.Column="3" Grid.Row="2" Value="{Binding ETDFromLastPort, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePicker_ETDFromLastPort" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="False" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left"/>
|
||||
<enictrl:LocodeControl Grid.Column="1" Grid.Row="3" Width="Auto" x:Name="locodeControl_NextPort" LocodeValue="{Binding NextPort, Mode=TwoWay}"/>
|
||||
<enictrl:LocodeControl Grid.Column="1" Grid.Row="3" Width="Auto" x:Name="locodeControl_NextPort" LocodeValue="{Binding NextPort, Mode=TwoWay}" UseSSNCodes="True"/>
|
||||
<xctk:DateTimePicker Grid.Column="3" Grid.Row="3" Value="{Binding ETAToNextPort, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePicker_ETAToNextPort" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="False" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left"/>
|
||||
|
||||
|
||||
|
||||
@ -35,8 +35,8 @@
|
||||
<MinimumRequiredVersion>3.5.1.0</MinimumRequiredVersion>
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>publish.html</WebPage>
|
||||
<ApplicationRevision>3</ApplicationRevision>
|
||||
<ApplicationVersion>3.7.5.%2a</ApplicationVersion>
|
||||
<ApplicationRevision>1</ApplicationRevision>
|
||||
<ApplicationVersion>3.8.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
@ -228,6 +228,9 @@
|
||||
<Compile Include="DetailViewControls\WasteDetailControl.xaml.cs">
|
||||
<DependentUpon>WasteDetailControl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EditControls\CoreStatusInfoDialog.xaml.cs">
|
||||
<DependentUpon>CoreStatusInfoDialog.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EditControls\EditBKRDialog.xaml.cs">
|
||||
<DependentUpon>EditBKRDialog.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@ -421,6 +424,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="EditControls\CoreStatusInfoDialog.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="EditControls\EditBKRDialog.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
||||
41
ENI-2/ENI2/ENI2/EditControls/CoreStatusInfoDialog.xaml
Normal file
41
ENI-2/ENI2/ENI2/EditControls/CoreStatusInfoDialog.xaml
Normal file
@ -0,0 +1,41 @@
|
||||
<enictrl:EditWindowBase x:Class="ENI2.EditControls.CoreStatusInfoDialog"
|
||||
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:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
xmlns:p="clr-namespace:ENI2.Properties"
|
||||
mc:Ignorable="d"
|
||||
Title="{x:Static p:Resources.textCoreStatus}" Height="280" Width="600" WindowStyle="SingleBorderWindow" Background="AliceBlue" >
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.3*"/>
|
||||
<ColumnDefinition Width="0.7*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textCancelled}" />
|
||||
<CheckBox Name="checkBoxCancelled" Grid.Row="0" Grid.Column="1" VerticalContentAlignment="Center" Margin="2" />
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textCancellable}" />
|
||||
<CheckBox Name="checkBoxCancellable" Grid.Row="1" Grid.Column="1" VerticalContentAlignment="Center" Margin="2" />
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textBlockedClasses}" />
|
||||
<TextBlock Name="textBlockBlocked" Grid.Row="2" Grid.Column="1" FontWeight="DemiBold" VerticalAlignment="Center"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textOwnClasses}" />
|
||||
<TextBlock Name="textBlockOwn" Grid.Row="3" Grid.Column="1" FontWeight="DemiBold" VerticalAlignment="Center" />
|
||||
<Label Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textFreeClasses}" />
|
||||
<TextBlock Name="textBlockFree" Grid.Row="4" Grid.Column="1" FontWeight="DemiBold" VerticalAlignment="Center" />
|
||||
<Label Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textErrorCode}" />
|
||||
<TextBlock Name="textBlockErrorCode" Grid.Row="5" Grid.Column="1" FontWeight="DemiBold" VerticalAlignment="Center" />
|
||||
<Label Grid.Row="6" Grid.Column="0" Content="{x:Static p:Resources.textErrorMessage}" />
|
||||
<TextBlock Name="textBlockErrorMessage" Grid.Row="6" Grid.Column="1" FontWeight="DemiBold" VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
</enictrl:EditWindowBase>
|
||||
40
ENI-2/ENI2/ENI2/EditControls/CoreStatusInfoDialog.xaml.cs
Normal file
40
ENI-2/ENI2/ENI2/EditControls/CoreStatusInfoDialog.xaml.cs
Normal file
@ -0,0 +1,40 @@
|
||||
// Copyright (c) 2017 schick Informatik
|
||||
// Description: Simple status info dialog
|
||||
//
|
||||
|
||||
using System.Windows;
|
||||
|
||||
using bsmd.database;
|
||||
using ENI2.Controls;
|
||||
|
||||
namespace ENI2.EditControls
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for CoreStatusInfoDialog.xaml
|
||||
/// </summary>
|
||||
public partial class CoreStatusInfoDialog : EditWindowBase
|
||||
{
|
||||
|
||||
public MessageCore Core { get; set; }
|
||||
|
||||
public CoreStatusInfoDialog()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.Loaded += CoreStatusInfoDialog_Loaded;
|
||||
}
|
||||
|
||||
private void CoreStatusInfoDialog_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (this.Core == null) return;
|
||||
this.checkBoxCancelled.IsChecked = this.Core.Cancelled;
|
||||
this.checkBoxCancellable.IsChecked = this.Core.VisitIdOrTransitIdCancellable;
|
||||
|
||||
this.textBlockBlocked.Text = this.Core.BlockedNotificationClasses;
|
||||
this.textBlockOwn.Text = this.Core.OwnNotificationClasses;
|
||||
this.textBlockFree.Text = this.Core.FreeNotificationClasses;
|
||||
this.textBlockErrorCode.Text = this.Core.StatusCheckErrorCode;
|
||||
this.textBlockErrorMessage.Text = this.Core.StatusCheckErrorMessage;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -6,6 +6,9 @@ using System.Data;
|
||||
using System.Data.SQLite;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using bsmd.database;
|
||||
using bsmd.ExcelReadService;
|
||||
|
||||
namespace ENI2
|
||||
{
|
||||
static class LocalizedLookup
|
||||
@ -201,8 +204,49 @@ namespace ENI2
|
||||
}
|
||||
}
|
||||
reader.Close();
|
||||
return result;
|
||||
}
|
||||
|
||||
public static string SSNPortNameFromLocode(string locode)
|
||||
{
|
||||
if (locode.IsNullOrEmpty()) return null;
|
||||
if (locode.Length != 5) return null;
|
||||
|
||||
string result = null;
|
||||
string query = string.Format("SELECT LocationName FROM SSN_LOCODES WHERE LocationCode = '{0}'", locode);
|
||||
|
||||
SQLiteCommand cmd = new SQLiteCommand(query, _con);
|
||||
IDataReader reader = cmd.ExecuteReader();
|
||||
while (reader.Read())
|
||||
{
|
||||
if (!reader.IsDBNull(0))
|
||||
result = reader.GetString(0);
|
||||
break;
|
||||
}
|
||||
reader.Close();
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
public static List<LocodeDB.LocodeEntry> SSNAllLocodesForCityNameAsEntries(string city)
|
||||
{
|
||||
List<LocodeDB.LocodeEntry> results = new List<LocodeDB.LocodeEntry>();
|
||||
|
||||
string query = "SELECT LocationCode, LocationName FROM SSN_LOCODES WHERE LocationName like $PAR";
|
||||
SQLiteCommand cmd = new SQLiteCommand(query, _con);
|
||||
cmd.Parameters.AddWithValue("$PAR", city);
|
||||
IDataReader reader = cmd.ExecuteReader();
|
||||
while (reader.Read())
|
||||
{
|
||||
if (!reader.IsDBNull(0) && !reader.IsDBNull(1))
|
||||
{
|
||||
LocodeDB.LocodeEntry entry = new LocodeDB.LocodeEntry();
|
||||
entry.Locode = reader.GetString(0);
|
||||
entry.Name = reader.GetString(1);
|
||||
results.Add(entry);
|
||||
}
|
||||
}
|
||||
reader.Close();
|
||||
return results;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -325,8 +325,7 @@ namespace ENI2
|
||||
if (!closedDialog.Core.IsDK)
|
||||
{
|
||||
// deutsche Häfen fordern eine Visit-Id an, für DK erfolgt hier nur die Anlage eines Datensatzes
|
||||
closedDialog.Core.BSMDStatusInternal = MessageCore.BSMDStatus.TOSEND;
|
||||
closedDialog.Core.InitialHIS = Message.NSWProvider.DUDR_TEST;
|
||||
closedDialog.Core.BSMDStatusInternal = MessageCore.BSMDStatus.TOSEND;
|
||||
}
|
||||
|
||||
if (closedDialog.Core.PoC.Equals("ZZNOK"))
|
||||
|
||||
63
ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs
generated
63
ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs
generated
@ -809,6 +809,15 @@ namespace ENI2.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Blocked classes.
|
||||
/// </summary>
|
||||
public static string textBlockedClasses {
|
||||
get {
|
||||
return ResourceManager.GetString("textBlockedClasses", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Border Police.
|
||||
/// </summary>
|
||||
@ -908,6 +917,15 @@ namespace ENI2.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Visit/TransitId can be cancelled.
|
||||
/// </summary>
|
||||
public static string textCancellable {
|
||||
get {
|
||||
return ResourceManager.GetString("textCancellable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Cancelled.
|
||||
/// </summary>
|
||||
@ -1286,6 +1304,15 @@ namespace ENI2.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Core status.
|
||||
/// </summary>
|
||||
public static string textCoreStatus {
|
||||
get {
|
||||
return ResourceManager.GetString("textCoreStatus", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Country.
|
||||
/// </summary>
|
||||
@ -1691,6 +1718,24 @@ namespace ENI2.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Error code.
|
||||
/// </summary>
|
||||
public static string textErrorCode {
|
||||
get {
|
||||
return ResourceManager.GetString("textErrorCode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Error message.
|
||||
/// </summary>
|
||||
public static string textErrorMessage {
|
||||
get {
|
||||
return ResourceManager.GetString("textErrorMessage", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Errors.
|
||||
/// </summary>
|
||||
@ -1862,6 +1907,15 @@ namespace ENI2.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Free classes.
|
||||
/// </summary>
|
||||
public static string textFreeClasses {
|
||||
get {
|
||||
return ResourceManager.GetString("textFreeClasses", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Full.
|
||||
/// </summary>
|
||||
@ -2870,6 +2924,15 @@ namespace ENI2.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Own classes.
|
||||
/// </summary>
|
||||
public static string textOwnClasses {
|
||||
get {
|
||||
return ResourceManager.GetString("textOwnClasses", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Package type.
|
||||
/// </summary>
|
||||
|
||||
@ -1528,4 +1528,25 @@
|
||||
<data name="textUnsavedChangesSendAnyWay" xml:space="preserve">
|
||||
<value>Some messages have unsaved changes. Send anyway?</value>
|
||||
</data>
|
||||
<data name="textBlockedClasses" xml:space="preserve">
|
||||
<value>Blocked classes</value>
|
||||
</data>
|
||||
<data name="textCancellable" xml:space="preserve">
|
||||
<value>Visit/TransitId can be cancelled</value>
|
||||
</data>
|
||||
<data name="textCoreStatus" xml:space="preserve">
|
||||
<value>Core status</value>
|
||||
</data>
|
||||
<data name="textErrorCode" xml:space="preserve">
|
||||
<value>Error code</value>
|
||||
</data>
|
||||
<data name="textErrorMessage" xml:space="preserve">
|
||||
<value>Error message</value>
|
||||
</data>
|
||||
<data name="textFreeClasses" xml:space="preserve">
|
||||
<value>Free classes</value>
|
||||
</data>
|
||||
<data name="textOwnClasses" xml:space="preserve">
|
||||
<value>Own classes</value>
|
||||
</data>
|
||||
</root>
|
||||
BIN
nsw/Source/SQL/4052Passengers.sql
Normal file
BIN
nsw/Source/SQL/4052Passengers.sql
Normal file
Binary file not shown.
4
nsw/Source/SQL/fk_index_create.sql
Normal file
4
nsw/Source/SQL/fk_index_create.sql
Normal file
@ -0,0 +1,4 @@
|
||||
SELECT 'CREATE INDEX [IX_' + f.name + '] ON ' + OBJECT_NAME(f.parent_object_id) + '(' + COL_NAME(fc.parent_object_id, fc.parent_column_id) + ')'
|
||||
FROM sys.foreign_keys AS f
|
||||
INNER JOIN sys.foreign_key_columns AS fc
|
||||
ON f.OBJECT_ID = fc.constraint_object_id
|
||||
40
nsw/Source/SQL/fk_indexes.sql
Normal file
40
nsw/Source/SQL/fk_indexes.sql
Normal file
@ -0,0 +1,40 @@
|
||||
CREATE INDEX [IX_FK_PAS_MessageHeader] ON PAS(MessageHeaderId)
|
||||
CREATE INDEX [IX_FK_BPOL_MessageHeader] ON BPOL(MessageHeaderId)
|
||||
CREATE INDEX [IX_FK_Error_MessageHeader] ON Error(MessageHeaderId)
|
||||
CREATE INDEX [IX_FK_TOWA_MessageHeader] ON TOWA(MessageHeaderId)
|
||||
CREATE INDEX [IX_FK_Violation_MessageHeader] ON Violation(MessageHeaderId)
|
||||
CREATE INDEX [IX_FK_TOWD_MessageHeader] ON TOWD(MessageHeaderId)
|
||||
CREATE INDEX [IX_FK_NOA_NOD_MessageHeader] ON NOA_NOD(MessageHeaderId)
|
||||
CREATE INDEX [IX_FK_ATA_MessageHeader] ON ATA(MessageHeaderId)
|
||||
CREATE INDEX [IX_FK_NAME_MessageHeader] ON NAME(MessageHeaderId)
|
||||
CREATE INDEX [IX_FK_ATD_MessageHeader] ON ATD(MessageHeaderId)
|
||||
CREATE INDEX [IX_FK_SEC_MessageHeader] ON SEC(MessageHeaderId)
|
||||
CREATE INDEX [IX_FK_POBA_MessageHeader] ON POBA(MessageHeaderId)
|
||||
CREATE INDEX [IX_FK_POBD_MessageHeader] ON POBD(MessageHeaderId)
|
||||
CREATE INDEX [IX_FK_TIEFA_MessageHeader] ON TIEFA(MessageHeaderId)
|
||||
CREATE INDEX [IX_FK_TIEFD_MessageHeader] ON TIEFD(MessageHeaderId)
|
||||
CREATE INDEX [IX_FK_BKRA_MessageHeader] ON BKRA(MessageHeaderId)
|
||||
CREATE INDEX [IX_FK_HAZA_MessageHeader] ON HAZA(MessageHeaderId)
|
||||
CREATE INDEX [IX_FK_BKRD_MessageHeader] ON BKRD(MessageHeaderId)
|
||||
CREATE INDEX [IX_FK_AGNT_MessageHeader] ON AGNT(MessageHeaderId)
|
||||
CREATE INDEX [IX_FK_HAZD_MessageHeader] ON HAZD(MessageHeaderId)
|
||||
CREATE INDEX [IX_FK_STAT_MessageHeader] ON STAT(MessageHeaderId)
|
||||
CREATE INDEX [IX_FK_LADG_MessageHeader] ON LADG(MessageHeaderId)
|
||||
CREATE INDEX [IX_FK_INFO_MessageHeader] ON INFO(MessageHeaderId)
|
||||
CREATE INDEX [IX_FK_SERV_MessageHeader] ON SERV(MessageHeaderId)
|
||||
CREATE INDEX [IX_FK_PRE72H_MessageHeader] ON PRE72H(MessageHeaderId)
|
||||
CREATE INDEX [IX_FK_MDH_MessageHeader] ON MDH(MessageHeaderId)
|
||||
CREATE INDEX [IX_FK_WAS_MessageHeader] ON WAS(MessageHeaderId)
|
||||
CREATE INDEX [IX_FK_CREW_MessageHeader] ON CREW(MessageHeaderId)
|
||||
CREATE INDEX [IX_FK_PortOfItinerary_BPOL] ON PortOfItinerary(BPOLId)
|
||||
CREATE INDEX [IX_FK_MessageHeader_MessageCore] ON MessageHeader(MessageCoreId)
|
||||
CREATE INDEX [IX_FK_MessageHeader_ReportingParty] ON MessageHeader(ReportingPartyId)
|
||||
CREATE INDEX [IX_FK_CallPurpose_NOA_NOD] ON CallPurpose(NOA_NODId)
|
||||
CREATE INDEX [IX_FK_LastTenPortFacilitiesCalled_SEC] ON LastTenPortFacilitiesCalled(SEC_Id)
|
||||
CREATE INDEX [IX_FK_ShipToShipActivitiesDuringLastTenPortFacilitiesCalled_SEC] ON ShipToShipActivitiesDuringLastTenPortFacilitiesCalled(SEC_Id)
|
||||
CREATE INDEX [IX_FK_SanitaryMeasuresDetail_MDH] ON SanitaryMeasuresDetail(MDH_Id)
|
||||
CREATE INDEX [IX_FK_StowawaysJoiningLocation_MDH] ON StowawaysJoiningLocation(MDH_Id)
|
||||
CREATE INDEX [IX_FK_PortOfCallLast30Days_MDH] ON PortOfCallLast30Days(MDH_Id)
|
||||
CREATE INDEX [IX_FK_SInfectedArea_MDH] ON InfectedArea(MDH_Id)
|
||||
CREATE INDEX [IX_FK_PortOfCallLast30DaysCrewJoinedShip_PortOfCallLast30Days] ON PortOfCallLast30DaysCrewJoinedShip(PortOfCallLast30DaysId)
|
||||
CREATE INDEX [IX_FK_WasteDisposalServiceProvider_WAS] ON WasteDisposalServiceProvider(WASId)
|
||||
@ -359,6 +359,12 @@ namespace bsmd.database
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dieses Flag wird gesetzt, sobald die Meldeklasse *einmal* erfolgreich gesendet wurde. Es bleibt bestehen, auch
|
||||
/// wenn ein nachfolgender Sendevorgang auf einen Fehler läuft
|
||||
/// </summary>
|
||||
public bool? SendSuccess { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region IDatabaseEntity implementation
|
||||
@ -402,13 +408,14 @@ namespace bsmd.database
|
||||
cmd.Parameters.AddWithNullableValue("@CREATEDBY", this.CreatedBy);
|
||||
cmd.Parameters.AddWithNullableValue("@CHANGEDBY", this.ChangedBy);
|
||||
cmd.Parameters.AddWithNullableValue("@STATUSINFO", this.StatusInfo);
|
||||
cmd.Parameters.AddWithNullableValue("@SENDSUCCESS", this.SendSuccess);
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
this.CreateId();
|
||||
cmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
string query = string.Format("INSERT INTO {0} (Id, ClientRequestId, MessageCoreId, MessageId, SentAt, ReceivedAt, RequestedAt, NotificationClass, Reset, Cancel, Status, ReportingPartyId, BSMDStatus, HIS, CreatedBy, ChangedBy, StatusInfo) " +
|
||||
"VALUES (@ID, @CLIENTREQUESTID, @MESSAGECOREID, @MESSAGEID, @SENTAT, @RECEIVEDAT, @REQUESTEDAT, @NOTIFICATIONCLASS, @RESET, @CANCEL, @STATUS, @REPORTINGPARTYID, @BSMDSTATUS, @HIS, @CREATEDBY, @CHANGEDBY, @STATUSINFO)",
|
||||
string query = string.Format("INSERT INTO {0} (Id, ClientRequestId, MessageCoreId, MessageId, SentAt, ReceivedAt, RequestedAt, NotificationClass, Reset, Cancel, Status, ReportingPartyId, BSMDStatus, HIS, CreatedBy, ChangedBy, StatusInfo, SendSuccess) " +
|
||||
"VALUES (@ID, @CLIENTREQUESTID, @MESSAGECOREID, @MESSAGEID, @SENTAT, @RECEIVEDAT, @REQUESTEDAT, @NOTIFICATIONCLASS, @RESET, @CANCEL, @STATUS, @REPORTINGPARTYID, @BSMDSTATUS, @HIS, @CREATEDBY, @CHANGEDBY, @STATUSINFO, @SENDSUCCESS)",
|
||||
this.Tablename);
|
||||
cmd.CommandText = query;
|
||||
}
|
||||
@ -417,7 +424,7 @@ namespace bsmd.database
|
||||
cmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
cmd.CommandText = string.Format("UPDATE {0} SET ClientRequestId = @CLIENTREQUESTID, MessageId = @MESSAGEID, SentAt = @SENTAT, ReceivedAt = @RECEIVEDAT, RequestedAt = @REQUESTEDAT, " +
|
||||
"NotificationClass = @NOTIFICATIONCLASS, Reset = @RESET, Cancel = @CANCEL, Status = @STATUS, ReportingPartyId = @REPORTINGPARTYID, BSMDStatus = @BSMDSTATUS, HIS = @HIS, " +
|
||||
"CreatedBy = @CREATEDBY, ChangedBy = @CHANGEDBY, StatusInfo = @STATUSINFO WHERE Id = @ID", this.Tablename);
|
||||
"CreatedBy = @CREATEDBY, ChangedBy = @CHANGEDBY, StatusInfo = @STATUSINFO, SendSuccess = @SENDSUCCESS WHERE Id = @ID", this.Tablename);
|
||||
}
|
||||
}
|
||||
|
||||
@ -425,7 +432,7 @@ namespace bsmd.database
|
||||
public override void PrepareLoadCommand(IDbCommand cmd, LoadFilter filter, params object[] criteria )
|
||||
{
|
||||
string query = string.Format("SELECT Id, ClientRequestId, MessageCoreId, MessageId, SentAt, ReceivedAt, RequestedAt, NotificationClass, " +
|
||||
"Reset, Cancel, Status, ReportingPartyId, BSMDStatus, HIS, Created, CreatedBy, ChangedBy, Changed, StatusInfo FROM {0} ", this.Tablename);
|
||||
"Reset, Cancel, Status, ReportingPartyId, BSMDStatus, HIS, Created, CreatedBy, ChangedBy, Changed, StatusInfo, SendSuccess FROM {0} ", this.Tablename);
|
||||
|
||||
switch (filter)
|
||||
{
|
||||
@ -511,6 +518,7 @@ namespace bsmd.database
|
||||
if (!reader.IsDBNull(16)) msg.ChangedBy = reader.GetString(16);
|
||||
if (!reader.IsDBNull(17)) msg.changed = reader.GetDateTime(17);
|
||||
if (!reader.IsDBNull(18)) msg.StatusInfo = reader.GetString(18);
|
||||
if (!reader.IsDBNull(19)) msg.SendSuccess = reader.GetBoolean(19);
|
||||
result.Add(msg);
|
||||
}
|
||||
reader.Close();
|
||||
|
||||
@ -2,6 +2,6 @@
|
||||
|
||||
[assembly: AssemblyCompany("Informatikbüro Daniel Schick")]
|
||||
[assembly: AssemblyProduct("BSMD NSW interface")]
|
||||
[assembly: AssemblyInformationalVersion("3.7.5")]
|
||||
[assembly: AssemblyInformationalVersion("3.8.0")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014-2017 Informatikbüro Daniel Schick. All rights reserved.")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
@ -1,4 +1,4 @@
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("3.7.5.*")]
|
||||
[assembly: AssemblyVersion("3.8.0.*")]
|
||||
|
||||
|
||||
@ -134,19 +134,20 @@ namespace bsmd.dbh
|
||||
_log.WarnFormat("Violation received for {0}: {1}", Messages[i].Type, violation.ViolationText);
|
||||
violation.MessageHeaderId = aMessage.Id.Value;
|
||||
aMessage.InternalStatus = Message.BSMDStatus.VIOLATION;
|
||||
aMessage.SendSuccess = true;
|
||||
DBManager.Instance.Save(violation);
|
||||
|
||||
break;
|
||||
|
||||
case dbh.response.RootMessageType.WARNING:
|
||||
_log.InfoFormat("WARNING received for {0}: {1}", Messages[i].Type, Messages[i].Text);
|
||||
|
||||
aMessage.SendSuccess = true;
|
||||
break;
|
||||
|
||||
case dbh.response.RootMessageType.INFO:
|
||||
default:
|
||||
_log.InfoFormat("INFO received for {0}: {1}", Messages[i].Type, Messages[i].Text);
|
||||
|
||||
aMessage.SendSuccess = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -154,6 +154,7 @@ namespace bsmd.hisnord
|
||||
|
||||
if(isAccepted)
|
||||
{
|
||||
aMessage.SendSuccess = true;
|
||||
aMessage.Status = Message.MessageStatus.ACCEPTED;
|
||||
aMessage.InternalStatus = Message.BSMDStatus.CONFIRMED;
|
||||
if (nswResponse.Violations.Count > 0)
|
||||
|
||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user