Neuer Stand mit SEC, MDH, Departure usw. ;-)
This commit is contained in:
parent
614dfbb894
commit
e33b11569c
@ -27,11 +27,11 @@
|
|||||||
</setting>
|
</setting>
|
||||||
<setting name="LockingServerAddress" serializeAs="String">
|
<setting name="LockingServerAddress" serializeAs="String">
|
||||||
<value>http://192.168.2.4/LockingService/LockingService.svc</value>
|
<value>http://192.168.2.4/LockingService/LockingService.svc</value>
|
||||||
<!--value>http://heupferd/bsmd.LockingService/LockingService.svc</value-->
|
<!--value>http://heupferd/bsmd.LockingService/LockingService.svc</value-->
|
||||||
</setting>
|
</setting>
|
||||||
<setting name="ConnectionString" serializeAs="String">
|
<setting name="ConnectionString" serializeAs="String">
|
||||||
<value>Data Source=192.168.2.12;Initial Catalog=nsw;Uid=dfuser;Pwd=dfpasswd;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False</value>
|
<value>Data Source=192.168.2.12;Initial Catalog=nsw;Uid=dfuser;Pwd=dfpasswd;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False</value>
|
||||||
<!--value>Data Source=(localdb)\Projects;Initial Catalog=nsw;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False</value-->
|
<!--value>Data Source=(localdb)\Projects;Initial Catalog=nsw;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False</value-->
|
||||||
</setting>
|
</setting>
|
||||||
</ENI2.Properties.Settings>
|
</ENI2.Properties.Settings>
|
||||||
</applicationSettings>
|
</applicationSettings>
|
||||||
|
|||||||
@ -66,7 +66,9 @@ namespace ENI2
|
|||||||
|
|
||||||
EventManager.RegisterClassHandler(typeof(DatePicker), DatePicker.PreviewKeyDownEvent, new KeyEventHandler(this.DatePicker_PreviewKeyDown));
|
EventManager.RegisterClassHandler(typeof(DatePicker), DatePicker.PreviewKeyDownEvent, new KeyEventHandler(this.DatePicker_PreviewKeyDown));
|
||||||
CREW.NationalityDict = LocalizedLookup.getNationalities();
|
CREW.NationalityDict = LocalizedLookup.getNationalities();
|
||||||
|
STAT.VesselTypeDict = LocalizedLookup.getVesselTypes();
|
||||||
|
STAT.TransportModeDict = LocalizedLookup.getTransportModes();
|
||||||
|
|
||||||
// Connect to locking service (if enabled)
|
// Connect to locking service (if enabled)
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|||||||
@ -29,7 +29,7 @@
|
|||||||
<xctk:DateTimePicker Grid.Column="1" Value="{Binding ATAPortOfCall, Mode=TwoWay}" Name="dateTimePickerATA" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="False" ContextMenu="{DynamicResource ClearContextMenu}"/>
|
<xctk:DateTimePicker Grid.Column="1" Value="{Binding ATAPortOfCall, Mode=TwoWay}" Name="dateTimePickerATA" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="False" ContextMenu="{DynamicResource ClearContextMenu}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
<GroupBox Name="tiefaGroupBox" Header="{x:Static p:Resources.textDraughtOnArrival}" Grid.Row="1">
|
<GroupBox Name="tiefaGroupBox" Header="{x:Static p:Resources.textDraughtOnDeparture}" Grid.Row="1">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*" />
|
<ColumnDefinition Width="1*" />
|
||||||
|
|||||||
@ -148,7 +148,7 @@ namespace ENI2.DetailViewControls
|
|||||||
{
|
{
|
||||||
// are you sure dialog is in base class
|
// are you sure dialog is in base class
|
||||||
_bpol.PortOfItineraries.Remove(poi);
|
_bpol.PortOfItineraries.Remove(poi);
|
||||||
// DBManager.Instance.Delete(serv); // not yet
|
DBManager.Instance.Delete(poi);
|
||||||
this.dataGridPortOfItinerary.Items.Refresh();
|
this.dataGridPortOfItinerary.Items.Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -220,7 +220,7 @@ namespace ENI2.DetailViewControls
|
|||||||
{
|
{
|
||||||
// are you sure dialog is in base class
|
// are you sure dialog is in base class
|
||||||
_pasMessage.Elements.Remove(pas);
|
_pasMessage.Elements.Remove(pas);
|
||||||
// DBManager.Instance.Delete(serv); // not yet
|
DBManager.Instance.Delete(pas);
|
||||||
this.dataGridPassengerList.Items.Refresh();
|
this.dataGridPassengerList.Items.Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -292,7 +292,7 @@ namespace ENI2.DetailViewControls
|
|||||||
{
|
{
|
||||||
// are you sure dialog is in base class
|
// are you sure dialog is in base class
|
||||||
_crewMessage.Elements.Remove(crew);
|
_crewMessage.Elements.Remove(crew);
|
||||||
// DBManager.Instance.Delete(serv); // not yet
|
DBManager.Instance.Delete(crew);
|
||||||
this.dataGridCrewList.Items.Refresh();
|
this.dataGridCrewList.Items.Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,10 +4,75 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:p="clr-namespace:ENI2.Properties"
|
||||||
|
xmlns:enictrl="clr-namespace:ENI2.Controls"
|
||||||
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||||
xmlns:local="clr-namespace:ENI2.DetailViewControls"
|
xmlns:local="clr-namespace:ENI2.DetailViewControls"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="300" d:DesignWidth="300">
|
d:DesignHeight="800" d:DesignWidth="1024">
|
||||||
<Grid>
|
<GroupBox Name="arrivalNotificationGroupBox" Header="{x:Static p:Resources.textPortNotification}">
|
||||||
|
<Grid>
|
||||||
</Grid>
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="50" />
|
||||||
|
<RowDefinition Height="50" />
|
||||||
|
<RowDefinition Height="80" />
|
||||||
|
<RowDefinition Height="250" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<GroupBox Name="atdGroupBox" Header="ATD" Grid.Row="0">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="2*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Label Content="ATD" Grid.Column="0" Grid.Row="0" HorizontalContentAlignment="Right" Margin="0,0,10,0"/>
|
||||||
|
<xctk:DateTimePicker Grid.Column="1" Value="{Binding ATDPortOfCall, Mode=TwoWay}" Name="dateTimePickerATD" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="False" ContextMenu="{DynamicResource ClearContextMenu}"/>
|
||||||
|
</Grid>
|
||||||
|
</GroupBox>
|
||||||
|
<GroupBox Name="tiefdGroupBox" Header="{x:Static p:Resources.textDraughtOnDeparture}" Grid.Row="1">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="2*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Label Content="{x:Static p:Resources.textDraughtOnDepartureLabel}" Grid.Column="0" HorizontalContentAlignment="Right" Margin="0,0,10,0"/>
|
||||||
|
<xctk:DoubleUpDown Grid.Row="0" Grid.Column="1" Name="doubleUpDownDraught" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2,2,2,2" FormatString="N1" Value="{Binding DraughtUponDeparture_DMT, Mode=TwoWay}"/>
|
||||||
|
</Grid>
|
||||||
|
</GroupBox>
|
||||||
|
<GroupBox Name="pobdGroupBox" Header="{x:Static p:Resources.textPersonOnBoardDeparture}" Grid.Row="2">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Label Content="{x:Static p:Resources.textCrewMemberOnBoard}" Grid.Column="0" Grid.Row="0" HorizontalContentAlignment="Right" Margin="0,0,10,0"/>
|
||||||
|
<xctk:IntegerUpDown Value="{Binding TotalCrewMembersOnBoardUponDeparture, Mode=TwoWay}" Grid.Row="0" Grid.Column="1" Name="integerUpDownCrewMemberOnBoard" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2,2,2,2" />
|
||||||
|
<Label Content="{x:Static p:Resources.textPassengersOnBoard}" Grid.Column="2" Grid.Row="0" HorizontalContentAlignment="Right" Margin="0,0,10,0"/>
|
||||||
|
<xctk:IntegerUpDown Value="{Binding TotalPassengersOnBoardUponDeparture, Mode=TwoWay}" Grid.Row="0" Grid.Column="3" Name="integerUpDownPassengersOnBoard" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2,2,2,2" />
|
||||||
|
<Label Content="{x:Static p:Resources.textStowawaysOnBoard}" Grid.Column="0" Grid.Row="1" HorizontalContentAlignment="Right" Margin="0,0,10,0"/>
|
||||||
|
<xctk:IntegerUpDown Value="{Binding TotalStowawaysOnBoardUponDeparture, Mode=TwoWay}" Grid.Row="1" Grid.Column="1" Name="integerUpDownStowawaysOnBoard" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2,2,2,2" />
|
||||||
|
<Label Content="{x:Static p:Resources.textPersonsOnBoard}" Grid.Column="2" Grid.Row="1" HorizontalContentAlignment="Right" Margin="0,0,10,0"/>
|
||||||
|
<xctk:IntegerUpDown Value="{Binding TotalPersonsOnBoardUponDeparture, Mode=TwoWay}" Grid.Row="1" Grid.Column="3" Name="integerUpDownPersonsOnBoard" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2,2,2,2" />
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</GroupBox>
|
||||||
|
<GroupBox Name="bkrdGroupBox" Header="{x:Static p:Resources.textBunkerOnDeparture}" Grid.Row="3">
|
||||||
|
<enictrl:ENIDataGrid x:Name="dataGridBKRD" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||||
|
SelectionMode="Single" AutoGenerateColumns="False" Margin="0,5,0,0">
|
||||||
|
<DataGrid.Columns>
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textBunkerType}" Binding="{Binding BunkerFuelType}" IsReadOnly="True" Width="0.2*" />
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textBunkerQuantity}" Binding="{Binding BunkerFuelQuantity_TNE, Mode=TwoWay}" IsReadOnly="True" Width="0.8*" />
|
||||||
|
</DataGrid.Columns>
|
||||||
|
</enictrl:ENIDataGrid>
|
||||||
|
</GroupBox>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</GroupBox>
|
||||||
</src:DetailBaseControl>
|
</src:DetailBaseControl>
|
||||||
|
|||||||
@ -1,32 +1,214 @@
|
|||||||
// Copyright (c) 2017 schick Informatik
|
// Copyright (c) 2017 schick Informatik
|
||||||
// Description:
|
// Description: Detailansicht für ATD, TIEFD, POBD, BKRD
|
||||||
//
|
//
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
|
||||||
using System.Windows.Data;
|
using bsmd.database;
|
||||||
using System.Windows.Documents;
|
using ENI2.EditControls;
|
||||||
using System.Windows.Input;
|
|
||||||
using System.Windows.Media;
|
|
||||||
using System.Windows.Media.Imaging;
|
|
||||||
using System.Windows.Navigation;
|
|
||||||
using System.Windows.Shapes;
|
|
||||||
|
|
||||||
namespace ENI2.DetailViewControls
|
namespace ENI2.DetailViewControls
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interaction logic for DepartureNotificationDetailControl.xaml
|
/// Interaction logic for ArrivalNotificationDetailControl.xaml
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class DepartureNotificationDetailControl : DetailBaseControl
|
public partial class DepartureNotificationDetailControl : DetailBaseControl
|
||||||
{
|
{
|
||||||
|
|
||||||
|
private Message _atdMessage;
|
||||||
|
private Message _tiefdMessage;
|
||||||
|
private Message _pobdMessage;
|
||||||
|
private Message _bkrdMessage;
|
||||||
|
|
||||||
|
|
||||||
public DepartureNotificationDetailControl()
|
public DepartureNotificationDetailControl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
this.Loaded += ArrivalNotificationDetailControl_Loaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ArrivalNotificationDetailControl_Loaded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
this.RegisterDateTimePickerChange(this.dateTimePickerATD, Message.NotificationClass.ATD);
|
||||||
|
this.RegisterDoubleUpDownChange(this.doubleUpDownDraught, Message.NotificationClass.TIEFD);
|
||||||
|
this.RegisterIntegerUpDownChange(this.integerUpDownCrewMemberOnBoard, Message.NotificationClass.POBD);
|
||||||
|
this.RegisterIntegerUpDownChange(this.integerUpDownPassengersOnBoard, Message.NotificationClass.POBD);
|
||||||
|
this.RegisterIntegerUpDownChange(this.integerUpDownPersonsOnBoard, Message.NotificationClass.POBD);
|
||||||
|
this.RegisterIntegerUpDownChange(this.integerUpDownStowawaysOnBoard, Message.NotificationClass.POBD);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
base.Initialize();
|
||||||
|
|
||||||
|
foreach (Message aMessage in this.Messages)
|
||||||
|
{
|
||||||
|
if (aMessage.MessageNotificationClass == Message.NotificationClass.ATD) { this._atdMessage = aMessage; this.ControlMessages.Add(aMessage); }
|
||||||
|
if (aMessage.MessageNotificationClass == Message.NotificationClass.TIEFD) { this._tiefdMessage = aMessage; this.ControlMessages.Add(aMessage); }
|
||||||
|
if (aMessage.MessageNotificationClass == Message.NotificationClass.POBD) { this._pobdMessage = aMessage; this.ControlMessages.Add(aMessage); }
|
||||||
|
if (aMessage.MessageNotificationClass == Message.NotificationClass.BKRD) { this._bkrdMessage = aMessage; this.ControlMessages.Add(aMessage); }
|
||||||
|
}
|
||||||
|
|
||||||
|
#region ATD
|
||||||
|
|
||||||
|
if (this._atdMessage == null)
|
||||||
|
{
|
||||||
|
this._atdMessage = this.Core.CreateMessage(Message.NotificationClass.ATD);
|
||||||
|
this.Messages.Add(this._atdMessage);
|
||||||
|
}
|
||||||
|
|
||||||
|
ATD atd = null;
|
||||||
|
if (this._atdMessage.Elements.Count > 0)
|
||||||
|
atd = this._atdMessage.Elements[0] as ATD;
|
||||||
|
if (atd == null)
|
||||||
|
{
|
||||||
|
atd = new ATD();
|
||||||
|
atd.MessageCore = this.Core;
|
||||||
|
atd.MessageHeader = this._atdMessage;
|
||||||
|
_atdMessage.Elements.Add(atd);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.atdGroupBox.DataContext = atd;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region TIEFD
|
||||||
|
|
||||||
|
if (this._tiefdMessage == null)
|
||||||
|
{
|
||||||
|
this._tiefdMessage = this.Core.CreateMessage(Message.NotificationClass.TIEFD);
|
||||||
|
this.Messages.Add(this._tiefdMessage);
|
||||||
|
}
|
||||||
|
|
||||||
|
TIEFD tiefd = null;
|
||||||
|
if (this._tiefdMessage.Elements.Count > 0)
|
||||||
|
tiefd = this._tiefdMessage.Elements[0] as TIEFD;
|
||||||
|
if (tiefd == null)
|
||||||
|
{
|
||||||
|
tiefd = new TIEFD();
|
||||||
|
tiefd.MessageCore = this.Core;
|
||||||
|
tiefd.MessageHeader = this._tiefdMessage;
|
||||||
|
_tiefdMessage.Elements.Add(tiefd);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.tiefdGroupBox.DataContext = tiefd;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region POBD
|
||||||
|
|
||||||
|
if (this._pobdMessage == null)
|
||||||
|
{
|
||||||
|
this._pobdMessage = this.Core.CreateMessage(Message.NotificationClass.POBD);
|
||||||
|
this.Messages.Add(this._pobdMessage);
|
||||||
|
}
|
||||||
|
|
||||||
|
POBD pobd = null;
|
||||||
|
if (this._pobdMessage.Elements.Count > 0)
|
||||||
|
pobd = this._pobdMessage.Elements[0] as POBD;
|
||||||
|
if (pobd == null)
|
||||||
|
{
|
||||||
|
pobd = new POBD();
|
||||||
|
pobd.MessageCore = this.Core;
|
||||||
|
pobd.MessageHeader = this._pobdMessage;
|
||||||
|
_pobdMessage.Elements.Add(pobd);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.pobdGroupBox.DataContext = pobd;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region BKRD
|
||||||
|
|
||||||
|
if (this._bkrdMessage == null)
|
||||||
|
{
|
||||||
|
this._bkrdMessage = this.Core.CreateMessage(Message.NotificationClass.BKRD);
|
||||||
|
this.Messages.Add(this._bkrdMessage);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.dataGridBKRD.Initialize();
|
||||||
|
this.dataGridBKRD.ItemsSource = this._bkrdMessage.Elements;
|
||||||
|
this.dataGridBKRD.AddingNewItem += DataGridBKRD_AddingNewItem;
|
||||||
|
this.dataGridBKRD.EditRequested += DataGridBKRD_EditRequested;
|
||||||
|
this.dataGridBKRD.DeleteRequested += DataGridBKRD_DeleteRequested;
|
||||||
|
this.dataGridBKRD.CreateRequested += DataGridBKRD_CreateRequested;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#region BKRD grid events
|
||||||
|
|
||||||
|
private void DataGridBKRD_CreateRequested()
|
||||||
|
{
|
||||||
|
BRKD brkd = new BRKD();
|
||||||
|
EditBKRDialog ebd = new EditBKRDialog();
|
||||||
|
ebd.BRKD = brkd;
|
||||||
|
ebd.IsDeparture = true;
|
||||||
|
|
||||||
|
ebd.AddClicked += () =>
|
||||||
|
{
|
||||||
|
ebd.CopyValuesToEntity();
|
||||||
|
this._bkrdMessage.Elements.Add(ebd.BRKD);
|
||||||
|
ebd.BRKD.MessageHeader = _bkrdMessage;
|
||||||
|
this.dataGridBKRD.Items.Refresh();
|
||||||
|
ebd.BRKD = new BRKD();
|
||||||
|
this.SublistElementChanged(Message.NotificationClass.BKRD);
|
||||||
|
};
|
||||||
|
|
||||||
|
if (ebd.ShowDialog() ?? false)
|
||||||
|
{
|
||||||
|
brkd.MessageHeader = _bkrdMessage;
|
||||||
|
_bkrdMessage.Elements.Add(brkd);
|
||||||
|
this.dataGridBKRD.Items.Refresh();
|
||||||
|
this.SublistElementChanged(Message.NotificationClass.BKRD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DataGridBKRD_DeleteRequested(DatabaseEntity obj)
|
||||||
|
{
|
||||||
|
BRKD brkd = obj as BRKD;
|
||||||
|
if (brkd != null)
|
||||||
|
{
|
||||||
|
// are you sure dialog is in base class
|
||||||
|
this._bkrdMessage.Elements.Remove(brkd);
|
||||||
|
this.dataGridBKRD.Items.Refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DataGridBKRD_EditRequested(DatabaseEntity obj)
|
||||||
|
{
|
||||||
|
BRKD brkd = obj as BRKD;
|
||||||
|
if (brkd != null)
|
||||||
|
{
|
||||||
|
EditBKRDialog eld = new EditBKRDialog();
|
||||||
|
eld.IsDeparture = true;
|
||||||
|
eld.BRKD = brkd;
|
||||||
|
|
||||||
|
eld.AddClicked += () =>
|
||||||
|
{
|
||||||
|
eld.CopyValuesToEntity();
|
||||||
|
_bkrdMessage.Elements.Add(eld.BRKD);
|
||||||
|
this.dataGridBKRD.Items.Refresh();
|
||||||
|
eld.BRKD = new BRKD();
|
||||||
|
eld.BRKD.MessageHeader = _bkrdMessage;
|
||||||
|
this.SublistElementChanged(Message.NotificationClass.BKRD);
|
||||||
|
};
|
||||||
|
|
||||||
|
if (eld.ShowDialog() ?? false)
|
||||||
|
{
|
||||||
|
this.dataGridBKRD.Items.Refresh();
|
||||||
|
this.SublistElementChanged(Message.NotificationClass.BKRD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DataGridBKRD_AddingNewItem(object sender, System.Windows.Controls.AddingNewItemEventArgs e)
|
||||||
|
{
|
||||||
|
this.DataGridBKRD_CreateRequested();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,9 +5,157 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:ENI2.DetailViewControls"
|
xmlns:local="clr-namespace:ENI2.DetailViewControls"
|
||||||
|
xmlns:enictrl="clr-namespace:ENI2.Controls"
|
||||||
|
xmlns:p="clr-namespace:ENI2.Properties"
|
||||||
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="300" d:DesignWidth="300">
|
d:DesignHeight="600" d:DesignWidth="1024">
|
||||||
<Grid>
|
<TabControl Margin="10" Name="mainFrame">
|
||||||
|
<TabItem Header="{x:Static p:Resources.textSecurityNotification}" Name="tabSecurityNotification">
|
||||||
</Grid>
|
<GroupBox Name="portCallGroupBox" Header="{x:Static p:Resources.textSEC}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="3*" />
|
||||||
|
<ColumnDefinition Width="2*" />
|
||||||
|
<ColumnDefinition Width="2*" />
|
||||||
|
<ColumnDefinition Width="2*" />
|
||||||
|
</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" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textSimplificationAvailable}" Name="label_SimplificationAvailable" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textPortOfHealth}" Name="label_PortOfHealth" Margin="0,0,10,0"/>
|
||||||
|
<TextBlock Grid.Row="3" Grid.RowSpan="2" Text="{x:Static p:Resources.textPersonDiedOnBoard}" Name="textBlock_PersonsDiedOnBoard" Margin="0,0,10,0" TextWrapping="Wrap" Height="56" VerticalAlignment="Top"/>
|
||||||
|
<TextBlock Grid.Row="5" Grid.RowSpan="2" Grid.Column="0" Text="{x:Static p:Resources.textDiseaseInfectiousNature}" Name="textBlock_diseaseInfectious" TextWrapping="Wrap" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="7" Grid.Column="0" Content="{x:Static p:Resources.textTotalNumberIllHigherThanExpected}" Name="label_TotalNumberHigher" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="8" Grid.Column="0" Content="{x:Static p:Resources.textSickPersonsOnBoard}" Name="label_SickPersonsOnBoard" Margin="0,0,10,0"/>
|
||||||
|
<TextBlock Grid.Row="9" Grid.RowSpan="2" Grid.Column="0" Text="{x:Static p:Resources.textAwareofConditionInfectious}" Name="label_AwareOfCondition" Margin="0,0,10,0"/>
|
||||||
|
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="11" Grid.Column="0" Content="{x:Static p:Resources.textStowaways}" Name="label_StowawaysOnBoard" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="12" Grid.Column="0" Content="{x:Static p:Resources.textSickAnimalsOrPets}" Name="label_SickAnimalsOrPets" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="13" Grid.Column="0" Content="{x:Static p:Resources.textSanitaryControlExemption}" Name="label_SanitaryControlExemption" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="14" Grid.Column="0" Content="{x:Static p:Resources.textPlaceOfIssue}" Name="label_PlaceOfIssue" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="15" Grid.Column="0" Content="{x:Static p:Resources.textReinspectionSanitaryControl}" Name="label_ReinspectionSanitaryControl" Margin="0,0,10,0"/>
|
||||||
|
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="2" Content="{x:Static p:Resources.textNumberOfDeaths}" Name="label_NumberOfDeaths" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="7" Grid.Column="2" Content="{x:Static p:Resources.textNumberOfIl}" Name="label_NumberOfIllPersons" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="8" Grid.Column="2" Content="{x:Static p:Resources.textMedicalPractitionerConsulted}" Name="label_WasMedical" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="11" Grid.Column="2" Content="{x:Static p:Resources.textJoiningLocation}" Name="label_JoiningLocation" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="14" Grid.Column="2" Content="{x:Static p:Resources.textDateOfIssue}" Name="label_DateOfIssue" Margin="0,0,10,0"/>
|
||||||
|
|
||||||
|
|
||||||
|
<CheckBox Name="checkSimplification" IsChecked="{Binding MDHSimplification}" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
|
||||||
|
<CheckBox Name="checkBoxHavePersonsDied" IsChecked="{Binding NonAccidentalDeathsDuringVoyage}" Grid.Row="3" Grid.Column="1" VerticalAlignment="Center"/>
|
||||||
|
<CheckBox Name="checkBoxIsSuspectedInfectious" IsChecked="{Binding SuspisionInfectiousNature}" Grid.Row="5" Grid.Column="1" VerticalAlignment="Center"/>
|
||||||
|
<CheckBox Name="checkBoxTotalNumberSickHigherThan" IsChecked="{Binding NumberOfIllPersonsHigherThanExpected}" Grid.Row="7" Grid.Column="1" VerticalAlignment="Center"/>
|
||||||
|
<CheckBox Name="checkBoxSickPersonsOnBoard" IsChecked="{Binding SickPersonsOnBoard}" Grid.Row="8" Grid.Column="1" VerticalAlignment="Center"/>
|
||||||
|
<CheckBox Name="checkBoxAwareOfConditions" IsChecked="{Binding AwareOfFurtherInfections}" Grid.Row="9" Grid.Column="1" VerticalAlignment="Center"/>
|
||||||
|
<CheckBox Name="checkBoxStowawaysOnBoard" IsChecked="{Binding StowawaysDetected}" Grid.Row="11" Grid.Column="1" VerticalAlignment="Center"/>
|
||||||
|
<CheckBox Name="checkBoxSickAnimalsOrPets" IsChecked="{Binding SickAnimalOrPetOnBoard}" Grid.Row="12" Grid.Column="1" VerticalAlignment="Center"/>
|
||||||
|
<CheckBox Name="checkBoxSanitaryControlExemption" IsChecked="{Binding ValidSanitaryControlExemptionOrCertificateOnBoard}" Grid.Row="13" Grid.Column="1" VerticalAlignment="Center"/>
|
||||||
|
<CheckBox Name="checkBoxReinspectionSanitary" IsChecked="{Binding SanitaryControlReinspectionRequired}" Grid.Row="15" Grid.Column="1" VerticalAlignment="Center"/>
|
||||||
|
<CheckBox Name="checkBoxWasMedicalConsulted" IsChecked="{Binding MedicalConsulted}" Grid.Row="8" Grid.Column="3" VerticalAlignment="Center"/>
|
||||||
|
|
||||||
|
|
||||||
|
<TextBox Name="textBoxPlaceOfIssue" Grid.Row="14" Grid.Column="1" MaxLength="100" Text="{Binding PlaceOfIssue}" Margin="2" />
|
||||||
|
<TextBox Name="textBoxStowawaysJoiningLocation" Grid.Row="11" Grid.RowSpan="3" Grid.Column="3" MaxLength="100" Text="{Binding CSOLastName}" Margin="2" />
|
||||||
|
|
||||||
|
<DatePicker Name="datePickerDateOfIssue" Grid.Row="14" Grid.Column="3" SelectedDate="{Binding ISSCDateOfExpiration}" Margin="2" />
|
||||||
|
|
||||||
|
<enictrl:LocodeControl x:Name="locodePortWhereHealthDeclarationWasGiven" Grid.Row="1" Grid.Column="1" LocodeValue="{Binding PortOfCallWhereCompleteMDHNotified}" />
|
||||||
|
<xctk:IntegerUpDown Name="integerUpDownNumberOfDeaths" Grid.Row="3" Grid.Column="3" Value="{Binding NonAccidentalDeathsDuringVoyageCount}" Margin="2" />
|
||||||
|
<xctk:IntegerUpDown Name="integerUpDownNumberOfIllPersons" Grid.Row="7" Grid.Column="3" Value="{Binding NumberOfIllPersons}" Margin="2" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</GroupBox>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="{x:Static p:Resources.textPortsOfCallLast30Days}" Name="tabPortsOfCallLast30Days">
|
||||||
|
<enictrl:ENIDataGrid Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" x:Name="dataGridPortOfCallLast30Days" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||||
|
SelectionMode="Single" AutoGenerateColumns="False" Margin="0,5,0,0">
|
||||||
|
<DataGrid.Columns>
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textPortCall}" Binding="{Binding PortOfCallLast30DaysLocode, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textATDPortOfCall}" Binding="{Binding PortOfCallLast30DaysDateOfDeparture, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
||||||
|
|
||||||
|
<DataGridTemplateColumn IsReadOnly="True" Width="0.1*">
|
||||||
|
<DataGridTemplateColumn.HeaderTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock TextWrapping="Wrap" Text="{x:Static p:Resources.textCrewMemberJoinTheShip}" FontSize="10"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.HeaderTemplate>
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock TextAlignment="Center" Text="{Binding PortOfCallLast30DaysCrewMembersJoined}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textCrewMembersJoinedGrid}" Binding="{Binding CrewMembersJoinedText, Mode=TwoWay}" IsReadOnly="True" Width="0.4*" />
|
||||||
|
</DataGrid.Columns>
|
||||||
|
</enictrl:ENIDataGrid>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="{x:Static p:Resources.textVisitsInfectedAreas}" Name="tabInfectedAreas">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="3*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="28"/>
|
||||||
|
<RowDefinition Height="200"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textShipVisitedInfectedArea}" Name="labelHasShipVisited" Margin="0,0,10,0"/>
|
||||||
|
<CheckBox Name="checkBoxHasShipVisited" IsChecked="{Binding MDHSimplification}" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
|
||||||
|
<enictrl:ENIDataGrid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" x:Name="dataGridInfectedAreas" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||||
|
SelectionMode="Single" AutoGenerateColumns="False" Margin="0,5,0,0">
|
||||||
|
<DataGrid.Columns>
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textInfectedAreaPort}" Binding="{Binding InfectedAreaPort, Mode=TwoWay}" IsReadOnly="True" Width="0.5*" />
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textInfectedAreaPort}" Binding="{Binding InfectedAreaDate, Mode=TwoWay}" IsReadOnly="True" Width="0.5*" />
|
||||||
|
</DataGrid.Columns>
|
||||||
|
</enictrl:ENIDataGrid>
|
||||||
|
</Grid>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="{x:Static p:Resources.textSanitaryMeasuresApplied}" Name="tabSanitaryMeasuresApplied">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="3*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="28"/>
|
||||||
|
<RowDefinition Height="200"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textAnySanitaryMeasures}" Name="labelSanitaryMeasuresApplied" Margin="0,0,10,0"/>
|
||||||
|
<CheckBox Name="checkBoxSanitaryMeasuresApplied" IsChecked="{Binding SanitaryMeasuresApplied}" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
|
||||||
|
<enictrl:ENIDataGrid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" x:Name="dataGridSanitaryMeasures" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||||
|
SelectionMode="Single" AutoGenerateColumns="False" Margin="0,5,0,0">
|
||||||
|
<DataGrid.Columns>
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textSanitaryMeasureKind}" Binding="{Binding SanitaryMeasuresType, Mode=TwoWay}" IsReadOnly="True" Width="0.3*" />
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textSanitaryMeasurePlace}" Binding="{Binding SanitaryMeasuresLocation, Mode=TwoWay}" IsReadOnly="True" Width="0.3*" />
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textSanitaryMeasureDate}" Binding="{Binding SanitaryMeasuresDate, Mode=TwoWay}" IsReadOnly="True" Width="0.3*" />
|
||||||
|
</DataGrid.Columns>
|
||||||
|
</enictrl:ENIDataGrid>
|
||||||
|
</Grid>
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
</src:DetailBaseControl>
|
</src:DetailBaseControl>
|
||||||
|
|||||||
@ -1,21 +1,13 @@
|
|||||||
// Copyright (c) 2017 schick Informatik
|
// Copyright (c) 2017 schick Informatik
|
||||||
// Description:
|
// Description: MDH Meldung Bearbeitungsseite
|
||||||
//
|
//
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Data;
|
using ENI2.EditControls;
|
||||||
using System.Windows.Documents;
|
|
||||||
using System.Windows.Input;
|
using bsmd.database;
|
||||||
using System.Windows.Media;
|
|
||||||
using System.Windows.Media.Imaging;
|
|
||||||
using System.Windows.Navigation;
|
|
||||||
using System.Windows.Shapes;
|
|
||||||
|
|
||||||
namespace ENI2.DetailViewControls
|
namespace ENI2.DetailViewControls
|
||||||
{
|
{
|
||||||
@ -24,9 +16,298 @@ namespace ENI2.DetailViewControls
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class MaritimeHealthDeclarationDetailControl : DetailBaseControl
|
public partial class MaritimeHealthDeclarationDetailControl : DetailBaseControl
|
||||||
{
|
{
|
||||||
|
private Message _mdhMessage;
|
||||||
|
private MDH _mdh;
|
||||||
|
|
||||||
public MaritimeHealthDeclarationDetailControl()
|
public MaritimeHealthDeclarationDetailControl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
Loaded += MaritimeHealthDeclarationDetailControl_Loaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
base.Initialize();
|
||||||
|
|
||||||
|
foreach (Message aMessage in this.Messages)
|
||||||
|
{
|
||||||
|
if (aMessage.MessageNotificationClass == Message.NotificationClass.MDH) { this._mdhMessage = aMessage; this.ControlMessages.Add(aMessage); }
|
||||||
|
}
|
||||||
|
|
||||||
|
#region init MDH
|
||||||
|
|
||||||
|
if (this._mdhMessage == null)
|
||||||
|
{
|
||||||
|
this._mdhMessage = this.Core.CreateMessage(Message.NotificationClass.MDH);
|
||||||
|
this.Messages.Add(this._mdhMessage);
|
||||||
|
}
|
||||||
|
|
||||||
|
MDH mdh = null;
|
||||||
|
if (this._mdhMessage.Elements.Count > 0)
|
||||||
|
mdh = this._mdhMessage.Elements[0] as MDH;
|
||||||
|
if (mdh == null)
|
||||||
|
{
|
||||||
|
mdh = new MDH();
|
||||||
|
mdh.MessageCore = this.Core;
|
||||||
|
mdh.MessageHeader = this._mdhMessage;
|
||||||
|
_mdhMessage.Elements.Add(mdh);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.portCallGroupBox.DataContext = mdh;
|
||||||
|
this._mdh = mdh;
|
||||||
|
|
||||||
|
this.dataGridPortOfCallLast30Days.Initialize();
|
||||||
|
this.dataGridPortOfCallLast30Days.ItemsSource = mdh.PortOfCallLast30Days;
|
||||||
|
this.dataGridPortOfCallLast30Days.AddingNewItem += DataGridPortOfCallLast30Days_AddingNewItem;
|
||||||
|
this.dataGridPortOfCallLast30Days.EditRequested += DataGridPortOfCallLast30Days_EditRequested;
|
||||||
|
this.dataGridPortOfCallLast30Days.DeleteRequested += DataGridPortOfCallLast30Days_DeleteRequested;
|
||||||
|
this.dataGridPortOfCallLast30Days.CreateRequested += DataGridPortOfCallLast30Days_CreateRequested;
|
||||||
|
|
||||||
|
this.dataGridInfectedAreas.Initialize();
|
||||||
|
this.dataGridInfectedAreas.ItemsSource = mdh.InfectedAreas;
|
||||||
|
this.dataGridInfectedAreas.AddingNewItem += DataGridInfectedAreas_AddingNewItem;
|
||||||
|
this.dataGridInfectedAreas.EditRequested += DataGridInfectedAreas_EditRequested;
|
||||||
|
this.dataGridInfectedAreas.DeleteRequested += DataGridInfectedAreas_DeleteRequested;
|
||||||
|
this.dataGridInfectedAreas.CreateRequested += DataGridInfectedAreas_CreateRequested;
|
||||||
|
|
||||||
|
this.dataGridSanitaryMeasures.Initialize();
|
||||||
|
this.dataGridSanitaryMeasures.ItemsSource = mdh.SanitaryMeasuresDetails;
|
||||||
|
this.dataGridSanitaryMeasures.AddingNewItem += DataGridSanitaryMeasures_AddingNewItem;
|
||||||
|
this.dataGridSanitaryMeasures.EditRequested += DataGridSanitaryMeasures_EditRequested;
|
||||||
|
this.dataGridSanitaryMeasures.DeleteRequested += DataGridSanitaryMeasures_DeleteRequested;
|
||||||
|
this.dataGridSanitaryMeasures.CreateRequested += DataGridSanitaryMeasures_CreateRequested;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MaritimeHealthDeclarationDetailControl_Loaded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
this.RegisterCheckboxChange(this.checkBoxAwareOfConditions, Message.NotificationClass.MDH);
|
||||||
|
this.RegisterCheckboxChange(this.checkBoxHasShipVisited, Message.NotificationClass.MDH);
|
||||||
|
this.RegisterCheckboxChange(this.checkBoxHavePersonsDied, Message.NotificationClass.MDH);
|
||||||
|
this.RegisterCheckboxChange(this.checkBoxIsSuspectedInfectious, Message.NotificationClass.MDH);
|
||||||
|
this.RegisterCheckboxChange(this.checkBoxReinspectionSanitary, Message.NotificationClass.MDH);
|
||||||
|
this.RegisterCheckboxChange(this.checkBoxSanitaryControlExemption, Message.NotificationClass.MDH);
|
||||||
|
this.RegisterCheckboxChange(this.checkBoxSanitaryMeasuresApplied, Message.NotificationClass.MDH);
|
||||||
|
this.RegisterCheckboxChange(this.checkBoxSickAnimalsOrPets, Message.NotificationClass.MDH);
|
||||||
|
this.RegisterCheckboxChange(this.checkBoxSickPersonsOnBoard, Message.NotificationClass.MDH);
|
||||||
|
this.RegisterCheckboxChange(this.checkBoxStowawaysOnBoard, Message.NotificationClass.MDH);
|
||||||
|
this.RegisterCheckboxChange(this.checkBoxTotalNumberSickHigherThan, Message.NotificationClass.MDH);
|
||||||
|
this.RegisterCheckboxChange(this.checkBoxWasMedicalConsulted, Message.NotificationClass.MDH);
|
||||||
|
this.RegisterCheckboxChange(this.checkSimplification, Message.NotificationClass.MDH);
|
||||||
|
this.RegisterLocodeChange(this.locodePortWhereHealthDeclarationWasGiven, Message.NotificationClass.MDH);
|
||||||
|
this.RegisterIntegerUpDownChange(this.integerUpDownNumberOfDeaths, Message.NotificationClass.MDH);
|
||||||
|
this.RegisterIntegerUpDownChange(this.integerUpDownNumberOfIllPersons, Message.NotificationClass.MDH);
|
||||||
|
this.RegisterTextboxChange(this.textBoxPlaceOfIssue, Message.NotificationClass.MDH);
|
||||||
|
this.RegisterTextboxChange(this.textBoxStowawaysJoiningLocation, Message.NotificationClass.MDH);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#region SanitaryMeasures Grid
|
||||||
|
|
||||||
|
private void DataGridSanitaryMeasures_CreateRequested()
|
||||||
|
{
|
||||||
|
SanitaryMeasuresDetail smDetail = new SanitaryMeasuresDetail();
|
||||||
|
EditSanitaryMeasureDialog epd = new EditSanitaryMeasureDialog();
|
||||||
|
epd.SanitaryMeasureDetail = smDetail;
|
||||||
|
|
||||||
|
epd.AddClicked += () =>
|
||||||
|
{
|
||||||
|
epd.CopyValuesToEntity();
|
||||||
|
epd.SanitaryMeasureDetail.MDH = this._mdh;
|
||||||
|
this._mdh.SanitaryMeasuresDetails.Add(epd.SanitaryMeasureDetail);
|
||||||
|
this.dataGridSanitaryMeasures.Items.Refresh();
|
||||||
|
epd.SanitaryMeasureDetail = new SanitaryMeasuresDetail();
|
||||||
|
this.SublistElementChanged(Message.NotificationClass.MDH);
|
||||||
|
};
|
||||||
|
|
||||||
|
if (epd.ShowDialog() ?? false)
|
||||||
|
{
|
||||||
|
_mdh.SanitaryMeasuresDetails.Add(epd.SanitaryMeasureDetail);
|
||||||
|
epd.SanitaryMeasureDetail.MDH = this._mdh;
|
||||||
|
this.dataGridSanitaryMeasures.Items.Refresh();
|
||||||
|
this.SublistElementChanged(Message.NotificationClass.MDH);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DataGridSanitaryMeasures_DeleteRequested(DatabaseEntity obj)
|
||||||
|
{
|
||||||
|
SanitaryMeasuresDetail smd = obj as SanitaryMeasuresDetail;
|
||||||
|
if (smd != null)
|
||||||
|
{
|
||||||
|
// are you sure dialog is in base class
|
||||||
|
_mdh.SanitaryMeasuresDetails.Remove(smd);
|
||||||
|
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Delete(smd);
|
||||||
|
this.dataGridSanitaryMeasures.Items.Refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DataGridSanitaryMeasures_EditRequested(DatabaseEntity obj)
|
||||||
|
{
|
||||||
|
EditSanitaryMeasureDialog ecpd = new EditSanitaryMeasureDialog();
|
||||||
|
ecpd.SanitaryMeasureDetail = obj as SanitaryMeasuresDetail;
|
||||||
|
ecpd.AddClicked += () =>
|
||||||
|
{
|
||||||
|
ecpd.CopyValuesToEntity();
|
||||||
|
if (!_mdh.SanitaryMeasuresDetails.Contains(ecpd.SanitaryMeasureDetail))
|
||||||
|
_mdh.SanitaryMeasuresDetails.Add(ecpd.SanitaryMeasureDetail);
|
||||||
|
this.dataGridSanitaryMeasures.Items.Refresh();
|
||||||
|
ecpd.SanitaryMeasureDetail = new SanitaryMeasuresDetail();
|
||||||
|
};
|
||||||
|
if (ecpd.ShowDialog() ?? false)
|
||||||
|
{
|
||||||
|
if (!_mdh.SanitaryMeasuresDetails.Contains(ecpd.SanitaryMeasureDetail))
|
||||||
|
_mdh.SanitaryMeasuresDetails.Add(ecpd.SanitaryMeasureDetail);
|
||||||
|
this.dataGridSanitaryMeasures.Items.Refresh();
|
||||||
|
// signal up
|
||||||
|
this.SublistElementChanged(Message.NotificationClass.MDH);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DataGridSanitaryMeasures_AddingNewItem(object sender, AddingNewItemEventArgs e)
|
||||||
|
{
|
||||||
|
this.DataGridSanitaryMeasures_CreateRequested();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region InfectedAreas Grid
|
||||||
|
|
||||||
|
private void DataGridInfectedAreas_CreateRequested()
|
||||||
|
{
|
||||||
|
InfectedArea ia = new InfectedArea();
|
||||||
|
EditInfectedAreaDialog epd = new EditInfectedAreaDialog();
|
||||||
|
epd.InfectedArea = ia;
|
||||||
|
|
||||||
|
epd.AddClicked += () =>
|
||||||
|
{
|
||||||
|
epd.CopyValuesToEntity();
|
||||||
|
epd.InfectedArea.MDH = this._mdh;
|
||||||
|
this._mdh.InfectedAreas.Add(epd.InfectedArea);
|
||||||
|
this.dataGridInfectedAreas.Items.Refresh();
|
||||||
|
epd.InfectedArea = new InfectedArea();
|
||||||
|
this.SublistElementChanged(Message.NotificationClass.MDH);
|
||||||
|
};
|
||||||
|
|
||||||
|
if (epd.ShowDialog() ?? false)
|
||||||
|
{
|
||||||
|
_mdh.InfectedAreas.Add(epd.InfectedArea);
|
||||||
|
epd.InfectedArea.MDH = this._mdh;
|
||||||
|
this.dataGridInfectedAreas.Items.Refresh();
|
||||||
|
this.SublistElementChanged(Message.NotificationClass.MDH);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DataGridInfectedAreas_DeleteRequested(DatabaseEntity obj)
|
||||||
|
{
|
||||||
|
InfectedArea ia = obj as InfectedArea;
|
||||||
|
if (ia != null)
|
||||||
|
{
|
||||||
|
// are you sure dialog is in base class
|
||||||
|
_mdh.InfectedAreas.Remove(ia);
|
||||||
|
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Delete(ia);
|
||||||
|
this.dataGridInfectedAreas.Items.Refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DataGridInfectedAreas_EditRequested(DatabaseEntity obj)
|
||||||
|
{
|
||||||
|
EditInfectedAreaDialog ecpd = new EditInfectedAreaDialog();
|
||||||
|
ecpd.InfectedArea = obj as InfectedArea;
|
||||||
|
ecpd.AddClicked += () =>
|
||||||
|
{
|
||||||
|
ecpd.CopyValuesToEntity();
|
||||||
|
if (!_mdh.InfectedAreas.Contains(ecpd.InfectedArea))
|
||||||
|
_mdh.InfectedAreas.Add(ecpd.InfectedArea);
|
||||||
|
this.dataGridInfectedAreas.Items.Refresh();
|
||||||
|
ecpd.InfectedArea= new InfectedArea();
|
||||||
|
};
|
||||||
|
if (ecpd.ShowDialog() ?? false)
|
||||||
|
{
|
||||||
|
if (!_mdh.InfectedAreas.Contains(ecpd.InfectedArea))
|
||||||
|
_mdh.InfectedAreas.Add(ecpd.InfectedArea);
|
||||||
|
this.dataGridInfectedAreas.Items.Refresh();
|
||||||
|
// signal up
|
||||||
|
this.SublistElementChanged(Message.NotificationClass.MDH);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DataGridInfectedAreas_AddingNewItem(object sender, AddingNewItemEventArgs e)
|
||||||
|
{
|
||||||
|
this.DataGridInfectedAreas_CreateRequested();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region PortOfCallLast30Days grid
|
||||||
|
|
||||||
|
private void DataGridPortOfCallLast30Days_CreateRequested()
|
||||||
|
{
|
||||||
|
PortOfCallLast30Days poc30 = new PortOfCallLast30Days();
|
||||||
|
EditPortOfCallLast30DaysDialog epd = new EditPortOfCallLast30DaysDialog();
|
||||||
|
epd.PocLast30Days = poc30;
|
||||||
|
|
||||||
|
epd.AddClicked += () =>
|
||||||
|
{
|
||||||
|
epd.CopyValuesToEntity();
|
||||||
|
epd.PocLast30Days.MDH = this._mdh;
|
||||||
|
this._mdh.PortOfCallLast30Days.Add(epd.PocLast30Days);
|
||||||
|
this.dataGridPortOfCallLast30Days.Items.Refresh();
|
||||||
|
epd.PocLast30Days = new PortOfCallLast30Days();
|
||||||
|
this.SublistElementChanged(Message.NotificationClass.MDH);
|
||||||
|
};
|
||||||
|
|
||||||
|
if (epd.ShowDialog() ?? false)
|
||||||
|
{
|
||||||
|
_mdh.PortOfCallLast30Days.Add(epd.PocLast30Days);
|
||||||
|
epd.PocLast30Days.MDH = this._mdh;
|
||||||
|
this.dataGridPortOfCallLast30Days.Items.Refresh();
|
||||||
|
this.SublistElementChanged(Message.NotificationClass.MDH);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DataGridPortOfCallLast30Days_DeleteRequested(DatabaseEntity obj)
|
||||||
|
{
|
||||||
|
PortOfCallLast30Days poc30d = obj as PortOfCallLast30Days;
|
||||||
|
if (poc30d != null)
|
||||||
|
{
|
||||||
|
// are you sure dialog is in base class
|
||||||
|
_mdh.PortOfCallLast30Days.Remove(poc30d);
|
||||||
|
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Delete(poc30d);
|
||||||
|
this.dataGridPortOfCallLast30Days.Items.Refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DataGridPortOfCallLast30Days_EditRequested(DatabaseEntity obj)
|
||||||
|
{
|
||||||
|
EditPortOfCallLast30DaysDialog ecpd = new EditPortOfCallLast30DaysDialog();
|
||||||
|
ecpd.PocLast30Days = obj as PortOfCallLast30Days;
|
||||||
|
ecpd.AddClicked += () =>
|
||||||
|
{
|
||||||
|
ecpd.CopyValuesToEntity();
|
||||||
|
if (!_mdh.PortOfCallLast30Days.Contains(ecpd.PocLast30Days))
|
||||||
|
_mdh.PortOfCallLast30Days.Add(ecpd.PocLast30Days);
|
||||||
|
this.dataGridPortOfCallLast30Days.Items.Refresh();
|
||||||
|
ecpd.PocLast30Days = new PortOfCallLast30Days();
|
||||||
|
};
|
||||||
|
if (ecpd.ShowDialog() ?? false)
|
||||||
|
{
|
||||||
|
if (!_mdh.PortOfCallLast30Days.Contains(ecpd.PocLast30Days))
|
||||||
|
_mdh.PortOfCallLast30Days.Add(ecpd.PocLast30Days);
|
||||||
|
this.dataGridPortOfCallLast30Days.Items.Refresh();
|
||||||
|
// signal up
|
||||||
|
this.SublistElementChanged(Message.NotificationClass.MDH);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DataGridPortOfCallLast30Days_AddingNewItem(object sender, AddingNewItemEventArgs e)
|
||||||
|
{
|
||||||
|
this.DataGridPortOfCallLast30Days_CreateRequested();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -109,7 +109,7 @@ namespace ENI2.DetailViewControls
|
|||||||
{
|
{
|
||||||
// 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);
|
||||||
// DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Delete(cp); // not yet
|
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Delete(cp);
|
||||||
this.dataGridCallPurposes.Items.Refresh();
|
this.dataGridCallPurposes.Items.Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -172,7 +172,7 @@ namespace ENI2.DetailViewControls
|
|||||||
{
|
{
|
||||||
// are you sure dialog is in base class
|
// are you sure dialog is in base class
|
||||||
this._ladgMessage.Elements.Remove(ladg);
|
this._ladgMessage.Elements.Remove(ladg);
|
||||||
// DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Delete(ladg); // not yet
|
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Delete(ladg);
|
||||||
this.dataGridLADG.Items.Refresh();
|
this.dataGridLADG.Items.Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -216,7 +216,7 @@ namespace ENI2.DetailViewControls
|
|||||||
{
|
{
|
||||||
// are you sure dialog is in base class
|
// are you sure dialog is in base class
|
||||||
_servMessage.Elements.Remove(serv);
|
_servMessage.Elements.Remove(serv);
|
||||||
// DBManager.Instance.Delete(serv); // not yet
|
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Delete(serv);
|
||||||
this.dataGridSERV.Items.Refresh();
|
this.dataGridSERV.Items.Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,11 +3,138 @@
|
|||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:enictrl="clr-namespace:ENI2.Controls"
|
||||||
|
xmlns:p="clr-namespace:ENI2.Properties"
|
||||||
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||||
xmlns:local="clr-namespace:ENI2.DetailViewControls"
|
xmlns:local="clr-namespace:ENI2.DetailViewControls"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="300" d:DesignWidth="300">
|
d:DesignHeight="600" d:DesignWidth="1024">
|
||||||
<Grid>
|
<TabControl Margin="10" Name="mainFrame">
|
||||||
|
<TabItem Header="{x:Static p:Resources.textSecurityNotification}" Name="tabSecurityNotification">
|
||||||
</Grid>
|
<GroupBox Name="portCallGroupBox" Header="{x:Static p:Resources.textSEC}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
</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" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textKielPassagePlanned}" Name="label_KielPassagePlanned" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textIncomingETANOK}" Name="label_IncomingETANOK" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="2" Content="{x:Static p:Resources.textOutgoingETANOK}" Name="label_OutgoingETANOK" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textCurrentShipSecLevel}" Name="label_CurrentShipSecLevel" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textSimplificationAvailable}" Name="label_SimplificationAvailable" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="6" Grid.Column="0" Content="{x:Static p:Resources.textPortWhereSimplWasGiven}" Name="label_PortWhereSimplWasGiven" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="7" Grid.Column="0" Content="{x:Static p:Resources.textChiefSecurityOfficer}" Name="label_ChiefSecurityOfficer" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="8" Grid.Column="0" Content="{x:Static p:Resources.textFirstName}" Name="label_FirstName" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="8" Grid.Column="2" Content="{x:Static p:Resources.textLastName}" Name="label_LastName" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="9" Grid.Column="0" Content="{x:Static p:Resources.textPhone}" Name="label_Phone" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="10" Grid.Column="0" Content="{x:Static p:Resources.textEMail}" Name="label_EMail" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="9" Grid.Column="2" Content="{x:Static p:Resources.textFax}" Name="label_Fax" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="12" Grid.Column="0" Content="{x:Static p:Resources.textISSC}" Name="label_ISSC" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="13" Grid.Column="0" Content="{x:Static p:Resources.textValidISSCOnBoard}" Name="label_ValidISSCOnBoard" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="14" Grid.Column="0" Content="{x:Static p:Resources.textISSCType}" Name="label_ISSCType" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="15" Grid.Column="0" Content="{x:Static p:Resources.textISSCExpirationDate}" Name="label_ISSCExpirationDate" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="17" Grid.Column="0" Content="{x:Static p:Resources.textApprovedSecPlan}" Name="label_ApprovedSecPlan" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="18" Grid.Column="0" Content="{x:Static p:Resources.textPortFacilityOfArrival}" Name="label_PortFacilityOfArrival" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="13" Grid.Column="2" Content="{x:Static p:Resources.textReasonForInvalidISSC}" Name="label_ReasonForInvalidISSC" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="14" Grid.Column="2" Content="{x:Static p:Resources.textISSCIssuerType}" Name="label_ISSCIssuerType" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="15" Grid.Column="2" Content="{x:Static p:Resources.textISSCIssuerName}" Name="label_ISSCIssuerName" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="18" Grid.Column="2" Content="{x:Static p:Resources.textGeneralCargoDescription}" Name="label_GeneralCargoDescription" Margin="0,0,10,0"/>
|
||||||
|
|
||||||
|
<CheckBox Name="checkBoxKielCanalPassagePlanned" IsChecked="{Binding KielCanalPassagePlanned}" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
|
||||||
|
<CheckBox Name="checkBoxSECSimplification" IsChecked="{Binding SECSimplification}" Grid.Row="5" Grid.Column="1" VerticalAlignment="Center"/>
|
||||||
|
<CheckBox Name="checkBoxValidISSCOnBoard" IsChecked="{Binding ValidISSCOnBoard}" Grid.Row="13" Grid.Column="1" VerticalAlignment="Center"/>
|
||||||
|
<CheckBox Name="checkBoxApprovedSecurityPlanOnBoard" IsChecked="{Binding ApprovedSecurityPlanOnBoard}" Grid.Row="17" Grid.Column="1" VerticalAlignment="Center"/>
|
||||||
|
|
||||||
|
<TextBox Name="textBoxCSOFirstName" Grid.Row="8" Grid.Column="1" MaxLength="100" Text="{Binding CSOFirstName}" Margin="2" />
|
||||||
|
<TextBox Name="textBoxCSOLastName" Grid.Row="8" Grid.Column="3" MaxLength="100" Text="{Binding CSOLastName}" Margin="2" />
|
||||||
|
<TextBox Name="textBoxCSOPhoneName" Grid.Row="9" Grid.Column="1" MaxLength="100" Text="{Binding CSOPhone}" Margin="2" />
|
||||||
|
<TextBox Name="textBoxCSOFaxName" Grid.Row="9" Grid.Column="3" MaxLength="100" Text="{Binding CSOFax}" Margin="2" />
|
||||||
|
<TextBox Name="textBoxCSOEMailName" Grid.Row="10" Grid.Column="1" MaxLength="100" Text="{Binding CSOEMail}" Margin="2" />
|
||||||
|
<TextBox Name="textBoxReasonsForNoValidISSC" Grid.Row="13" Grid.Column="3" MaxLength="255" Text="{Binding ReasonsForNoValidISSC}" Margin="2" />
|
||||||
|
<TextBox Name="textBoxISSCIssuerName" Grid.Row="15" Grid.Column="3" MaxLength="100" Text="{Binding ISSCIssuerName}" Margin="2" />
|
||||||
|
<TextBox Name="textBoxPortFacilityOfArrival" Grid.Row="18" Grid.Column="1" MaxLength="100" Text="{Binding PortFacilityOfArrival}" Margin="2" />
|
||||||
|
|
||||||
|
<xctk:DateTimePicker Name="dateTimePickerKielCanalPassagePlannedIncomming" Grid.Row="1" Grid.Column="1" Value="{Binding KielCanalPassagePlannedIncomming}" Margin="2" />
|
||||||
|
<xctk:DateTimePicker Name="dateTimePickerKielCanalPassagePlannedOutgoing" Grid.Row="1" Grid.Column="3" Value="{Binding KielCanalPassagePlannedOutgoing}" Margin="2" />
|
||||||
|
|
||||||
|
<ComboBox Name="comboBoxCurrentShipSecurityLevel" Grid.Row="3" Grid.Column="1" SelectedIndex="{Binding CurrentShipSecurityLevel}" Margin="2" />
|
||||||
|
<ComboBox Name="comboBoxISSCType" Grid.Row="14" Grid.Column="1" SelectedIndex="{Binding ISSCType}" Margin="2" />
|
||||||
|
<ComboBox Name="comboBoxISSCIssuerType" Grid.Row="14" Grid.Column="3" SelectedIndex="{Binding ISSCIssuerType}" Margin="2" />
|
||||||
|
<ComboBox Name="comboBoxGeneralDescriptionOfCargo" Grid.Row="18" Grid.Column="3" SelectedIndex="{Binding GeneralDescriptionOfCargo}" Margin="2" />
|
||||||
|
|
||||||
|
<DatePicker Name="datePickerISSCDateOfExpiration" Grid.Row="15" Grid.Column="1" SelectedDate="{Binding ISSCDateOfExpiration}" Margin="2" />
|
||||||
|
|
||||||
|
<enictrl:LocodeControl x:Name="locodePortOfCallWhereCompleteSECNotified" Grid.Row="6" Grid.Column="1" LocodeValue="{Binding PortOfCallWhereCompleteSECNotified}" />
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</GroupBox>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="{x:Static p:Resources.textLast10PortFacilities}" Name="tabLast10PortFacilites">
|
||||||
|
<enictrl:ENIDataGrid Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" x:Name="dataGridLast10PortFacilities" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||||
|
SelectionMode="Single" AutoGenerateColumns="False" Margin="0,5,0,0">
|
||||||
|
<DataGrid.Columns>
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textPortname}" Binding="{Binding PortFacilityPortName, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textPortLocode}" Binding="{Binding PortFacilityPortLoCode, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textPortCountry}" Binding="{Binding PortFacilityPortCountry}" IsReadOnly="True" Width="0.1*" />
|
||||||
|
<DataGridTextColumn Header="ATA" Binding="{Binding PortFacilityDateOfArrival, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
||||||
|
<DataGridTextColumn Header="ATD" Binding="{Binding PortFacilityDateOfDeparture, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
||||||
|
<DataGridTemplateColumn IsReadOnly="True" Width="0.1*">
|
||||||
|
<DataGridTemplateColumn.HeaderTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock TextWrapping="Wrap" Text="{x:Static p:Resources.textGISISCode}" FontSize="10"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.HeaderTemplate>
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock TextAlignment="Center" Text="{Binding PortFacilityGISISCode}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textShipSecLevel}" Binding="{Binding PortFacilityShipSecurityLevel, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textSecurityMatters}" Binding="{Binding PortFacilitySecurityMattersToReport}" IsReadOnly="True" Width="0.2*" />
|
||||||
|
</DataGrid.Columns>
|
||||||
|
</enictrl:ENIDataGrid>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="{x:Static p:Resources.textShipToShip}" Name="tabShipToShip">
|
||||||
|
<enictrl:ENIDataGrid Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" x:Name="dataGridShip2ShipActivities" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||||
|
SelectionMode="Single" AutoGenerateColumns="False" Margin="0,5,0,0">
|
||||||
|
<DataGrid.Columns>
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textLocationName}" Binding="{Binding ShipToShipActivityLocationName, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textLocationLocode}" Binding="{Binding ShipToShipActivityLocationLoCode, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textDateFrom}" Binding="{Binding ShipToShipActivityDateFrom}" IsReadOnly="True" Width="0.1*" />
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textDateTo}" Binding="{Binding ShipToShipActivityDateTo, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textActivityType}" Binding="{Binding ShipToShipActivityType, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textSecurityMatters}" Binding="{Binding ShipToShipActivitySecurityMattersToReport, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textLatitudeDecimal}" Binding="{Binding ShipToShipActivityLocationCoordinatesLatitude, StringFormat={}{0:N0}}" IsReadOnly="True" Width="0.1*" />
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textLongitudeDecimal}" Binding="{Binding ShipToShipActivityLocationCoordinatesLongitude, StringFormat={}{0:N0}}" IsReadOnly="True" Width="0.1*" />
|
||||||
|
</DataGrid.Columns>
|
||||||
|
</enictrl:ENIDataGrid>
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
</src:DetailBaseControl>
|
</src:DetailBaseControl>
|
||||||
|
|||||||
@ -1,21 +1,12 @@
|
|||||||
// Copyright (c) 2017 schick Informatik
|
// Copyright (c) 2017 schick Informatik
|
||||||
// Description:
|
// Description: SEC Meldung Bearbeitungsseite
|
||||||
//
|
//
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Data;
|
using ENI2.EditControls;
|
||||||
using System.Windows.Documents;
|
|
||||||
using System.Windows.Input;
|
using bsmd.database;
|
||||||
using System.Windows.Media;
|
|
||||||
using System.Windows.Media.Imaging;
|
|
||||||
using System.Windows.Navigation;
|
|
||||||
using System.Windows.Shapes;
|
|
||||||
|
|
||||||
namespace ENI2.DetailViewControls
|
namespace ENI2.DetailViewControls
|
||||||
{
|
{
|
||||||
@ -24,9 +15,282 @@ namespace ENI2.DetailViewControls
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class SecurityDetailControl : DetailBaseControl
|
public partial class SecurityDetailControl : DetailBaseControl
|
||||||
{
|
{
|
||||||
|
private Message _secMessage;
|
||||||
|
private SEC _sec;
|
||||||
|
|
||||||
|
private static string[] isscTypes = { "Final", "Preliminary" };
|
||||||
|
private static string[] isscIssuerTypes = { "Authority", "RSO (Recognized security org.)" };
|
||||||
|
private static string[] cargoDescriptions = {
|
||||||
|
"Container",
|
||||||
|
"Vehicles",
|
||||||
|
"Conventional general cargo",
|
||||||
|
"Dry bulk cargo",
|
||||||
|
"Liquid bulk cargo",
|
||||||
|
"In ballast"
|
||||||
|
};
|
||||||
|
|
||||||
public SecurityDetailControl()
|
public SecurityDetailControl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
Loaded += SecurityDetailControl_Loaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
base.Initialize();
|
||||||
|
|
||||||
|
foreach (Message aMessage in this.Messages)
|
||||||
|
{
|
||||||
|
if (aMessage.MessageNotificationClass == Message.NotificationClass.SEC) { this._secMessage = aMessage; this.ControlMessages.Add(aMessage); }
|
||||||
|
}
|
||||||
|
|
||||||
|
#region init SEC
|
||||||
|
|
||||||
|
if (this._secMessage == null)
|
||||||
|
{
|
||||||
|
this._secMessage = this.Core.CreateMessage(Message.NotificationClass.SEC);
|
||||||
|
this.Messages.Add(this._secMessage);
|
||||||
|
}
|
||||||
|
|
||||||
|
SEC sec = null;
|
||||||
|
if (this._secMessage.Elements.Count > 0)
|
||||||
|
sec = this._secMessage.Elements[0] as SEC;
|
||||||
|
if (sec == null)
|
||||||
|
{
|
||||||
|
sec = new SEC();
|
||||||
|
sec.MessageCore = this.Core;
|
||||||
|
sec.MessageHeader = this._secMessage;
|
||||||
|
_secMessage.Elements.Add(sec);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.portCallGroupBox.DataContext = sec;
|
||||||
|
this._sec = sec;
|
||||||
|
|
||||||
|
this.comboBoxCurrentShipSecurityLevel.ItemsSource = Util.GlobalStructures.ShipSecurityLevels;
|
||||||
|
this.comboBoxISSCType.ItemsSource = isscTypes;
|
||||||
|
this.comboBoxISSCIssuerType.ItemsSource = isscIssuerTypes;
|
||||||
|
this.comboBoxGeneralDescriptionOfCargo.ItemsSource = cargoDescriptions;
|
||||||
|
|
||||||
|
this.dataGridLast10PortFacilities.Initialize();
|
||||||
|
this.dataGridLast10PortFacilities.ItemsSource = sec.LastTenPortFacilitesCalled;
|
||||||
|
|
||||||
|
this.dataGridLast10PortFacilities.AddingNewItem += DataGridLast10PortFacilities_AddingNewItem;
|
||||||
|
this.dataGridLast10PortFacilities.EditRequested += DataGridLast10PortFacilities_EditRequested;
|
||||||
|
this.dataGridLast10PortFacilities.DeleteRequested += DataGridLast10PortFacilities_DeleteRequested;
|
||||||
|
this.dataGridLast10PortFacilities.CreateRequested += DataGridLast10PortFacilities_CreateRequested;
|
||||||
|
|
||||||
|
this.dataGridShip2ShipActivities.Initialize();
|
||||||
|
this.dataGridShip2ShipActivities.ItemsSource = sec.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled;
|
||||||
|
this.dataGridShip2ShipActivities.AddingNewItem += DataGridShip2ShipActivities_AddingNewItem;
|
||||||
|
this.dataGridShip2ShipActivities.EditRequested += DataGridShip2ShipActivities_EditRequested;
|
||||||
|
this.dataGridShip2ShipActivities.DeleteRequested += DataGridShip2ShipActivities_DeleteRequested;
|
||||||
|
this.dataGridShip2ShipActivities.CreateRequested += DataGridShip2ShipActivities_CreateRequested;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#region data grid ship 2 ship activities
|
||||||
|
|
||||||
|
private void DataGridShip2ShipActivities_CreateRequested()
|
||||||
|
{
|
||||||
|
ShipToShipActivitiesDuringLastTenPortFacilitiesCalled s2s = new ShipToShipActivitiesDuringLastTenPortFacilitiesCalled();
|
||||||
|
EditShip2ShipActivitiesDialog epd = new EditShip2ShipActivitiesDialog();
|
||||||
|
epd.ShipToShipActivity = s2s;
|
||||||
|
|
||||||
|
epd.AddClicked += () =>
|
||||||
|
{
|
||||||
|
epd.CopyValuesToEntity();
|
||||||
|
epd.ShipToShipActivity.SEC = this._sec;
|
||||||
|
this._sec.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled.Add(epd.ShipToShipActivity);
|
||||||
|
this.dataGridShip2ShipActivities.Items.Refresh();
|
||||||
|
epd.ShipToShipActivity = new ShipToShipActivitiesDuringLastTenPortFacilitiesCalled();
|
||||||
|
this.SublistElementChanged(Message.NotificationClass.SEC);
|
||||||
|
};
|
||||||
|
|
||||||
|
if (epd.ShowDialog() ?? false)
|
||||||
|
{
|
||||||
|
_sec.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled.Add(epd.ShipToShipActivity);
|
||||||
|
epd.ShipToShipActivity.SEC = this._sec;
|
||||||
|
this.dataGridShip2ShipActivities.Items.Refresh();
|
||||||
|
this.SublistElementChanged(Message.NotificationClass.SEC);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DataGridShip2ShipActivities_DeleteRequested(DatabaseEntity obj)
|
||||||
|
{
|
||||||
|
ShipToShipActivitiesDuringLastTenPortFacilitiesCalled s2s = obj as ShipToShipActivitiesDuringLastTenPortFacilitiesCalled;
|
||||||
|
if (s2s != null)
|
||||||
|
{
|
||||||
|
// are you sure dialog is in base class
|
||||||
|
_sec.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled.Remove(s2s);
|
||||||
|
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Delete(s2s);
|
||||||
|
this.dataGridShip2ShipActivities.Items.Refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DataGridShip2ShipActivities_EditRequested(DatabaseEntity obj)
|
||||||
|
{
|
||||||
|
EditShip2ShipActivitiesDialog ecpd = new EditShip2ShipActivitiesDialog();
|
||||||
|
ecpd.ShipToShipActivity = obj as ShipToShipActivitiesDuringLastTenPortFacilitiesCalled;
|
||||||
|
ecpd.AddClicked += () =>
|
||||||
|
{
|
||||||
|
ecpd.CopyValuesToEntity();
|
||||||
|
if (!_sec.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled.Contains(ecpd.ShipToShipActivity))
|
||||||
|
_sec.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled.Add(ecpd.ShipToShipActivity);
|
||||||
|
this.dataGridShip2ShipActivities.Items.Refresh();
|
||||||
|
ecpd.ShipToShipActivity = new ShipToShipActivitiesDuringLastTenPortFacilitiesCalled();
|
||||||
|
};
|
||||||
|
if (ecpd.ShowDialog() ?? false)
|
||||||
|
{
|
||||||
|
if (!_sec.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled.Contains(ecpd.ShipToShipActivity))
|
||||||
|
_sec.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled.Add(ecpd.ShipToShipActivity);
|
||||||
|
this.dataGridShip2ShipActivities.Items.Refresh();
|
||||||
|
// signal up
|
||||||
|
this.SublistElementChanged(Message.NotificationClass.SEC);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DataGridShip2ShipActivities_AddingNewItem(object sender, AddingNewItemEventArgs e)
|
||||||
|
{
|
||||||
|
this.DataGridShip2ShipActivities_CreateRequested();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region data grid last 10 port facilities
|
||||||
|
|
||||||
|
private void DataGridLast10PortFacilities_CreateRequested()
|
||||||
|
{
|
||||||
|
LastTenPortFacilitiesCalled l10c = new LastTenPortFacilitiesCalled();
|
||||||
|
EditLast10PortFacilitiesDialog epd = new EditLast10PortFacilitiesDialog();
|
||||||
|
epd.LastTenPortFacilitiesCalled = l10c;
|
||||||
|
|
||||||
|
epd.AddClicked += () =>
|
||||||
|
{
|
||||||
|
epd.CopyValuesToEntity();
|
||||||
|
epd.LastTenPortFacilitiesCalled.SEC = this._sec;
|
||||||
|
this._sec.LastTenPortFacilitesCalled.Add(epd.LastTenPortFacilitiesCalled);
|
||||||
|
this.dataGridLast10PortFacilities.Items.Refresh();
|
||||||
|
epd.LastTenPortFacilitiesCalled = new LastTenPortFacilitiesCalled();
|
||||||
|
this.SublistElementChanged(Message.NotificationClass.SEC);
|
||||||
|
};
|
||||||
|
|
||||||
|
if (epd.ShowDialog() ?? false)
|
||||||
|
{
|
||||||
|
_sec.LastTenPortFacilitesCalled.Add(epd.LastTenPortFacilitiesCalled);
|
||||||
|
epd.LastTenPortFacilitiesCalled.SEC = this._sec;
|
||||||
|
this.dataGridLast10PortFacilities.Items.Refresh();
|
||||||
|
this.SublistElementChanged(Message.NotificationClass.SEC);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DataGridLast10PortFacilities_DeleteRequested(DatabaseEntity obj)
|
||||||
|
{
|
||||||
|
LastTenPortFacilitiesCalled l10c = obj as LastTenPortFacilitiesCalled;
|
||||||
|
if (l10c != null)
|
||||||
|
{
|
||||||
|
// are you sure dialog is in base class
|
||||||
|
_sec.LastTenPortFacilitesCalled.Remove(l10c);
|
||||||
|
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Delete(l10c);
|
||||||
|
this.dataGridLast10PortFacilities.Items.Refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DataGridLast10PortFacilities_EditRequested(DatabaseEntity obj)
|
||||||
|
{
|
||||||
|
EditLast10PortFacilitiesDialog ecpd = new EditLast10PortFacilitiesDialog();
|
||||||
|
ecpd.LastTenPortFacilitiesCalled = obj as LastTenPortFacilitiesCalled;
|
||||||
|
ecpd.AddClicked += () =>
|
||||||
|
{
|
||||||
|
ecpd.CopyValuesToEntity();
|
||||||
|
if (!_sec.LastTenPortFacilitesCalled.Contains(ecpd.LastTenPortFacilitiesCalled))
|
||||||
|
_sec.LastTenPortFacilitesCalled.Add(ecpd.LastTenPortFacilitiesCalled);
|
||||||
|
this.dataGridLast10PortFacilities.Items.Refresh();
|
||||||
|
ecpd.LastTenPortFacilitiesCalled = new LastTenPortFacilitiesCalled();
|
||||||
|
};
|
||||||
|
if (ecpd.ShowDialog() ?? false)
|
||||||
|
{
|
||||||
|
if (!_sec.LastTenPortFacilitesCalled.Contains(ecpd.LastTenPortFacilitiesCalled))
|
||||||
|
_sec.LastTenPortFacilitesCalled.Add(ecpd.LastTenPortFacilitiesCalled);
|
||||||
|
this.dataGridLast10PortFacilities.Items.Refresh();
|
||||||
|
// signal up
|
||||||
|
this.SublistElementChanged(Message.NotificationClass.SEC);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DataGridLast10PortFacilities_AddingNewItem(object sender, AddingNewItemEventArgs e)
|
||||||
|
{
|
||||||
|
this.DataGridLast10PortFacilities_CreateRequested();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private void SecurityDetailControl_Loaded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
this.RegisterTextboxChange(this.textBoxCSOEMailName, Message.NotificationClass.SEC);
|
||||||
|
this.RegisterTextboxChange(this.textBoxCSOFaxName, Message.NotificationClass.SEC);
|
||||||
|
this.RegisterTextboxChange(this.textBoxCSOFirstName, Message.NotificationClass.SEC);
|
||||||
|
this.RegisterTextboxChange(this.textBoxCSOLastName, Message.NotificationClass.SEC);
|
||||||
|
this.RegisterTextboxChange(this.textBoxCSOPhoneName, Message.NotificationClass.SEC);
|
||||||
|
this.RegisterTextboxChange(this.textBoxISSCIssuerName, Message.NotificationClass.SEC);
|
||||||
|
this.RegisterTextboxChange(this.textBoxPortFacilityOfArrival, Message.NotificationClass.SEC);
|
||||||
|
this.RegisterTextboxChange(this.textBoxReasonsForNoValidISSC, Message.NotificationClass.SEC);
|
||||||
|
|
||||||
|
this.RegisterComboboxIndexChange(this.comboBoxCurrentShipSecurityLevel, Message.NotificationClass.SEC);
|
||||||
|
this.RegisterComboboxIndexChange(this.comboBoxGeneralDescriptionOfCargo, Message.NotificationClass.SEC);
|
||||||
|
this.RegisterComboboxIndexChange(this.comboBoxISSCIssuerType, Message.NotificationClass.SEC);
|
||||||
|
this.RegisterComboboxIndexChange(this.comboBoxISSCType, Message.NotificationClass.SEC);
|
||||||
|
|
||||||
|
this.RegisterDatePickerChange(this.datePickerISSCDateOfExpiration, Message.NotificationClass.SEC);
|
||||||
|
this.RegisterDateTimePickerChange(this.dateTimePickerKielCanalPassagePlannedIncomming, Message.NotificationClass.SEC);
|
||||||
|
this.RegisterDateTimePickerChange(this.dateTimePickerKielCanalPassagePlannedOutgoing, Message.NotificationClass.SEC);
|
||||||
|
|
||||||
|
this.RegisterCheckboxChange(this.checkBoxApprovedSecurityPlanOnBoard, Message.NotificationClass.SEC);
|
||||||
|
this.RegisterCheckboxChange(this.checkBoxKielCanalPassagePlanned, Message.NotificationClass.SEC);
|
||||||
|
this.RegisterCheckboxChange(this.checkBoxSECSimplification, Message.NotificationClass.SEC);
|
||||||
|
this.RegisterCheckboxChange(this.checkBoxValidISSCOnBoard, Message.NotificationClass.SEC);
|
||||||
|
|
||||||
|
this.RegisterLocodeChange(this.locodePortOfCallWhereCompleteSECNotified, Message.NotificationClass.SEC);
|
||||||
|
|
||||||
|
this.checkBoxSECSimplification.Checked += CheckBoxSECSimplification_Checked;
|
||||||
|
this.checkBoxKielCanalPassagePlanned.Checked += CheckBoxKielCanalPassagePlanned_Checked;
|
||||||
|
}
|
||||||
|
|
||||||
|
#region enable / disable controls
|
||||||
|
|
||||||
|
private void CheckBoxKielCanalPassagePlanned_Checked(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
this.dateTimePickerKielCanalPassagePlannedIncomming.IsEnabled = this.checkBoxKielCanalPassagePlanned.IsChecked ?? false;
|
||||||
|
this.dateTimePickerKielCanalPassagePlannedOutgoing.IsEnabled = this.checkBoxKielCanalPassagePlanned.IsChecked ?? false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CheckBoxSECSimplification_Checked(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
this.locodePortOfCallWhereCompleteSECNotified.IsEnabled = this.checkBoxSECSimplification.IsChecked ?? false;
|
||||||
|
bool enable = !(this.checkBoxSECSimplification.IsChecked ?? false);
|
||||||
|
|
||||||
|
this.textBoxCSOEMailName.IsEnabled = enable;
|
||||||
|
this.textBoxCSOFaxName.IsEnabled = enable;
|
||||||
|
this.textBoxCSOFirstName.IsEnabled = enable;
|
||||||
|
this.textBoxCSOLastName.IsEnabled = enable;
|
||||||
|
this.textBoxCSOPhoneName.IsEnabled = enable;
|
||||||
|
this.textBoxISSCIssuerName.IsEnabled = enable;
|
||||||
|
this.textBoxPortFacilityOfArrival.IsEnabled = enable;
|
||||||
|
this.textBoxReasonsForNoValidISSC.IsEnabled = enable;
|
||||||
|
|
||||||
|
this.checkBoxApprovedSecurityPlanOnBoard.IsEnabled = enable;
|
||||||
|
this.checkBoxValidISSCOnBoard.IsEnabled = enable;
|
||||||
|
|
||||||
|
this.comboBoxGeneralDescriptionOfCargo.IsEnabled = enable;
|
||||||
|
this.comboBoxISSCIssuerType.IsEnabled = enable;
|
||||||
|
this.comboBoxISSCType.IsEnabled = enable;
|
||||||
|
|
||||||
|
this.datePickerISSCDateOfExpiration.IsEnabled = enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,10 +4,101 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:enictrl="clr-namespace:ENI2.Controls"
|
||||||
|
xmlns:p="clr-namespace:ENI2.Properties"
|
||||||
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||||
xmlns:local="clr-namespace:ENI2.DetailViewControls"
|
xmlns:local="clr-namespace:ENI2.DetailViewControls"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="300" d:DesignWidth="300">
|
d:DesignHeight="600" d:DesignWidth="800">
|
||||||
<Grid>
|
<GroupBox Name="shipDataGroupBox" Header="{x:Static p:Resources.textShipData}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="210" />
|
||||||
|
<RowDefinition Height="140" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid Grid.Row="0">
|
||||||
|
<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>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="2*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="2*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textVesselName}" Margin="0,0,10,0" />
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textVesselType}" Margin="0,0,10,0" />
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textTransportMode}" Margin="0,0,10,0" />
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textFlag}" Margin="0,0,10,0" />
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textGrossTonnage}" Margin="0,0,10,0" />
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textLengthOverAll}" Margin="0,0,10,0" />
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="6" Grid.Column="0" Content="{x:Static p:Resources.textMMSI}" Margin="0,0,10,0" />
|
||||||
|
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="3" Content="{x:Static p:Resources.textCallsign}" Margin="0,0,10,0" />
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="3" Content="{x:Static p:Resources.textPortOfRegistry}" Margin="0,0,10,0" />
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="5" Grid.Column="3" Content="{x:Static p:Resources.textBeamOverAll}" Margin="0,0,10,0" />
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="6" Grid.Column="3" Content="{x:Static p:Resources.textInmarsatCallNumber}" Margin="0,0,10,0" />
|
||||||
|
|
||||||
|
<TextBox Name="textBoxVesselName" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="2" Text="{Binding ShipName}" Margin="2" VerticalAlignment="Center"/>
|
||||||
|
<TextBox Name="textBoxCallsign" Grid.Column="4" Grid.Row="1" Text="{Binding CallSign}" Margin="2" VerticalAlignment="Center" />
|
||||||
|
<ComboBox Name="comboBoxVesselType" Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="2" SelectedValue="{Binding ShipType}" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" />
|
||||||
|
<ComboBox Name="comboBoxTransportMode" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="2" Margin="2" SelectedValue="{Binding TransportMode}" SelectedValuePath="Key" DisplayMemberPath="Value" />
|
||||||
|
<ComboBox Name="comboBoxFlag" Grid.Column="1" Grid.Row="3" Grid.ColumnSpan="2" Margin="2" SelectedValue="{Binding Flag}" SelectedValuePath="Key" DisplayMemberPath="Value" />
|
||||||
|
<xctk:IntegerUpDown Name="integerUpDownGrossTonnage" Grid.Column="1" Grid.Row="4" Margin="2" Value="{Binding GrossTonnage}" />
|
||||||
|
<Label Content="t" Grid.Column="2" Grid.Row="4" />
|
||||||
|
<xctk:DoubleUpDown Name="doubleUpDownLength" Grid.Column="1" Grid.Row="5" Margin="2" Value="{Binding LengthOverall_MTR}" />
|
||||||
|
<Label Content="m" Grid.Column="2" Grid.Row="5" />
|
||||||
|
<TextBox Name="textBoxMMSI" Grid.Column="1" Grid.Row="6" Margin="2" Text="{Binding MMSINumber}" VerticalAlignment="Center"/>
|
||||||
|
<enictrl:LocodeControl x:Name="locodePortOfRegistry" Grid.Column="4" Grid.Row="3" Grid.ColumnSpan="2" LocodeValue="{Binding PortOfRegistry}" />
|
||||||
|
<xctk:DoubleUpDown Name="doubleUpDownBeam" Grid.Column="4" Grid.Row="5" Margin="2" Value="{Binding Beam_MTR}" />
|
||||||
|
<Label Content="m" Grid.Column="5" Grid.Row="5" />
|
||||||
|
<TextBox Name="textBoxInmarsatCallNumber" Grid.Column="4" Grid.ColumnSpan="2" Grid.Row="6" VerticalAlignment="Center" Margin="2" Text="{Binding InmarsatCallNumber}" />
|
||||||
|
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
<GroupBox Name="groupBoxISMCompany" Header="{x:Static p:Resources.textISMCompany}" Grid.Row="1">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="2*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="2*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textCompanyName}" Margin="0,0,10,0" />
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textStreetAndNumber}" Margin="0,0,10,0" />
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textPostalCode}" Margin="0,0,10,0" />
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textCountry}" Margin="0,0,10,0" />
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="3" Content="{x:Static p:Resources.textCompanyId}" Margin="0,0,10,0" />
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="3" Content="{x:Static p:Resources.textCity}" Margin="0,0,10,0" />
|
||||||
|
|
||||||
|
<TextBox VerticalAlignment="Center" Name="textBoxCompanyName" Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" Margin="2" Text="{Binding ISMCompanyName}" MaxLength="100" />
|
||||||
|
<TextBox VerticalAlignment="Center" Name="textBoxStreetNumber" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Margin="2" Text="{Binding ISMCompanyStreetAndNumber}" MaxLength="100" />
|
||||||
|
<TextBox VerticalAlignment="Center" Name="textBoxPostalCode" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="1" Margin="2" Text="{Binding ISMCompanyPostalCode}" MaxLength="24" />
|
||||||
|
<TextBox VerticalAlignment="Center" Name="textBoxCountry" Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" Margin="2" Text="{Binding ISMCompanyCountry}" MaxLength="100" />
|
||||||
|
<TextBox VerticalAlignment="Center" Name="textBoxCompanyId" Grid.Row="0" Grid.Column="4" Grid.ColumnSpan="2" Margin="2" Text="{Binding ISMCompanyId}" MaxLength="100" />
|
||||||
|
<TextBox VerticalAlignment="Center" Name="textBoxCity" Grid.Row="1" Grid.Column="4" Grid.ColumnSpan="2" Margin="2" Text="{Binding ISMCompanyCity}" MaxLength="100" />
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</GroupBox>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
</GroupBox>
|
||||||
</src:DetailBaseControl>
|
</src:DetailBaseControl>
|
||||||
|
|||||||
@ -1,21 +1,11 @@
|
|||||||
// Copyright (c) 2017 schick Informatik
|
// Copyright (c) 2017 schick Informatik
|
||||||
// Description:
|
// Description: Bearbeitungsmaske STAT
|
||||||
//
|
//
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
|
||||||
using System.Windows.Data;
|
using bsmd.database;
|
||||||
using System.Windows.Documents;
|
using ENI2.EditControls;
|
||||||
using System.Windows.Input;
|
|
||||||
using System.Windows.Media;
|
|
||||||
using System.Windows.Media.Imaging;
|
|
||||||
using System.Windows.Navigation;
|
|
||||||
using System.Windows.Shapes;
|
|
||||||
|
|
||||||
namespace ENI2.DetailViewControls
|
namespace ENI2.DetailViewControls
|
||||||
{
|
{
|
||||||
@ -24,9 +14,72 @@ namespace ENI2.DetailViewControls
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class ShipDataDetailControl : DetailBaseControl
|
public partial class ShipDataDetailControl : DetailBaseControl
|
||||||
{
|
{
|
||||||
|
private Message _statMessage;
|
||||||
|
|
||||||
public ShipDataDetailControl()
|
public ShipDataDetailControl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
Loaded += ShipDataDetailControl_Loaded;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ShipDataDetailControl_Loaded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
this.RegisterTextboxChange(this.textBoxVesselName, Message.NotificationClass.STAT);
|
||||||
|
this.RegisterComboboxValueChange(this.comboBoxVesselType, Message.NotificationClass.STAT);
|
||||||
|
this.RegisterComboboxValueChange(this.comboBoxTransportMode, Message.NotificationClass.STAT);
|
||||||
|
this.RegisterComboboxValueChange(this.comboBoxFlag, Message.NotificationClass.STAT);
|
||||||
|
this.RegisterIntegerUpDownChange(this.integerUpDownGrossTonnage, Message.NotificationClass.STAT);
|
||||||
|
this.RegisterDoubleUpDownChange(this.doubleUpDownLength, Message.NotificationClass.STAT);
|
||||||
|
this.RegisterTextboxChange(this.textBoxMMSI, Message.NotificationClass.STAT);
|
||||||
|
this.RegisterTextboxChange(this.textBoxCallsign, Message.NotificationClass.STAT);
|
||||||
|
this.RegisterLocodeChange(this.locodePortOfRegistry, Message.NotificationClass.STAT);
|
||||||
|
this.RegisterDoubleUpDownChange(this.doubleUpDownBeam, Message.NotificationClass.STAT);
|
||||||
|
this.RegisterTextboxChange(this.textBoxInmarsatCallNumber, Message.NotificationClass.STAT);
|
||||||
|
|
||||||
|
this.RegisterTextboxChange(this.textBoxCompanyName, Message.NotificationClass.STAT);
|
||||||
|
this.RegisterTextboxChange(this.textBoxStreetNumber, Message.NotificationClass.STAT);
|
||||||
|
this.RegisterTextboxChange(this.textBoxPostalCode, Message.NotificationClass.STAT);
|
||||||
|
this.RegisterTextboxChange(this.textBoxCountry, Message.NotificationClass.STAT);
|
||||||
|
this.RegisterTextboxChange(this.textBoxCompanyId, Message.NotificationClass.STAT);
|
||||||
|
this.RegisterTextboxChange(this.textBoxCity, Message.NotificationClass.STAT);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
base.Initialize();
|
||||||
|
|
||||||
|
foreach (Message aMessage in this.Messages)
|
||||||
|
{
|
||||||
|
if (aMessage.MessageNotificationClass == Message.NotificationClass.STAT) { this._statMessage = aMessage; this.ControlMessages.Add(aMessage); }
|
||||||
|
}
|
||||||
|
|
||||||
|
#region STAT
|
||||||
|
|
||||||
|
if (this._statMessage == null)
|
||||||
|
{
|
||||||
|
this._statMessage = this.Core.CreateMessage(Message.NotificationClass.STAT);
|
||||||
|
this.Messages.Add(this._statMessage);
|
||||||
|
}
|
||||||
|
|
||||||
|
STAT stat = null;
|
||||||
|
if (this._statMessage.Elements.Count > 0)
|
||||||
|
stat = this._statMessage.Elements[0] as STAT;
|
||||||
|
if (stat == null)
|
||||||
|
{
|
||||||
|
stat = new STAT();
|
||||||
|
stat.MessageCore = this.Core;
|
||||||
|
stat.MessageHeader = this._statMessage;
|
||||||
|
_statMessage.Elements.Add(stat);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.comboBoxFlag.ItemsSource = CREW.NationalityDict;
|
||||||
|
this.comboBoxVesselType.ItemsSource = STAT.VesselTypeDict;
|
||||||
|
this.comboBoxTransportMode.ItemsSource = STAT.TransportModeDict;
|
||||||
|
this.shipDataGroupBox.DataContext = stat;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,9 +5,126 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:ENI2.DetailViewControls"
|
xmlns:local="clr-namespace:ENI2.DetailViewControls"
|
||||||
|
xmlns:enictrl="clr-namespace:ENI2.Controls"
|
||||||
|
xmlns:p="clr-namespace:ENI2.Properties"
|
||||||
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="300" d:DesignWidth="300">
|
d:DesignHeight="600" d:DesignWidth="800">
|
||||||
<Grid>
|
<GroupBox Name="portCallGroupBox" Header="{x:Static p:Resources.textWaste}">
|
||||||
|
<Grid>
|
||||||
</Grid>
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="220" />
|
||||||
|
<RowDefinition Height="360" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid Grid.Row="0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="2*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="2*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textAccurateDetailsGiven}" Name="label_AccurateDetailsGiven" Margin="0,0,10,0"/>
|
||||||
|
<!--TextBlock Grid.Row="0" Grid.Column="0" Text="{x:Static p:Resources.textAccurateDetailsGiven}" Name="label_ETAToPortOfCall" Margin="0,0,10,0" TextWrapping="Wrap" FontSize="10"/-->
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textAmountOfPlannedWasteDisposal}" Name="label_AmountOfPlannedDisposal" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textWasteDateLastDisposal}" Name="label_DateOfLastDisposal" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textLastPortWasteDischarge}" Name="label_WasteLastPortDischarged" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textWasteDisposalServiceProviders}" Name="label_WasteDisposalServiceProviders" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="2" Content="{x:Static p:Resources.textValidExemption}" Name="label_ValidExemption" Margin="0,0,10,0"/>
|
||||||
|
<CheckBox Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" Name="checkBoxAccurateCorrectDetails" IsChecked="{Binding ConfirmationOfCorrectness}" />
|
||||||
|
<CheckBox Grid.Row="0" Grid.Column="3" VerticalAlignment="Center" Name="checkBoxValidExemption" IsChecked="{Binding WasteDisposalValidExemption}" />
|
||||||
|
<ComboBox Grid.Row="1" Grid.Column="1" Name="comboBoxWasteDisposal" Margin="2" SelectedIndex="{Binding WasteDisposalDelivery}"/>
|
||||||
|
<DatePicker Grid.Row="2" Grid.Column="1" Name="datePickerDateLastDisposal" Margin="2" SelectedDate="{Binding LastWasteDisposalDate}" />
|
||||||
|
<enictrl:LocodeControl Grid.Row="3" Grid.Column="1" x:Name="locodeCtrlLastWastePort" LocodeValue="{Binding LastWasteDisposalPort}" />
|
||||||
|
<TextBox Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="3" Grid.RowSpan="2" Name="textBoxWasteDisposalServiceProviders" Text="{Binding WasteDisposalServiceProviderText}" Margin="2" />
|
||||||
|
</Grid>
|
||||||
|
<enictrl:ENIDataGrid x:Name="dataGridWaste" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||||
|
SelectionMode="Single" AutoGenerateColumns="False" Margin="0,5,0,0" Grid.Row="1">
|
||||||
|
<DataGrid.Columns>
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textCode}" Binding="{Binding WasteType}" IsReadOnly="True" Width="0.1*" />
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textDescription}" Binding="{Binding WasteDescription}" IsReadOnly="True" Width="0.15*" />
|
||||||
|
<DataGridTemplateColumn IsReadOnly="True" Width="0.1*">
|
||||||
|
<DataGridTemplateColumn.HeaderTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock TextWrapping="Wrap" Text="{x:Static p:Resources.textWasteAmountToBeDisposed}" FontSize="10"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.HeaderTemplate>
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock TextAlignment="Center" Text="{Binding WasteDisposalAmount_MTQ, StringFormat={}{0:N2}}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
<DataGridTemplateColumn IsReadOnly="True" Width="0.1*">
|
||||||
|
<DataGridTemplateColumn.HeaderTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock TextWrapping="Wrap" Text="{x:Static p:Resources.textWasteMaxCapacity}" FontSize="10"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.HeaderTemplate>
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock TextAlignment="Center" Text="{Binding WasteCapacity_MTQ, StringFormat={}{0:N2}}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
<DataGridTemplateColumn IsReadOnly="True" Width="0.1*">
|
||||||
|
<DataGridTemplateColumn.HeaderTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock TextWrapping="Wrap" Text="{x:Static p:Resources.textWasteRetained}" FontSize="10"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.HeaderTemplate>
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock TextAlignment="Center" Text="{Binding WasteAmountRetained_MTQ, StringFormat={}{0:N2}}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
<DataGridTemplateColumn IsReadOnly="True" Width="0.1*">
|
||||||
|
<DataGridTemplateColumn.HeaderTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock TextWrapping="Wrap" Text="{x:Static p:Resources.textWastePortOfDelivery}" FontSize="10"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.HeaderTemplate>
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock TextAlignment="Center" Text="{Binding WasteDisposalPort}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
<DataGridTemplateColumn IsReadOnly="True" Width="0.12*">
|
||||||
|
<DataGridTemplateColumn.HeaderTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock TextWrapping="Wrap" Text="{x:Static p:Resources.textWasteAmountDischargedLastPort}" FontSize="9"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.HeaderTemplate>
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock TextAlignment="Center" Text="{Binding WasteDisposedAtLastPort_MTQ, StringFormat={}{0:N2}}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
<DataGridTemplateColumn IsReadOnly="True" Width="0.12*">
|
||||||
|
<DataGridTemplateColumn.HeaderTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock TextWrapping="Wrap" Text="{x:Static p:Resources.textWasteGeneratedUntilNextPort}" FontSize="9"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.HeaderTemplate>
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock TextAlignment="Center" Text="{Binding WasteAmountGeneratedTillNextPort_MTQ, StringFormat={}{0:N2}}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
</DataGrid.Columns>
|
||||||
|
</enictrl:ENIDataGrid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</GroupBox>
|
||||||
</src:DetailBaseControl>
|
</src:DetailBaseControl>
|
||||||
|
|||||||
@ -1,21 +1,13 @@
|
|||||||
// Copyright (c) 2017 schick Informatik
|
// Copyright (c) 2017 schick Informatik
|
||||||
// Description:
|
// Description: Detailansicht Müllmeldung
|
||||||
//
|
//
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Data;
|
using ENI2.EditControls;
|
||||||
using System.Windows.Documents;
|
|
||||||
using System.Windows.Input;
|
using bsmd.database;
|
||||||
using System.Windows.Media;
|
|
||||||
using System.Windows.Media.Imaging;
|
|
||||||
using System.Windows.Navigation;
|
|
||||||
using System.Windows.Shapes;
|
|
||||||
|
|
||||||
namespace ENI2.DetailViewControls
|
namespace ENI2.DetailViewControls
|
||||||
{
|
{
|
||||||
@ -24,9 +16,148 @@ namespace ENI2.DetailViewControls
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class WasteDetailControl : DetailBaseControl
|
public partial class WasteDetailControl : DetailBaseControl
|
||||||
{
|
{
|
||||||
|
|
||||||
|
private Message _wasMessage;
|
||||||
|
private WAS _was;
|
||||||
|
|
||||||
|
private static string[] _wasteDeliveryList =
|
||||||
|
{
|
||||||
|
"ALL",
|
||||||
|
"SOME",
|
||||||
|
"NONE"
|
||||||
|
};
|
||||||
|
|
||||||
public WasteDetailControl()
|
public WasteDetailControl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
Loaded += WasteDetailControl_Loaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void WasteDetailControl_Loaded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
this.RegisterLocodeChange(this.locodeCtrlLastWastePort, Message.NotificationClass.WAS);
|
||||||
|
this.RegisterCheckboxChange(this.checkBoxAccurateCorrectDetails, Message.NotificationClass.WAS);
|
||||||
|
this.RegisterCheckboxChange(this.checkBoxValidExemption, Message.NotificationClass.WAS);
|
||||||
|
this.RegisterDatePickerChange(this.datePickerDateLastDisposal, Message.NotificationClass.WAS);
|
||||||
|
this.RegisterComboboxIndexChange(this.comboBoxWasteDisposal, Message.NotificationClass.WAS);
|
||||||
|
this.RegisterTextboxChange(this.textBoxWasteDisposalServiceProviders, Message.NotificationClass.WAS);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
base.Initialize();
|
||||||
|
|
||||||
|
foreach (Message aMessage in this.Messages)
|
||||||
|
{
|
||||||
|
if (aMessage.MessageNotificationClass == Message.NotificationClass.WAS) { this._wasMessage = aMessage; this.ControlMessages.Add(aMessage); }
|
||||||
|
}
|
||||||
|
|
||||||
|
#region init WAS
|
||||||
|
|
||||||
|
if (this._wasMessage == null)
|
||||||
|
{
|
||||||
|
this._wasMessage = this.Core.CreateMessage(Message.NotificationClass.WAS);
|
||||||
|
this.Messages.Add(this._wasMessage);
|
||||||
|
}
|
||||||
|
|
||||||
|
WAS was = null;
|
||||||
|
if (this._wasMessage.Elements.Count > 0)
|
||||||
|
was = this._wasMessage.Elements[0] as WAS;
|
||||||
|
if (was == null)
|
||||||
|
{
|
||||||
|
was = new WAS();
|
||||||
|
was.MessageCore = this.Core;
|
||||||
|
was.MessageHeader = this._wasMessage;
|
||||||
|
_wasMessage.Elements.Add(was);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.portCallGroupBox.DataContext = was;
|
||||||
|
this._was = was;
|
||||||
|
|
||||||
|
this.dataGridWaste.Initialize();
|
||||||
|
this.dataGridWaste.ItemsSource = was.Waste;
|
||||||
|
this.comboBoxWasteDisposal.ItemsSource = _wasteDeliveryList;
|
||||||
|
this.dataGridWaste.AddingNewItem += DataGridWaste_AddingNewItem;
|
||||||
|
this.dataGridWaste.EditRequested += DataGridWaste_EditRequested;
|
||||||
|
this.dataGridWaste.DeleteRequested += DataGridWaste_DeleteRequested;
|
||||||
|
this.dataGridWaste.CreateRequested += DataGridWaste_CreateRequested;
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Waste grid event handler
|
||||||
|
|
||||||
|
private void DataGridWaste_CreateRequested()
|
||||||
|
{
|
||||||
|
Waste waste = new Waste();
|
||||||
|
EditWasteDialog epd = new EditWasteDialog();
|
||||||
|
epd.Waste = waste;
|
||||||
|
|
||||||
|
epd.AddClicked += () =>
|
||||||
|
{
|
||||||
|
epd.CopyValuesToEntity();
|
||||||
|
epd.Waste.WAS = this._was;
|
||||||
|
this._was.Waste.Add(epd.Waste);
|
||||||
|
this.dataGridWaste.Items.Refresh();
|
||||||
|
epd.Waste = new Waste();
|
||||||
|
this.SublistElementChanged(Message.NotificationClass.WAS);
|
||||||
|
};
|
||||||
|
|
||||||
|
if (epd.ShowDialog() ?? false)
|
||||||
|
{
|
||||||
|
_was.Waste.Add(epd.Waste);
|
||||||
|
epd.Waste.WAS = this._was;
|
||||||
|
this.dataGridWaste.Items.Refresh();
|
||||||
|
this.SublistElementChanged(Message.NotificationClass.WAS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DataGridWaste_DeleteRequested(DatabaseEntity obj)
|
||||||
|
{
|
||||||
|
Waste waste = obj as Waste;
|
||||||
|
if (waste != null)
|
||||||
|
{
|
||||||
|
// are you sure dialog is in base class
|
||||||
|
_was.Waste.Remove(waste);
|
||||||
|
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Delete(waste);
|
||||||
|
this.dataGridWaste.Items.Refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DataGridWaste_EditRequested(DatabaseEntity obj)
|
||||||
|
{
|
||||||
|
Waste waste = obj as Waste;
|
||||||
|
if (waste != null)
|
||||||
|
{
|
||||||
|
EditWasteDialog epd = new EditWasteDialog();
|
||||||
|
epd.Waste = waste;
|
||||||
|
|
||||||
|
epd.AddClicked += () =>
|
||||||
|
{
|
||||||
|
epd.CopyValuesToEntity();
|
||||||
|
_was.Waste.Add(epd.Waste);
|
||||||
|
this.dataGridWaste.Items.Refresh();
|
||||||
|
epd.Waste = new Waste();
|
||||||
|
epd.Waste.WAS = _was;
|
||||||
|
this.SublistElementChanged(Message.NotificationClass.WAS);
|
||||||
|
};
|
||||||
|
|
||||||
|
if (epd.ShowDialog() ?? false)
|
||||||
|
{
|
||||||
|
this.dataGridWaste.Items.Refresh();
|
||||||
|
this.SublistElementChanged(Message.NotificationClass.WAS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DataGridWaste_AddingNewItem(object sender, AddingNewItemEventArgs e)
|
||||||
|
{
|
||||||
|
this.DataGridWaste_CreateRequested();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
<MinimumRequiredVersion>3.5.1.0</MinimumRequiredVersion>
|
<MinimumRequiredVersion>3.5.1.0</MinimumRequiredVersion>
|
||||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||||
<WebPage>publish.html</WebPage>
|
<WebPage>publish.html</WebPage>
|
||||||
<ApplicationRevision>2</ApplicationRevision>
|
<ApplicationRevision>3</ApplicationRevision>
|
||||||
<ApplicationVersion>3.6.7.%2a</ApplicationVersion>
|
<ApplicationVersion>3.6.7.%2a</ApplicationVersion>
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||||
@ -221,18 +221,36 @@
|
|||||||
<Compile Include="EditControls\EditCREWDialog.xaml.cs">
|
<Compile Include="EditControls\EditCREWDialog.xaml.cs">
|
||||||
<DependentUpon>EditCREWDialog.xaml</DependentUpon>
|
<DependentUpon>EditCREWDialog.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="EditControls\EditInfectedAreaDialog.xaml.cs">
|
||||||
|
<DependentUpon>EditInfectedAreaDialog.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="EditControls\EditLADGDialog.xaml.cs">
|
<Compile Include="EditControls\EditLADGDialog.xaml.cs">
|
||||||
<DependentUpon>EditLADGDialog.xaml</DependentUpon>
|
<DependentUpon>EditLADGDialog.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="EditControls\EditLast10PortFacilitiesDialog.xaml.cs">
|
||||||
|
<DependentUpon>EditLast10PortFacilitiesDialog.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="EditControls\EditPASDialog.xaml.cs">
|
<Compile Include="EditControls\EditPASDialog.xaml.cs">
|
||||||
<DependentUpon>EditPASDialog.xaml</DependentUpon>
|
<DependentUpon>EditPASDialog.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="EditControls\EditPortOfCallLast30DaysDialog.xaml.cs">
|
||||||
|
<DependentUpon>EditPortOfCallLast30DaysDialog.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="EditControls\EditPortOfItineraryDialog.xaml.cs">
|
<Compile Include="EditControls\EditPortOfItineraryDialog.xaml.cs">
|
||||||
<DependentUpon>EditPortOfItineraryDialog.xaml</DependentUpon>
|
<DependentUpon>EditPortOfItineraryDialog.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="EditControls\EditSanitaryMeasureDialog.xaml.cs">
|
||||||
|
<DependentUpon>EditSanitaryMeasureDialog.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="EditControls\EditSERVDialog.xaml.cs">
|
<Compile Include="EditControls\EditSERVDialog.xaml.cs">
|
||||||
<DependentUpon>EditSERVDialog.xaml</DependentUpon>
|
<DependentUpon>EditSERVDialog.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="EditControls\EditShip2ShipActivitiesDialog.xaml.cs">
|
||||||
|
<DependentUpon>EditShip2ShipActivitiesDialog.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="EditControls\EditWasteDialog.xaml.cs">
|
||||||
|
<DependentUpon>EditWasteDialog.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="EditControls\SimplePropertyViewDialog.xaml.cs">
|
<Compile Include="EditControls\SimplePropertyViewDialog.xaml.cs">
|
||||||
<DependentUpon>SimplePropertyViewDialog.xaml</DependentUpon>
|
<DependentUpon>SimplePropertyViewDialog.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@ -334,22 +352,46 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="EditControls\EditInfectedAreaDialog.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="EditControls\EditLADGDialog.xaml">
|
<Page Include="EditControls\EditLADGDialog.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="EditControls\EditLast10PortFacilitiesDialog.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="EditControls\EditPASDialog.xaml">
|
<Page Include="EditControls\EditPASDialog.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="EditControls\EditPortOfCallLast30DaysDialog.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="EditControls\EditPortOfItineraryDialog.xaml">
|
<Page Include="EditControls\EditPortOfItineraryDialog.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="EditControls\EditSanitaryMeasureDialog.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="EditControls\EditSERVDialog.xaml">
|
<Page Include="EditControls\EditSERVDialog.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="EditControls\EditShip2ShipActivitiesDialog.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="EditControls\EditWasteDialog.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="EditControls\SimplePropertyViewDialog.xaml">
|
<Page Include="EditControls\SimplePropertyViewDialog.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
|||||||
@ -14,37 +14,7 @@ namespace ENI2.EditControls
|
|||||||
/// Interaction logic for EditCallPurposeDialog.xaml
|
/// Interaction logic for EditCallPurposeDialog.xaml
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class EditCallPurposeDialog : EditWindowBase
|
public partial class EditCallPurposeDialog : EditWindowBase
|
||||||
{
|
{
|
||||||
|
|
||||||
private static string[] edifact8025Codes =
|
|
||||||
{
|
|
||||||
"",
|
|
||||||
"Cargo operations",
|
|
||||||
"Passenger movement",
|
|
||||||
"Taking bunkers",
|
|
||||||
"Changing crew",
|
|
||||||
"Goodwill visit",
|
|
||||||
"Taking supplies",
|
|
||||||
"Repair",
|
|
||||||
"Laid-up",
|
|
||||||
"Awaiting orders",
|
|
||||||
"Miscellaneous",
|
|
||||||
"Crew movement",
|
|
||||||
"Cruise, leisure and recreation",
|
|
||||||
"Under government order",
|
|
||||||
"Quarantine inspection",
|
|
||||||
"Refuge",
|
|
||||||
"Unloading cargo",
|
|
||||||
"Loading cargo",
|
|
||||||
"Repair in dry dock",
|
|
||||||
"Repair in wet dock",
|
|
||||||
"Cargo tank cleaning",
|
|
||||||
"Means of transport customs clearance",
|
|
||||||
"De-gassing",
|
|
||||||
"Waste disposal"
|
|
||||||
};
|
|
||||||
|
|
||||||
private List<string> itemList = null;
|
|
||||||
|
|
||||||
public EditCallPurposeDialog()
|
public EditCallPurposeDialog()
|
||||||
{
|
{
|
||||||
@ -56,20 +26,7 @@ namespace ENI2.EditControls
|
|||||||
|
|
||||||
public CallPurpose CallPurpose { get; set; }
|
public CallPurpose CallPurpose { get; set; }
|
||||||
|
|
||||||
public List<string> EdiCodes
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if(itemList == null)
|
|
||||||
{
|
|
||||||
this.itemList = new List<string>();
|
|
||||||
this.itemList.Add("");
|
|
||||||
for (int i = 1; i < edifact8025Codes.Length; i++)
|
|
||||||
this.itemList.Add(string.Format("{0} - {1}", i, edifact8025Codes[i]));
|
|
||||||
}
|
|
||||||
return itemList;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void CopyValuesToEntity()
|
public void CopyValuesToEntity()
|
||||||
{
|
{
|
||||||
@ -82,7 +39,7 @@ namespace ENI2.EditControls
|
|||||||
this.OKClicked += EditCallPurposeDialog_OKClicked;
|
this.OKClicked += EditCallPurposeDialog_OKClicked;
|
||||||
this.AddVisible = true;
|
this.AddVisible = true;
|
||||||
|
|
||||||
this.comboBoxCode.ItemsSource = this.EdiCodes;
|
this.comboBoxCode.ItemsSource = Util.GlobalStructures.EdiCodes;
|
||||||
if((this.CallPurpose != null) && (this.CallPurpose.CallPurposeCode != 0))
|
if((this.CallPurpose != null) && (this.CallPurpose.CallPurposeCode != 0))
|
||||||
{
|
{
|
||||||
this.comboBoxCode.SelectedIndex = this.CallPurpose.CallPurposeCode;
|
this.comboBoxCode.SelectedIndex = this.CallPurpose.CallPurposeCode;
|
||||||
@ -99,7 +56,7 @@ namespace ENI2.EditControls
|
|||||||
{
|
{
|
||||||
if (this.comboBoxCode.SelectedIndex != this.CallPurpose.CallPurposeCode)
|
if (this.comboBoxCode.SelectedIndex != this.CallPurpose.CallPurposeCode)
|
||||||
{
|
{
|
||||||
this.textBoxDescription.Text = edifact8025Codes[this.comboBoxCode.SelectedIndex];
|
this.textBoxDescription.Text = Util.GlobalStructures.edifact8025Codes[this.comboBoxCode.SelectedIndex];
|
||||||
this.textBoxDescription.Focus();
|
this.textBoxDescription.Focus();
|
||||||
// this.OnOkClicked(); // doch nicht gleich zu
|
// this.OnOkClicked(); // doch nicht gleich zu
|
||||||
}
|
}
|
||||||
|
|||||||
25
ENI-2/ENI2/ENI2/EditControls/EditInfectedAreaDialog.xaml
Normal file
25
ENI-2/ENI2/ENI2/EditControls/EditInfectedAreaDialog.xaml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<enictrl:EditWindowBase x:Class="ENI2.EditControls.EditInfectedAreaDialog"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:enictrl="clr-namespace:ENI2.Controls"
|
||||||
|
xmlns:local="clr-namespace:ENI2.EditControls"
|
||||||
|
xmlns:p="clr-namespace:ENI2.Properties"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="{x:Static p:Resources.textInfectedAreaVisited}" Height="130" Width="400" WindowStyle="SingleBorderWindow" Background="AliceBlue">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Label Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textInfectedAreaPort}" />
|
||||||
|
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textInfectedAreaDate}" />
|
||||||
|
<TextBox Name="textBoxInfectedAreaPort" Grid.Row="0" Grid.Column="1" Margin="2"/>
|
||||||
|
<DatePicker Grid.Row="1" Grid.Column="1" Name="datePickerInfectedAreaDate" Margin="2" />
|
||||||
|
</Grid>
|
||||||
|
</enictrl:EditWindowBase>
|
||||||
45
ENI-2/ENI2/ENI2/EditControls/EditInfectedAreaDialog.xaml.cs
Normal file
45
ENI-2/ENI2/ENI2/EditControls/EditInfectedAreaDialog.xaml.cs
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
// Copyright (c) 2017 schick Informatik
|
||||||
|
// Description: Infected Area Bearbeitungsdialog
|
||||||
|
//
|
||||||
|
|
||||||
|
using System.Windows;
|
||||||
|
|
||||||
|
using ENI2.Controls;
|
||||||
|
using bsmd.database;
|
||||||
|
|
||||||
|
namespace ENI2.EditControls
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for EditInfectedAreaDialog.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class EditInfectedAreaDialog : EditWindowBase
|
||||||
|
{
|
||||||
|
public EditInfectedAreaDialog()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
this.Loaded += EditInfectedAreaDialog_Loaded;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InfectedArea InfectedArea { get; set; }
|
||||||
|
|
||||||
|
private void EditInfectedAreaDialog_Loaded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
this.textBoxInfectedAreaPort.Text = this.InfectedArea.InfectedAreaPort;
|
||||||
|
this.datePickerInfectedAreaDate.SelectedDate = this.InfectedArea.InfectedAreaDate;
|
||||||
|
|
||||||
|
this.AddVisible = true;
|
||||||
|
this.OKClicked += EditInfectedAreaDialog_OKClicked;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CopyValuesToEntity()
|
||||||
|
{
|
||||||
|
this.InfectedArea.InfectedAreaPort = this.textBoxInfectedAreaPort.Text;
|
||||||
|
this.InfectedArea.InfectedAreaDate = this.datePickerInfectedAreaDate.SelectedDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void EditInfectedAreaDialog_OKClicked()
|
||||||
|
{
|
||||||
|
this.CopyValuesToEntity();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
<enictrl:EditWindowBase x:Class="ENI2.EditControls.EditLast10PortFacilitiesDialog"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:local="clr-namespace:ENI2.EditControls"
|
||||||
|
xmlns:enictrl="clr-namespace:ENI2.Controls"
|
||||||
|
xmlns:p="clr-namespace:ENI2.Properties"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="{x:Static p:Resources.textPortFacility}" Height="400" Width="400" WindowStyle="SingleBorderWindow" Background="AliceBlue">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="56" />
|
||||||
|
<RowDefinition Height="56" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="2*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Label Name="labelPortUnLocode" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textPortLocode}" />
|
||||||
|
<Label Name="labelPortName" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textPortname}" />
|
||||||
|
<Label Name="labelPortCountry" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textPortCountry}" />
|
||||||
|
<Label Name="LabelATA" Grid.Row="3" Grid.Column="0" Content="ATA" />
|
||||||
|
<Label Name="labelATD" Grid.Row="4" Grid.Column="0" Content="ATD" />
|
||||||
|
<Label Name="labelShipSecurityLevel" Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textShipSecLevel}" />
|
||||||
|
<TextBlock Name="labelGISISCode" Grid.Row="6" FontSize="10" TextWrapping="Wrap" Text="{x:Static p:Resources.textGISISCode}" />
|
||||||
|
<Label Name="labelSecurityMatters" Grid.Row="8" Grid.Column="0" Content="{x:Static p:Resources.textSecurityMatters}" />
|
||||||
|
|
||||||
|
<enictrl:LocodeControl Grid.Row="0" Grid.Column="1" x:Name="locodePort" />
|
||||||
|
<TextBox Name="textBoxPortName" Grid.Row="1" Grid.Column="1" Margin="2" MaxLength="100" />
|
||||||
|
<TextBox Name="textBoxPortCountry" Grid.Row="2" Grid.Column="1" Margin="2" MaxLength="100" />
|
||||||
|
<DatePicker Name="datePickerATA" Grid.Row="3" Grid.Column="1" Margin="2" />
|
||||||
|
<DatePicker Name="datePickerATD" Grid.Row="4" Grid.Column="1" Margin="2" />
|
||||||
|
<ComboBox Name="comboBoxShipSecurityLevel" Grid.Row="5" Grid.Column="1" Margin="2" />
|
||||||
|
<TextBox Name="textBoxGisisCode" Grid.Row="6" Grid.Column="1" Margin="2" MaxLength="4" />
|
||||||
|
<TextBox Name="textBoxGisisDescription" Grid.Row="7" Grid.Column="1" Margin="2" IsEnabled="False"/>
|
||||||
|
<TextBox Name="textBoxSecurityMatters" Grid.Row="8" Grid.Column="1" Margin="2" MaxLength="255" />
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</enictrl:EditWindowBase>
|
||||||
@ -0,0 +1,63 @@
|
|||||||
|
// Copyright (c) 2017 schick Informatik
|
||||||
|
// Description: Last 10 port facilities Detailansicht
|
||||||
|
//
|
||||||
|
|
||||||
|
using System.Windows;
|
||||||
|
|
||||||
|
using bsmd.database;
|
||||||
|
using ENI2.Controls;
|
||||||
|
using ENI2.Util;
|
||||||
|
|
||||||
|
namespace ENI2.EditControls
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for EditLast10PortFacilitiesDialog.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class EditLast10PortFacilitiesDialog : EditWindowBase
|
||||||
|
{
|
||||||
|
public EditLast10PortFacilitiesDialog()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
Loaded += EditLast10PortFacilitiesDialog_Loaded;
|
||||||
|
AddClicked += () => { this.locodePort.Focus(); };
|
||||||
|
}
|
||||||
|
|
||||||
|
public LastTenPortFacilitiesCalled LastTenPortFacilitiesCalled { get; set; }
|
||||||
|
|
||||||
|
private void EditLast10PortFacilitiesDialog_Loaded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
this.locodePort.LocodeValue = this.LastTenPortFacilitiesCalled.PortFacilityPortLoCode;
|
||||||
|
this.textBoxPortName.Text = this.LastTenPortFacilitiesCalled.PortFacilityPortName;
|
||||||
|
this.textBoxPortCountry.Text = this.LastTenPortFacilitiesCalled.PortFacilityPortCountry;
|
||||||
|
this.datePickerATA.SelectedDate = this.LastTenPortFacilitiesCalled.PortFacilityDateOfArrival;
|
||||||
|
this.datePickerATD.SelectedDate = this.LastTenPortFacilitiesCalled.PortFacilityDateOfDeparture;
|
||||||
|
this.comboBoxShipSecurityLevel.ItemsSource = GlobalStructures.ShipSecurityLevels;
|
||||||
|
this.comboBoxShipSecurityLevel.SelectedIndex = this.LastTenPortFacilitiesCalled.PortFacilityShipSecurityLevel ?? -1;
|
||||||
|
this.textBoxGisisCode.Text = this.LastTenPortFacilitiesCalled.PortFacilityGISISCode;
|
||||||
|
this.textBoxSecurityMatters.Text = this.LastTenPortFacilitiesCalled.PortFacilitySecurityMattersToReport;
|
||||||
|
|
||||||
|
this.AddVisible = true;
|
||||||
|
this.OKClicked += EditLast10PortFacilitiesDialog_OKClicked;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CopyValuesToEntity()
|
||||||
|
{
|
||||||
|
this.LastTenPortFacilitiesCalled.PortFacilityPortLoCode = this.locodePort.LocodeValue;
|
||||||
|
this.LastTenPortFacilitiesCalled.PortFacilityPortName = this.textBoxPortName.Text;
|
||||||
|
this.LastTenPortFacilitiesCalled.PortFacilityPortCountry = this.textBoxPortCountry.Text;
|
||||||
|
this.LastTenPortFacilitiesCalled.PortFacilityDateOfArrival = this.datePickerATA.SelectedDate;
|
||||||
|
this.LastTenPortFacilitiesCalled.PortFacilityDateOfDeparture = this.datePickerATD.SelectedDate;
|
||||||
|
this.LastTenPortFacilitiesCalled.PortFacilityGISISCode = this.textBoxGisisCode.Text;
|
||||||
|
if (this.comboBoxShipSecurityLevel.SelectedIndex == -1)
|
||||||
|
this.LastTenPortFacilitiesCalled.PortFacilityShipSecurityLevel = null;
|
||||||
|
else
|
||||||
|
this.LastTenPortFacilitiesCalled.PortFacilityShipSecurityLevel = ((byte)this.comboBoxShipSecurityLevel.SelectedIndex);
|
||||||
|
this.LastTenPortFacilitiesCalled.PortFacilitySecurityMattersToReport = this.textBoxSecurityMatters.Text;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void EditLast10PortFacilitiesDialog_OKClicked()
|
||||||
|
{
|
||||||
|
this.CopyValuesToEntity();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
<enictrl:EditWindowBase x:Class="ENI2.EditControls.EditPortOfCallLast30DaysDialog"
|
||||||
|
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:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||||
|
xmlns:enictrl="clr-namespace:ENI2.Controls"
|
||||||
|
xmlns:p="clr-namespace:ENI2.Properties"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="{x:Static p:Resources.textPortCall}" Height="210" Width="450" WindowStyle="SingleBorderWindow" Background="AliceBlue">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="56" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Label Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textPortCall}" />
|
||||||
|
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textATAPortOfCall}" />
|
||||||
|
<TextBlock Grid.Row="2" Grid.Column="0" Text="{x:Static p:Resources.textCrewMemberJoinTheShip}" TextWrapping="Wrap" FontSize="11"/>
|
||||||
|
<TextBlock Grid.Row="3" Grid.Column="0" Text="{x:Static p:Resources.textCrewMembersJoined}" TextWrapping="Wrap"/>
|
||||||
|
<enictrl:LocodeControl Grid.Column="1" Grid.Row="0" x:Name="locodeControlPortName" />
|
||||||
|
<DatePicker Name="datePickerATAPortOfCall" Grid.Column="1" Grid.Row="1" Margin="2"/>
|
||||||
|
<CheckBox Name="checkBoxCrewMembersJoined" VerticalContentAlignment="Center" Grid.Column="1" Grid.Row="2" />
|
||||||
|
<TextBox Name="textBoxCrewMemberNames" Grid.Column="1" Grid.Row="3" Margin="2" />
|
||||||
|
</Grid>
|
||||||
|
</enictrl:EditWindowBase>
|
||||||
@ -0,0 +1,53 @@
|
|||||||
|
// Copyright (c) 2017 schick Informatik
|
||||||
|
// Description:
|
||||||
|
//
|
||||||
|
|
||||||
|
using System.Windows;
|
||||||
|
using ENI2.Controls;
|
||||||
|
|
||||||
|
using bsmd.database;
|
||||||
|
|
||||||
|
namespace ENI2.EditControls
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for EditPortOfCallLast30Days.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class EditPortOfCallLast30DaysDialog : EditWindowBase
|
||||||
|
{
|
||||||
|
public EditPortOfCallLast30DaysDialog()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
Loaded += EditPortOfCallLast30DaysDialog_Loaded;
|
||||||
|
AddClicked += () => { this.locodeControlPortName.Focus(); };
|
||||||
|
}
|
||||||
|
|
||||||
|
public PortOfCallLast30Days PocLast30Days { get; set; }
|
||||||
|
|
||||||
|
private void EditPortOfCallLast30DaysDialog_Loaded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
this.OKClicked += EditPortOfCallLast30DaysDialog_OKClicked;
|
||||||
|
|
||||||
|
// copy into fields
|
||||||
|
this.locodeControlPortName.LocodeValue = this.PocLast30Days.PortOfCallLast30DaysLocode;
|
||||||
|
this.datePickerATAPortOfCall.SelectedDate = this.PocLast30Days.PortOfCallLast30DaysDateOfDeparture;
|
||||||
|
this.checkBoxCrewMembersJoined.IsChecked = this.PocLast30Days.PortOfCallLast30DaysCrewMembersJoined;
|
||||||
|
this.textBoxCrewMemberNames.Text = this.PocLast30Days.CrewMembersJoinedText;
|
||||||
|
this.AddVisible = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CopyValuesToEntity()
|
||||||
|
{
|
||||||
|
// copy back
|
||||||
|
this.PocLast30Days.PortOfCallLast30DaysLocode = this.locodeControlPortName.LocodeValue;
|
||||||
|
this.PocLast30Days.PortOfCallLast30DaysDateOfDeparture = this.datePickerATAPortOfCall.SelectedDate;
|
||||||
|
this.PocLast30Days.PortOfCallLast30DaysCrewMembersJoined = this.checkBoxCrewMembersJoined.IsChecked;
|
||||||
|
this.PocLast30Days.CrewMembersJoinedText = this.textBoxCrewMemberNames.Text;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void EditPortOfCallLast30DaysDialog_OKClicked()
|
||||||
|
{
|
||||||
|
this.CopyValuesToEntity();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
28
ENI-2/ENI2/ENI2/EditControls/EditSanitaryMeasureDialog.xaml
Normal file
28
ENI-2/ENI2/ENI2/EditControls/EditSanitaryMeasureDialog.xaml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<enictrl:EditWindowBase x:Class="ENI2.EditControls.EditSanitaryMeasureDialog"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:enictrl="clr-namespace:ENI2.Controls"
|
||||||
|
xmlns:local="clr-namespace:ENI2.EditControls"
|
||||||
|
xmlns:p="clr-namespace:ENI2.Properties"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="{x:Static p:Resources.textSanitaryMeasureDetails}" Height="160" Width="400" WindowStyle="SingleBorderWindow" Background="AliceBlue">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Label Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textSanitaryMeasureKind}" />
|
||||||
|
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textSanitaryMeasurePlace}" />
|
||||||
|
<Label Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textSanitaryMeasureDate}" />
|
||||||
|
<TextBox Name="textBoxSanitaryMeasureKind" Grid.Row="0" Grid.Column="1" Margin="2" MaxLength="255"/>
|
||||||
|
<TextBox Name="textBoxSanitaryMeasurePlace" Grid.Row="1" Grid.Column="1" Margin="2" MaxLength="255"/>
|
||||||
|
<DatePicker Grid.Row="2" Grid.Column="2" Name="datePickerSanitaryMeasureDate" Margin="2" />
|
||||||
|
</Grid>
|
||||||
|
</enictrl:EditWindowBase>
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
// Copyright (c) 2017 schick Informatik
|
||||||
|
// Description: SanitaryMeasure Bearbeitungsdialog
|
||||||
|
//
|
||||||
|
|
||||||
|
using System.Windows;
|
||||||
|
|
||||||
|
using ENI2.Controls;
|
||||||
|
using bsmd.database;
|
||||||
|
|
||||||
|
namespace ENI2.EditControls
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for EditSanitaryMeasureDialog.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class EditSanitaryMeasureDialog : EditWindowBase
|
||||||
|
{
|
||||||
|
public EditSanitaryMeasureDialog()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
this.Loaded += EditSanitaryMeasureDialog_Loaded;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SanitaryMeasuresDetail SanitaryMeasureDetail { get; set; }
|
||||||
|
|
||||||
|
private void EditSanitaryMeasureDialog_Loaded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
this.textBoxSanitaryMeasureKind.Text = this.SanitaryMeasureDetail.SanitaryMeasuresType;
|
||||||
|
this.textBoxSanitaryMeasurePlace.Text = this.SanitaryMeasureDetail.SanitaryMeasuresLocation;
|
||||||
|
this.datePickerSanitaryMeasureDate.SelectedDate = this.SanitaryMeasureDetail.SanitaryMeasuresDate;
|
||||||
|
this.OKClicked += EditSanitaryMeasureDialog_OKClicked;
|
||||||
|
this.AddVisible = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CopyValuesToEntity()
|
||||||
|
{
|
||||||
|
this.SanitaryMeasureDetail.SanitaryMeasuresType = this.textBoxSanitaryMeasureKind.Text.Trim();
|
||||||
|
this.SanitaryMeasureDetail.SanitaryMeasuresLocation = this.textBoxSanitaryMeasurePlace.Text.Trim();
|
||||||
|
this.SanitaryMeasureDetail.SanitaryMeasuresDate = this.datePickerSanitaryMeasureDate.SelectedDate;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void EditSanitaryMeasureDialog_OKClicked()
|
||||||
|
{
|
||||||
|
this.CopyValuesToEntity();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
<enictrl:EditWindowBase x:Class="ENI2.EditControls.EditShip2ShipActivitiesDialog"
|
||||||
|
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.textShip2ShipActivity}" Height="400" Width="800" WindowStyle="SingleBorderWindow" Background="AliceBlue">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="84" />
|
||||||
|
<RowDefinition Height="84" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Label Name="labelLocationName" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textLocationName}" />
|
||||||
|
<Label Name="labelLocationLocode" Grid.Row="0" Grid.Column="2" Content="{x:Static p:Resources.textLocationLocode}" />
|
||||||
|
<Label Name="labelLatitudeDeg" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textLatitudeDecimal}" />
|
||||||
|
<Label Name="labelLongitudeDeg" Grid.Row="1" Grid.Column="2" Content="{x:Static p:Resources.textLongitudeDecimal}" />
|
||||||
|
<Label Name="labelDateFrom" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textDateFrom}" />
|
||||||
|
<Label Name="labelDateto" Grid.Row="2" Grid.Column="2" Content="{x:Static p:Resources.textDateTo}" />
|
||||||
|
<Label Name="labelActivityType" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textActivityType}" />
|
||||||
|
<Label Name="labelSecurityMatters" Grid.Row="6" Grid.Column="0" Content="{x:Static p:Resources.textSecurityMatters}" />
|
||||||
|
|
||||||
|
<TextBox Name="textBoxLocationName" Grid.Row="0" Grid.Column="1" Margin="2" />
|
||||||
|
<enictrl:LocodeControl x:Name="locodeLocation" Grid.Row="0" Grid.Column="3" />
|
||||||
|
<xctk:DoubleUpDown Name="doubleUpDownLatitudeDegrees" Grid.Row="1" Grid.Column="1" Margin="2" FormatString="N3" />
|
||||||
|
<xctk:DoubleUpDown Name="doubleUpDownLongitudeDegrees" Grid.Row="1" Grid.Column="3" Margin="2" FormatString="N3" />
|
||||||
|
<DatePicker Name="datePickerFrom" Grid.Row="2" Grid.Column="1" Margin="2" />
|
||||||
|
<DatePicker Name="datePickerTo" Grid.Row="2" Grid.Column="3" Margin="2" />
|
||||||
|
<ComboBox Name="comboBoxActivityType" Grid.Row="4" Grid.Column="1" Margin="2" />
|
||||||
|
<TextBox Name="textBoxActivityType" Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="3" Margin="2" MaxLength="255" />
|
||||||
|
<TextBox Name="textBoxSecurityMatters" Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="3" Margin="2" MaxLength="255" />
|
||||||
|
</Grid>
|
||||||
|
</enictrl:EditWindowBase>
|
||||||
@ -0,0 +1,72 @@
|
|||||||
|
// Copyright (c) 2017 schick Informatik
|
||||||
|
// Description: Ship-2-Ship Detailansicht
|
||||||
|
//
|
||||||
|
|
||||||
|
using System.Windows;
|
||||||
|
|
||||||
|
using bsmd.database;
|
||||||
|
using ENI2.Controls;
|
||||||
|
using ENI2.Util;
|
||||||
|
|
||||||
|
|
||||||
|
namespace ENI2.EditControls
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for EditShip2ShipActivitiesDialog.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class EditShip2ShipActivitiesDialog : EditWindowBase
|
||||||
|
{
|
||||||
|
public EditShip2ShipActivitiesDialog()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
this.Loaded += EditShip2ShipActivitiesDialog_Loaded;
|
||||||
|
AddClicked += () => { this.textBoxLocationName.Focus(); };
|
||||||
|
}
|
||||||
|
|
||||||
|
public ShipToShipActivitiesDuringLastTenPortFacilitiesCalled ShipToShipActivity { get; set; }
|
||||||
|
|
||||||
|
private void EditShip2ShipActivitiesDialog_Loaded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
this.textBoxLocationName.Text = this.ShipToShipActivity.ShipToShipActivityLocationName;
|
||||||
|
this.locodeLocation.LocodeValue = this.ShipToShipActivity.ShipToShipActivityLocationLoCode;
|
||||||
|
this.doubleUpDownLatitudeDegrees.Value = bsmd.database.Util.NSWToDecimalDegrees(this.ShipToShipActivity.ShipToShipActivityLocationCoordinatesLatitude ?? 0);
|
||||||
|
this.doubleUpDownLongitudeDegrees.Value = bsmd.database.Util.NSWToDecimalDegrees(this.ShipToShipActivity.ShipToShipActivityLocationCoordinatesLongitude ?? 0);
|
||||||
|
this.datePickerFrom.SelectedDate = this.ShipToShipActivity.ShipToShipActivityDateFrom;
|
||||||
|
this.datePickerTo.SelectedDate = this.ShipToShipActivity.ShipToShipActivityDateTo;
|
||||||
|
this.textBoxActivityType.Text = this.ShipToShipActivity.ShipToShipActivityType;
|
||||||
|
this.textBoxSecurityMatters.Text = this.ShipToShipActivity.ShipToShipActivitySecurityMattersToReport;
|
||||||
|
|
||||||
|
this.comboBoxActivityType.ItemsSource = Util.GlobalStructures.EdiCodes;
|
||||||
|
this.comboBoxActivityType.SelectionChanged += ComboBoxActivityType_SelectionChanged;
|
||||||
|
|
||||||
|
this.AddVisible = true;
|
||||||
|
this.OKClicked += EditShip2ShipActivitiesDialog_OKClicked; ;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ComboBoxActivityType_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if(this.comboBoxActivityType.SelectedIndex >= 0)
|
||||||
|
{
|
||||||
|
this.textBoxActivityType.Text = Util.GlobalStructures.edifact8025Codes[this.comboBoxActivityType.SelectedIndex];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CopyValuesToEntity()
|
||||||
|
{
|
||||||
|
this.ShipToShipActivity.ShipToShipActivityLocationName = this.textBoxLocationName.Text.Trim();
|
||||||
|
this.ShipToShipActivity.ShipToShipActivityLocationLoCode = this.locodeLocation.LocodeValue;
|
||||||
|
this.ShipToShipActivity.ShipToShipActivityLocationCoordinatesLatitude = bsmd.database.Util.DecimalDegreesToNSW(this.doubleUpDownLatitudeDegrees.Value ?? 0);
|
||||||
|
this.ShipToShipActivity.ShipToShipActivityLocationCoordinatesLongitude = bsmd.database.Util.DecimalDegreesToNSW(this.doubleUpDownLongitudeDegrees.Value ?? 0);
|
||||||
|
this.ShipToShipActivity.ShipToShipActivityDateFrom = this.datePickerFrom.SelectedDate;
|
||||||
|
this.ShipToShipActivity.ShipToShipActivityDateTo = this.datePickerTo.SelectedDate;
|
||||||
|
this.ShipToShipActivity.ShipToShipActivityType = this.textBoxActivityType.Text.Trim(); ;
|
||||||
|
this.ShipToShipActivity.ShipToShipActivitySecurityMattersToReport = this.textBoxSecurityMatters.Text.Trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void EditShip2ShipActivitiesDialog_OKClicked()
|
||||||
|
{
|
||||||
|
this.CopyValuesToEntity();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
56
ENI-2/ENI2/ENI2/EditControls/EditWasteDialog.xaml
Normal file
56
ENI-2/ENI2/ENI2/EditControls/EditWasteDialog.xaml
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
<enictrl:EditWindowBase x:Class="ENI2.EditControls.EditWasteDialog"
|
||||||
|
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.textWaste}" Height="340" Width="800" WindowStyle="SingleBorderWindow" Background="AliceBlue">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="56" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="3*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Label Name="labelCode" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textCode}" />
|
||||||
|
<Label Name="labelDescription" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textDescription}" />
|
||||||
|
<Label Name="labelAmountWasteDischarged" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textWasteAmountDischargedLastPort}" />
|
||||||
|
<Label Name="labelAmountDisposed" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textWasteAmountToBeDisposed}" />
|
||||||
|
<Label Name="labelMaxWasteCapacity" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textWasteMaxCapacity}" />
|
||||||
|
<Label Name="labelWasteAmountRetained" Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textWasteRetained}" />
|
||||||
|
<Label Name="labelPortOfDeliver" Grid.Row="6" Grid.Column="0" Content="{x:Static p:Resources.textWastePortOfDelivery}" />
|
||||||
|
<Label Name="labelEstimatedWasteGenerated" Grid.Row="7" Grid.Column="0" Content="{x:Static p:Resources.textWasteGeneratedUntilNextPort}" />
|
||||||
|
|
||||||
|
<ComboBox Name="comboBoxWasteCode" Grid.Row="0" Grid.Column="1" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" />
|
||||||
|
<Label Name="labelWasteCodeText" Grid.Row="0" Grid.Column="2" />
|
||||||
|
<TextBox Name="textBoxDescription" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Width="auto" MaxLength="100" />
|
||||||
|
|
||||||
|
<xctk:DoubleUpDown Grid.Row="2" Grid.Column="1" Name="doubleUpDownAmountWasteDischargedLastPort" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N1"/>
|
||||||
|
<xctk:DoubleUpDown Grid.Row="3" Grid.Column="1" Name="doubleUpDownAmountDisposed" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N1"/>
|
||||||
|
<xctk:DoubleUpDown Grid.Row="4" Grid.Column="1" Name="doubleUpDownMaxCapacity" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N1"/>
|
||||||
|
<xctk:DoubleUpDown Grid.Row="5" Grid.Column="1" Name="doubleUpDownAmountRetained" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N1"/>
|
||||||
|
<enictrl:LocodeControl Grid.Row="6" Grid.Column="1" x:Name="locodePortOfDeliveryRemainingWaste" />
|
||||||
|
<xctk:DoubleUpDown Grid.Row="7" Grid.Column="1" Name="doubleUpDownAmountGeneratedTilNextPort" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N1"/>
|
||||||
|
|
||||||
|
<Label Content="{x:Static p:Resources.textCubicMeters}" Grid.Row = "2" Grid.Column="2" />
|
||||||
|
<Label Content="{x:Static p:Resources.textCubicMeters}" Grid.Row = "3" Grid.Column="2" />
|
||||||
|
<Label Content="{x:Static p:Resources.textCubicMeters}" Grid.Row = "4" Grid.Column="2" />
|
||||||
|
<Label Content="{x:Static p:Resources.textCubicMeters}" Grid.Row = "5" Grid.Column="2" />
|
||||||
|
<Label Content="{x:Static p:Resources.textCubicMeters}" Grid.Row = "7" Grid.Column="2" />
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</enictrl:EditWindowBase>
|
||||||
70
ENI-2/ENI2/ENI2/EditControls/EditWasteDialog.xaml.cs
Normal file
70
ENI-2/ENI2/ENI2/EditControls/EditWasteDialog.xaml.cs
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
// Copyright (c) 2017 schick Informatik
|
||||||
|
// Description: Waste Bearbeitungsdialog
|
||||||
|
//
|
||||||
|
|
||||||
|
using System.Windows;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
using bsmd.database;
|
||||||
|
using ENI2.Controls;
|
||||||
|
using ENI2.Util;
|
||||||
|
|
||||||
|
namespace ENI2.EditControls
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for EditWasteDialog.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class EditWasteDialog : EditWindowBase
|
||||||
|
{
|
||||||
|
public EditWasteDialog()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
Loaded += EditWasteDialog_Loaded;
|
||||||
|
AddClicked += () => { this.comboBoxWasteCode.Focus(); };
|
||||||
|
}
|
||||||
|
|
||||||
|
public Waste Waste { get; set; }
|
||||||
|
|
||||||
|
private void EditWasteDialog_Loaded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
Dictionary<int, string> codeDict = new Dictionary<int, string>();
|
||||||
|
for (int i = 0; i < WAS.DKWasteCodes.Length; i++)
|
||||||
|
{
|
||||||
|
codeDict[WAS.DKWasteCodes[i]] = string.Format("{0} - {1}", WAS.DKWasteCodes[i], WAS.DKWasteTypes[i]);
|
||||||
|
}
|
||||||
|
this.comboBoxWasteCode.ItemsSource = codeDict;
|
||||||
|
this.comboBoxWasteCode.SelectedValue = this.Waste.WasteType;
|
||||||
|
this.textBoxDescription.Text = this.Waste.WasteDescription;
|
||||||
|
this.doubleUpDownAmountWasteDischargedLastPort.Value = this.Waste.WasteDisposedAtLastPort_MTQ;
|
||||||
|
this.doubleUpDownAmountDisposed.Value = this.Waste.WasteDisposalAmount_MTQ;
|
||||||
|
this.doubleUpDownAmountGeneratedTilNextPort.Value = this.Waste.WasteAmountGeneratedTillNextPort_MTQ;
|
||||||
|
this.doubleUpDownAmountRetained.Value = this.Waste.WasteAmountRetained_MTQ;
|
||||||
|
this.doubleUpDownMaxCapacity.Value = this.Waste.WasteCapacity_MTQ;
|
||||||
|
this.locodePortOfDeliveryRemainingWaste.LocodeValue = this.Waste.WasteDisposalPort;
|
||||||
|
|
||||||
|
OKClicked += EditWasteDialog_OKClicked;
|
||||||
|
this.AddVisible = true;
|
||||||
|
}
|
||||||
|
public void CopyValuesToEntity()
|
||||||
|
{
|
||||||
|
// copy back
|
||||||
|
if (this.comboBoxWasteCode.SelectedValue != null)
|
||||||
|
this.Waste.WasteType = (int)this.comboBoxWasteCode.SelectedValue;
|
||||||
|
else
|
||||||
|
this.Waste.WasteType = null;
|
||||||
|
this.Waste.WasteDescription = this.textBoxDescription.Text?.Trim();
|
||||||
|
this.Waste.WasteDisposedAtLastPort_MTQ = this.doubleUpDownAmountWasteDischargedLastPort.Value;
|
||||||
|
this.Waste.WasteDisposalAmount_MTQ = this.doubleUpDownAmountDisposed.Value;
|
||||||
|
this.Waste.WasteAmountGeneratedTillNextPort_MTQ = this.doubleUpDownAmountGeneratedTilNextPort.Value;
|
||||||
|
this.Waste.WasteAmountRetained_MTQ = this.doubleUpDownAmountRetained.Value;
|
||||||
|
this.Waste.WasteCapacity_MTQ = this.doubleUpDownMaxCapacity.Value;
|
||||||
|
this.Waste.WasteDisposalPort = this.locodePortOfDeliveryRemainingWaste.LocodeValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void EditWasteDialog_OKClicked()
|
||||||
|
{
|
||||||
|
this.CopyValuesToEntity();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -72,12 +72,50 @@ namespace ENI2
|
|||||||
if (!reader.IsDBNull(0)) code = reader.GetString(0);
|
if (!reader.IsDBNull(0)) code = reader.GetString(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[code] = name;
|
result[code] = string.Format("{0} {1}", code, name);
|
||||||
}
|
}
|
||||||
reader.Close();
|
reader.Close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Dictionary<string, string> getVesselTypes()
|
||||||
|
{
|
||||||
|
Dictionary<string, string> result = new Dictionary<string, string>();
|
||||||
|
string query = string.Format("SELECT Code, Name FROM VesselType ORDER BY Code");
|
||||||
|
SQLiteCommand cmd = new SQLiteCommand(query, _con);
|
||||||
|
IDataReader reader = cmd.ExecuteReader();
|
||||||
|
while (reader.Read())
|
||||||
|
{
|
||||||
|
string code = null;
|
||||||
|
string name = null;
|
||||||
|
if (!reader.IsDBNull(0)) code = reader.GetString(0);
|
||||||
|
if (!reader.IsDBNull(1)) name = reader.GetString(1);
|
||||||
|
if ((code != null) && (name != null))
|
||||||
|
result[code] = string.Format("{0} {1}", code, name);
|
||||||
|
}
|
||||||
|
reader.Close();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static Dictionary<string, string> getTransportModes()
|
||||||
|
{
|
||||||
|
Dictionary<string, string> result = new Dictionary<string, string>();
|
||||||
|
string query = string.Format("SELECT Code, Name FROM TransportMode ORDER BY Code");
|
||||||
|
SQLiteCommand cmd = new SQLiteCommand(query, _con);
|
||||||
|
IDataReader reader = cmd.ExecuteReader();
|
||||||
|
while (reader.Read())
|
||||||
|
{
|
||||||
|
string code = null;
|
||||||
|
string name = null;
|
||||||
|
if (!reader.IsDBNull(0)) code = reader.GetString(0);
|
||||||
|
if (!reader.IsDBNull(1)) name = reader.GetString(1);
|
||||||
|
if ((code != null) && (name != null))
|
||||||
|
result[code] = string.Format("{0} {1}", code, name);
|
||||||
|
}
|
||||||
|
reader.Close();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
927
ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs
generated
927
ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@ -850,4 +850,313 @@
|
|||||||
<data name="textPassenger" xml:space="preserve">
|
<data name="textPassenger" xml:space="preserve">
|
||||||
<value>Passenger</value>
|
<value>Passenger</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="textGroupBoxWasteCargo" xml:space="preserve">
|
||||||
|
<value>Waste residue notification</value>
|
||||||
|
</data>
|
||||||
|
<data name="textAccurateDetailsGiven" xml:space="preserve">
|
||||||
|
<value>Accurate and correct details given?</value>
|
||||||
|
</data>
|
||||||
|
<data name="textAmountOfPlannedWasteDisposal" xml:space="preserve">
|
||||||
|
<value>Amount of planned waste disposal</value>
|
||||||
|
</data>
|
||||||
|
<data name="textCubicMeters" xml:space="preserve">
|
||||||
|
<value>cbm</value>
|
||||||
|
</data>
|
||||||
|
<data name="textLastPortWasteDischarge" xml:space="preserve">
|
||||||
|
<value>Last port where waste or cargo residues where discharged</value>
|
||||||
|
</data>
|
||||||
|
<data name="textValidExemption" xml:space="preserve">
|
||||||
|
<value>Valid exemption</value>
|
||||||
|
</data>
|
||||||
|
<data name="textWasteAmountDischargedLastPort" xml:space="preserve">
|
||||||
|
<value>Amount of waste of this type that has been discharged at the last port of disposal</value>
|
||||||
|
</data>
|
||||||
|
<data name="textWasteAmountToBeDisposed" xml:space="preserve">
|
||||||
|
<value>Amount to be disposed</value>
|
||||||
|
</data>
|
||||||
|
<data name="textWasteDateLastDisposal" xml:space="preserve">
|
||||||
|
<value>Date of last disposal</value>
|
||||||
|
</data>
|
||||||
|
<data name="textWasteDisposalServiceProviders" xml:space="preserve">
|
||||||
|
<value>Waste disposal service providers</value>
|
||||||
|
</data>
|
||||||
|
<data name="textWasteGeneratedUntilNextPort" xml:space="preserve">
|
||||||
|
<value>Estimated waste/cargo residues amount generated between port of call and next port</value>
|
||||||
|
</data>
|
||||||
|
<data name="textWasteMaxCapacity" xml:space="preserve">
|
||||||
|
<value>Max.waste capacity on board</value>
|
||||||
|
</data>
|
||||||
|
<data name="textWastePortOfDelivery" xml:space="preserve">
|
||||||
|
<value>Port of delivery of remaining waste</value>
|
||||||
|
</data>
|
||||||
|
<data name="textWasteRetained" xml:space="preserve">
|
||||||
|
<value>Waste amount retained on board</value>
|
||||||
|
</data>
|
||||||
|
<data name="textBeamOverAll" xml:space="preserve">
|
||||||
|
<value>Beam over all</value>
|
||||||
|
</data>
|
||||||
|
<data name="textCallsign" xml:space="preserve">
|
||||||
|
<value>Call sign</value>
|
||||||
|
</data>
|
||||||
|
<data name="textCompanyId" xml:space="preserve">
|
||||||
|
<value>Company Id</value>
|
||||||
|
</data>
|
||||||
|
<data name="textCountry" xml:space="preserve">
|
||||||
|
<value>Country</value>
|
||||||
|
</data>
|
||||||
|
<data name="textInmarsatCallNumber" xml:space="preserve">
|
||||||
|
<value>Inmarsat call number</value>
|
||||||
|
</data>
|
||||||
|
<data name="textISMCompany" xml:space="preserve">
|
||||||
|
<value>ISM company</value>
|
||||||
|
</data>
|
||||||
|
<data name="textLengthOverAll" xml:space="preserve">
|
||||||
|
<value>Length over all</value>
|
||||||
|
</data>
|
||||||
|
<data name="textMMSI" xml:space="preserve">
|
||||||
|
<value>MMSI number</value>
|
||||||
|
</data>
|
||||||
|
<data name="textPortOfRegistry" xml:space="preserve">
|
||||||
|
<value>Port of registry</value>
|
||||||
|
</data>
|
||||||
|
<data name="textStreetAndNumber" xml:space="preserve">
|
||||||
|
<value>Street, number</value>
|
||||||
|
</data>
|
||||||
|
<data name="textTransportMode" xml:space="preserve">
|
||||||
|
<value>Transport mode</value>
|
||||||
|
</data>
|
||||||
|
<data name="textVesselName" xml:space="preserve">
|
||||||
|
<value>Vessel name</value>
|
||||||
|
</data>
|
||||||
|
<data name="textVesselType" xml:space="preserve">
|
||||||
|
<value>Vessel type</value>
|
||||||
|
</data>
|
||||||
|
<data name="textActivityType" xml:space="preserve">
|
||||||
|
<value>Activity type</value>
|
||||||
|
</data>
|
||||||
|
<data name="textApprovedSecPlan" xml:space="preserve">
|
||||||
|
<value>Approved security plan on board?</value>
|
||||||
|
</data>
|
||||||
|
<data name="textChiefSecurityOfficer" xml:space="preserve">
|
||||||
|
<value>Chief security officer (CSO)</value>
|
||||||
|
</data>
|
||||||
|
<data name="textCurrentShipSecLevel" xml:space="preserve">
|
||||||
|
<value>Current ship security level</value>
|
||||||
|
</data>
|
||||||
|
<data name="textDateFrom" xml:space="preserve">
|
||||||
|
<value>Date from</value>
|
||||||
|
</data>
|
||||||
|
<data name="textDateTo" xml:space="preserve">
|
||||||
|
<value>Date to</value>
|
||||||
|
</data>
|
||||||
|
<data name="textGeneralCargoDescription" xml:space="preserve">
|
||||||
|
<value>General cargo description</value>
|
||||||
|
</data>
|
||||||
|
<data name="textGISISCode" xml:space="preserve">
|
||||||
|
<value>GISIS code of the port facility according to ISPS</value>
|
||||||
|
</data>
|
||||||
|
<data name="textIncomingETANOK" xml:space="preserve">
|
||||||
|
<value>Incoming journey to port of call - ETA NOK</value>
|
||||||
|
</data>
|
||||||
|
<data name="textISSC" xml:space="preserve">
|
||||||
|
<value>ISSC</value>
|
||||||
|
</data>
|
||||||
|
<data name="textISSCExpirationDate" xml:space="preserve">
|
||||||
|
<value>ISSC expiration date</value>
|
||||||
|
</data>
|
||||||
|
<data name="textISSCIssuerName" xml:space="preserve">
|
||||||
|
<value>ISSC issuer name</value>
|
||||||
|
</data>
|
||||||
|
<data name="textISSCIssuerType" xml:space="preserve">
|
||||||
|
<value>ISSC issuer type</value>
|
||||||
|
</data>
|
||||||
|
<data name="textISSCType" xml:space="preserve">
|
||||||
|
<value>ISSC type</value>
|
||||||
|
</data>
|
||||||
|
<data name="textKielPassagePlanned" xml:space="preserve">
|
||||||
|
<value>Kiel Canal passage planned?</value>
|
||||||
|
</data>
|
||||||
|
<data name="textLast10PortFacilities" xml:space="preserve">
|
||||||
|
<value>Last 10 port facilities called</value>
|
||||||
|
</data>
|
||||||
|
<data name="textLatitudeDecimal" xml:space="preserve">
|
||||||
|
<value>Latitude decimal</value>
|
||||||
|
</data>
|
||||||
|
<data name="textLatitudeDegrees" xml:space="preserve">
|
||||||
|
<value>Latitude degrees</value>
|
||||||
|
</data>
|
||||||
|
<data name="textLatitudeMinutes" xml:space="preserve">
|
||||||
|
<value>Latitude minutes</value>
|
||||||
|
</data>
|
||||||
|
<data name="textLatitudeSeconds" xml:space="preserve">
|
||||||
|
<value>Latitude seconds</value>
|
||||||
|
</data>
|
||||||
|
<data name="textLocationLocode" xml:space="preserve">
|
||||||
|
<value>Location UNLOCODE</value>
|
||||||
|
</data>
|
||||||
|
<data name="textLocationName" xml:space="preserve">
|
||||||
|
<value>Location name</value>
|
||||||
|
</data>
|
||||||
|
<data name="textLongitudeDecimal" xml:space="preserve">
|
||||||
|
<value>Longitude decimal</value>
|
||||||
|
</data>
|
||||||
|
<data name="textLongitudeDegrees" xml:space="preserve">
|
||||||
|
<value>Longitude degrees</value>
|
||||||
|
</data>
|
||||||
|
<data name="textLongitudeMinutes" xml:space="preserve">
|
||||||
|
<value>Longitude minutes</value>
|
||||||
|
</data>
|
||||||
|
<data name="textLongitudeSeconds" xml:space="preserve">
|
||||||
|
<value>Longitude seconds</value>
|
||||||
|
</data>
|
||||||
|
<data name="textOutgoingETANOK" xml:space="preserve">
|
||||||
|
<value>Outgoing journey from port of call - ETA NOK</value>
|
||||||
|
</data>
|
||||||
|
<data name="textPortCountry" xml:space="preserve">
|
||||||
|
<value>Port country</value>
|
||||||
|
</data>
|
||||||
|
<data name="textPortFacilityOfArrival" xml:space="preserve">
|
||||||
|
<value>Port facility of arrival</value>
|
||||||
|
</data>
|
||||||
|
<data name="textPortLocode" xml:space="preserve">
|
||||||
|
<value>Port UNLOCODE</value>
|
||||||
|
</data>
|
||||||
|
<data name="textPortWhereSimplWasGiven" xml:space="preserve">
|
||||||
|
<value>Port where security declaration was given</value>
|
||||||
|
</data>
|
||||||
|
<data name="textReasonForInvalidISSC" xml:space="preserve">
|
||||||
|
<value>Reason for invalid ISSC</value>
|
||||||
|
</data>
|
||||||
|
<data name="textSEC" xml:space="preserve">
|
||||||
|
<value>SEC - Security</value>
|
||||||
|
</data>
|
||||||
|
<data name="textSecurityMatters" xml:space="preserve">
|
||||||
|
<value>Security matters</value>
|
||||||
|
</data>
|
||||||
|
<data name="textSecurityNotification" xml:space="preserve">
|
||||||
|
<value>Security notification</value>
|
||||||
|
</data>
|
||||||
|
<data name="textShipSecLevel" xml:space="preserve">
|
||||||
|
<value>Ship security level</value>
|
||||||
|
</data>
|
||||||
|
<data name="textShipToShip" xml:space="preserve">
|
||||||
|
<value>Ship-to-ship acitivities</value>
|
||||||
|
</data>
|
||||||
|
<data name="textSimplificationAvailable" xml:space="preserve">
|
||||||
|
<value>Simplification available</value>
|
||||||
|
</data>
|
||||||
|
<data name="textValidISSCOnBoard" xml:space="preserve">
|
||||||
|
<value>Valid ISSC on board?</value>
|
||||||
|
</data>
|
||||||
|
<data name="textShip2ShipActivity" xml:space="preserve">
|
||||||
|
<value>Ship-to-ship activity</value>
|
||||||
|
</data>
|
||||||
|
<data name="textAnySanitaryMeasures" xml:space="preserve">
|
||||||
|
<value>Any sanitary measures applied?</value>
|
||||||
|
</data>
|
||||||
|
<data name="textAwareofConditionInfectious" xml:space="preserve">
|
||||||
|
<value>Are you aware of any condition on board which may lead to further infections?</value>
|
||||||
|
</data>
|
||||||
|
<data name="textDiseaseInfectiousNature" xml:space="preserve">
|
||||||
|
<value>Is there on board or has there been during the international voyage any case of disease which you suspect to be of an infectious nature?</value>
|
||||||
|
</data>
|
||||||
|
<data name="textDraughtOnDeparture" xml:space="preserve">
|
||||||
|
<value>Draught on departure</value>
|
||||||
|
</data>
|
||||||
|
<data name="textDraughtOnDepartureLabel" xml:space="preserve">
|
||||||
|
<value>Draught on departure in decimetre</value>
|
||||||
|
</data>
|
||||||
|
<data name="textJoiningLocation" xml:space="preserve">
|
||||||
|
<value>Joining location (separated by comma)</value>
|
||||||
|
</data>
|
||||||
|
<data name="textMaritimeHealthDeclaration" xml:space="preserve">
|
||||||
|
<value>Maritime health declaration</value>
|
||||||
|
</data>
|
||||||
|
<data name="textMedicalPractitionerConsulted" xml:space="preserve">
|
||||||
|
<value>Was a medical practitioner consulted?</value>
|
||||||
|
</data>
|
||||||
|
<data name="textNumberOfDeaths" xml:space="preserve">
|
||||||
|
<value>Number of deaths</value>
|
||||||
|
</data>
|
||||||
|
<data name="textNumberOfIl" xml:space="preserve">
|
||||||
|
<value>Number of ill persons</value>
|
||||||
|
</data>
|
||||||
|
<data name="textPersonDiedOnBoard" xml:space="preserve">
|
||||||
|
<value>Has any person died on board during the voyage otherwise than as a result of accident?</value>
|
||||||
|
</data>
|
||||||
|
<data name="textPersonOnBoardDeparture" xml:space="preserve">
|
||||||
|
<value>Persons on board departure</value>
|
||||||
|
</data>
|
||||||
|
<data name="textPortOfHealth" xml:space="preserve">
|
||||||
|
<value>Port where health declaration was given</value>
|
||||||
|
</data>
|
||||||
|
<data name="textPortsOfCallLast30Days" xml:space="preserve">
|
||||||
|
<value>Ports of call of the last 30 days</value>
|
||||||
|
</data>
|
||||||
|
<data name="textReinspectionSanitaryControl" xml:space="preserve">
|
||||||
|
<value>Reinspection sanitary control required?</value>
|
||||||
|
</data>
|
||||||
|
<data name="textSanitaryControlExemption" xml:space="preserve">
|
||||||
|
<value>Sanitary control exemption or certificate on board?</value>
|
||||||
|
</data>
|
||||||
|
<data name="textSanitaryMeasuresApplied" xml:space="preserve">
|
||||||
|
<value>Kind of sanitary measures applied on board</value>
|
||||||
|
</data>
|
||||||
|
<data name="textShipVisitedInfectedArea" xml:space="preserve">
|
||||||
|
<value>Has the ship visited an infected area (WHO)?</value>
|
||||||
|
</data>
|
||||||
|
<data name="textSickAnimalsOrPets" xml:space="preserve">
|
||||||
|
<value>Sick animals or pets on board?</value>
|
||||||
|
</data>
|
||||||
|
<data name="textSickPersonsOnBoard" xml:space="preserve">
|
||||||
|
<value>Sick persons on board?</value>
|
||||||
|
</data>
|
||||||
|
<data name="textTotalNumberIllHigherThanExpected" xml:space="preserve">
|
||||||
|
<value>Total number of ill passengers greater than normal / expected?</value>
|
||||||
|
</data>
|
||||||
|
<data name="textVisitsInfectedAreas" xml:space="preserve">
|
||||||
|
<value>Visits of infected areas as declared by the WHO</value>
|
||||||
|
</data>
|
||||||
|
<data name="textPlaceOfIssue" xml:space="preserve">
|
||||||
|
<value>Place of issue</value>
|
||||||
|
</data>
|
||||||
|
<data name="textDateOfIssue" xml:space="preserve">
|
||||||
|
<value>Date of issue</value>
|
||||||
|
</data>
|
||||||
|
<data name="textCrewMemberJoinTheShip" xml:space="preserve">
|
||||||
|
<value>Did any crew members join the ship at this port?</value>
|
||||||
|
</data>
|
||||||
|
<data name="textCrewMembersJoined" xml:space="preserve">
|
||||||
|
<value>Crew members joined (comma separated)</value>
|
||||||
|
</data>
|
||||||
|
<data name="textCrewMembersJoinedGrid" xml:space="preserve">
|
||||||
|
<value>Names of joined crew members</value>
|
||||||
|
</data>
|
||||||
|
<data name="textAnySanitaryMeasuresApplied" xml:space="preserve">
|
||||||
|
<value>Any sanitary measures applied?</value>
|
||||||
|
</data>
|
||||||
|
<data name="textInfecteAreaVisited" xml:space="preserve">
|
||||||
|
<value>Has the ship visited an infected area (WHO)?</value>
|
||||||
|
</data>
|
||||||
|
<data name="textInfectedAreaDate" xml:space="preserve">
|
||||||
|
<value>Infected area date</value>
|
||||||
|
</data>
|
||||||
|
<data name="textInfectedAreaPort" xml:space="preserve">
|
||||||
|
<value>Infected area port</value>
|
||||||
|
</data>
|
||||||
|
<data name="textSanitaryMeasureDate" xml:space="preserve">
|
||||||
|
<value>Date of sanitary measure</value>
|
||||||
|
</data>
|
||||||
|
<data name="textSanitaryMeasureKind" xml:space="preserve">
|
||||||
|
<value>Kind of sanitary measure</value>
|
||||||
|
</data>
|
||||||
|
<data name="textSanitaryMeasurePlace" xml:space="preserve">
|
||||||
|
<value>Place of sanitary measure</value>
|
||||||
|
</data>
|
||||||
|
<data name="textInfectedAreaVisited" xml:space="preserve">
|
||||||
|
<value>Infected area visited</value>
|
||||||
|
</data>
|
||||||
|
<data name="textSanitaryMeasureDetails" xml:space="preserve">
|
||||||
|
<value>Details of sanitary measure</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@ -12,6 +12,7 @@ namespace ENI2.Util
|
|||||||
{
|
{
|
||||||
class GlobalStructures
|
class GlobalStructures
|
||||||
{
|
{
|
||||||
|
private static List<string> itemList = null;
|
||||||
|
|
||||||
public static string[] GenderList =
|
public static string[] GenderList =
|
||||||
{
|
{
|
||||||
@ -30,5 +31,51 @@ namespace ENI2.Util
|
|||||||
Properties.Resources.textOtherLegalIdentityDocument
|
Properties.Resources.textOtherLegalIdentityDocument
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public static string[] ShipSecurityLevels = { "1", "2", "3" };
|
||||||
|
|
||||||
|
public static string[] edifact8025Codes =
|
||||||
|
{
|
||||||
|
"",
|
||||||
|
"Cargo operations",
|
||||||
|
"Passenger movement",
|
||||||
|
"Taking bunkers",
|
||||||
|
"Changing crew",
|
||||||
|
"Goodwill visit",
|
||||||
|
"Taking supplies",
|
||||||
|
"Repair",
|
||||||
|
"Laid-up",
|
||||||
|
"Awaiting orders",
|
||||||
|
"Miscellaneous",
|
||||||
|
"Crew movement",
|
||||||
|
"Cruise, leisure and recreation",
|
||||||
|
"Under government order",
|
||||||
|
"Quarantine inspection",
|
||||||
|
"Refuge",
|
||||||
|
"Unloading cargo",
|
||||||
|
"Loading cargo",
|
||||||
|
"Repair in dry dock",
|
||||||
|
"Repair in wet dock",
|
||||||
|
"Cargo tank cleaning",
|
||||||
|
"Means of transport customs clearance",
|
||||||
|
"De-gassing",
|
||||||
|
"Waste disposal"
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
public static List<string> EdiCodes
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (itemList == null)
|
||||||
|
{
|
||||||
|
itemList = new List<string>();
|
||||||
|
itemList.Add("");
|
||||||
|
for (int i = 1; i < Util.GlobalStructures.edifact8025Codes.Length; i++)
|
||||||
|
itemList.Add(string.Format("{0} - {1}", i, Util.GlobalStructures.edifact8025Codes[i]));
|
||||||
|
}
|
||||||
|
return itemList;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@ -532,11 +532,13 @@ namespace bsmd.database
|
|||||||
|
|
||||||
public void Delete(DatabaseEntity entity)
|
public void Delete(DatabaseEntity entity)
|
||||||
{
|
{
|
||||||
SqlCommand cmd = new SqlCommand();
|
if (!entity.IsNew)
|
||||||
entity.PrepareDelete(cmd);
|
{
|
||||||
int queryResult = this.PerformNonQuery(cmd);
|
SqlCommand cmd = new SqlCommand();
|
||||||
this.LogNonQueryResult(cmd.CommandText, queryResult);
|
entity.PrepareDelete(cmd);
|
||||||
|
int queryResult = this.PerformNonQuery(cmd);
|
||||||
|
this.LogNonQueryResult(cmd.CommandText, queryResult);
|
||||||
|
}
|
||||||
if (this._closeConnectionAfterUse) this.Disconnect();
|
if (this._closeConnectionAfterUse) this.Disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
using System.Text;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@ -44,6 +45,74 @@ namespace bsmd.database
|
|||||||
|
|
||||||
public string Identifier { get; set; }
|
public string Identifier { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Hilfsproperty, um eine kommaseparierte Liste von Crew (analog ANSW) im ENI-2 anzuzeigen,
|
||||||
|
/// </summary>
|
||||||
|
public string CrewMembersJoinedText
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
for (int i = 0; i < this.CrewJoinedShip.Count; i++)
|
||||||
|
{
|
||||||
|
if (i > 0)
|
||||||
|
sb.Append(", ");
|
||||||
|
sb.Append(this.CrewJoinedShip[i].PortOfCallLast30DaysCrewJoinedShipName);
|
||||||
|
}
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
foreach (PortOfCallLast30DaysCrewJoinedShip wdsp in this.CrewJoinedShip)
|
||||||
|
DBManager.Instance.Delete(wdsp);
|
||||||
|
this.CrewJoinedShip.Clear();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string[] crewNames = value.Split(',');
|
||||||
|
List<PortOfCallLast30DaysCrewJoinedShip> foundList = new List<database.PortOfCallLast30DaysCrewJoinedShip>();
|
||||||
|
|
||||||
|
for (int i = 0; i < crewNames.Length; i++)
|
||||||
|
{
|
||||||
|
string crewName = crewNames[i].Trim();
|
||||||
|
if (crewName.Length > 0)
|
||||||
|
{
|
||||||
|
PortOfCallLast30DaysCrewJoinedShip matchingCrew = null;
|
||||||
|
foreach (PortOfCallLast30DaysCrewJoinedShip wdsp in this.CrewJoinedShip)
|
||||||
|
{
|
||||||
|
if (wdsp.PortOfCallLast30DaysCrewJoinedShipName.Equals(crewName, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
matchingCrew = wdsp;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (matchingCrew != null)
|
||||||
|
{
|
||||||
|
foundList.Add(matchingCrew);
|
||||||
|
this.CrewJoinedShip.Remove(matchingCrew);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PortOfCallLast30DaysCrewJoinedShip newPoC30Crew = new PortOfCallLast30DaysCrewJoinedShip();
|
||||||
|
newPoC30Crew.PortOfCallLast30Days = this;
|
||||||
|
newPoC30Crew.PortOfCallLast30DaysCrewJoinedShipName = crewName;
|
||||||
|
foundList.Add(newPoC30Crew);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// remove remaining crew (no longer valid)
|
||||||
|
foreach (PortOfCallLast30DaysCrewJoinedShip remainingCrew in this.CrewJoinedShip)
|
||||||
|
DBManager.Instance.Delete(remainingCrew);
|
||||||
|
this.CrewJoinedShip.Clear();
|
||||||
|
// add existing and new crew
|
||||||
|
this.CrewJoinedShip.AddRange(foundList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region abstract class implementation
|
#region abstract class implementation
|
||||||
|
|||||||
@ -145,6 +145,10 @@ namespace bsmd.database
|
|||||||
[MaxLength(35)]
|
[MaxLength(35)]
|
||||||
public string CertificateOfRegistryNumber { get; set; }
|
public string CertificateOfRegistryNumber { get; set; }
|
||||||
|
|
||||||
|
public static Dictionary<string, string> VesselTypeDict { get; set; }
|
||||||
|
|
||||||
|
public static Dictionary<string, string> TransportModeDict { get; set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region abstract class implementation
|
#region abstract class implementation
|
||||||
|
|||||||
@ -165,5 +165,23 @@ namespace bsmd.database
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region CoordinateTransformation
|
||||||
|
|
||||||
|
public static double NSWToDecimalDegrees(int nswCoordinate)
|
||||||
|
{
|
||||||
|
double result = Math.Floor(nswCoordinate / 600000.0);
|
||||||
|
result += (double) (nswCoordinate % 600000.0) / 600000.0;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int DecimalDegreesToNSW(double decimalDegree)
|
||||||
|
{
|
||||||
|
int result = ((int)decimalDegree) * 600000;
|
||||||
|
result += (int) ((decimalDegree - (int)decimalDegree) * 600000);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
// Copyright (c) 2015 Informatikbüro Daniel Schick. All rights reserved.
|
// Copyright (c) 2015 Informatikbüro Daniel Schick. All rights reserved.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Data;
|
using System.Text;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@ -65,6 +65,75 @@ namespace bsmd.database
|
|||||||
|
|
||||||
public List<WasteDisposalServiceProvider> WasteDisposalServiceProvider { get { return this.wdsp; } }
|
public List<WasteDisposalServiceProvider> WasteDisposalServiceProvider { get { return this.wdsp; } }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Hilfsproperty, um eine kommaseparierte Liste von WasteDisposalServiceProvider (analog ANSW) im ENI-2 anzuzeigen,
|
||||||
|
/// bzw im Setter um eine kommaseparierte Liste mit den WasteDisposalServiceProvider Entitäten abzugleichen
|
||||||
|
/// </summary>
|
||||||
|
public string WasteDisposalServiceProviderText
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
for(int i=0;i<this.WasteDisposalServiceProvider.Count;i++)
|
||||||
|
{
|
||||||
|
if (i > 0)
|
||||||
|
sb.Append(", ");
|
||||||
|
sb.Append(this.WasteDisposalServiceProvider[i].WasteDisposalServiceProviderName);
|
||||||
|
}
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
foreach (WasteDisposalServiceProvider wdsp in this.WasteDisposalServiceProvider)
|
||||||
|
DBManager.Instance.Delete(wdsp);
|
||||||
|
this.WasteDisposalServiceProvider.Clear();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string[] serviceProviderNames = value.Split(',');
|
||||||
|
List<WasteDisposalServiceProvider> foundList = new List<database.WasteDisposalServiceProvider>();
|
||||||
|
|
||||||
|
for (int i=0;i<serviceProviderNames.Length;i++)
|
||||||
|
{
|
||||||
|
string serviceProviderName = serviceProviderNames[i].Trim();
|
||||||
|
if(serviceProviderName.Length > 0)
|
||||||
|
{
|
||||||
|
WasteDisposalServiceProvider matchingServiceProvider = null;
|
||||||
|
foreach(WasteDisposalServiceProvider wdsp in this.WasteDisposalServiceProvider)
|
||||||
|
{
|
||||||
|
if(wdsp.WasteDisposalServiceProviderName.Equals(serviceProviderName, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
matchingServiceProvider = wdsp;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(matchingServiceProvider != null)
|
||||||
|
{
|
||||||
|
foundList.Add(matchingServiceProvider);
|
||||||
|
this.WasteDisposalServiceProvider.Remove(matchingServiceProvider);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
WasteDisposalServiceProvider newWDSP = new WasteDisposalServiceProvider();
|
||||||
|
newWDSP.WAS = this;
|
||||||
|
newWDSP.WasteDisposalServiceProviderName = serviceProviderName;
|
||||||
|
foundList.Add(newWDSP);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// remove remaining service provider (no longer valid)
|
||||||
|
foreach (WasteDisposalServiceProvider remainingProvider in this.WasteDisposalServiceProvider)
|
||||||
|
DBManager.Instance.Delete(remainingProvider);
|
||||||
|
this.WasteDisposalServiceProvider.Clear();
|
||||||
|
// add existing and new providers
|
||||||
|
this.WasteDisposalServiceProvider.AddRange(foundList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region DatabaseEntity implementation
|
#region DatabaseEntity implementation
|
||||||
|
|||||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user