Version 3.5.7
This commit is contained in:
parent
344b511ae1
commit
3c7bbbe4a7
@ -6,6 +6,9 @@ using System.Windows;
|
||||
using System.Windows.Markup;
|
||||
|
||||
using bsmd.database;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System;
|
||||
|
||||
namespace ENI2
|
||||
{
|
||||
@ -35,15 +38,42 @@ namespace ENI2
|
||||
foreach (int key in cargoHandlingDict.Keys)
|
||||
LADG.CargoHandlingDict.Add(key, cargoHandlingDict[key]);
|
||||
|
||||
|
||||
EventManager.RegisterClassHandler(typeof(DatePicker), DatePicker.PreviewKeyDownEvent, new KeyEventHandler(this.DatePicker_PreviewKeyDown));
|
||||
}
|
||||
|
||||
|
||||
private void Dispatcher_UnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
|
||||
{
|
||||
string errorMessage = string.Format("An unhandled exception occurred: {0}\r\n{1}", e.Exception.Message, e.Exception.StackTrace);
|
||||
MessageBox.Show(errorMessage, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void DatePicker_PreviewKeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
var dp = sender as DatePicker;
|
||||
if (dp == null) return;
|
||||
|
||||
if (e.Key == Key.D && Keyboard.Modifiers == ModifierKeys.Control)
|
||||
{
|
||||
e.Handled = true;
|
||||
dp.SetValue(DatePicker.SelectedDateProperty, DateTime.Today);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!dp.SelectedDate.HasValue) return;
|
||||
|
||||
var date = dp.SelectedDate.Value;
|
||||
if (e.Key == Key.Up)
|
||||
{
|
||||
e.Handled = true;
|
||||
dp.SetValue(DatePicker.SelectedDateProperty, date.AddDays(1));
|
||||
}
|
||||
else if (e.Key == Key.Down)
|
||||
{
|
||||
e.Handled = true;
|
||||
dp.SetValue(DatePicker.SelectedDateProperty, date.AddDays(-1));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,15 +4,10 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Controls;
|
||||
|
||||
using bsmd.database;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace ENI2
|
||||
{
|
||||
@ -21,6 +16,8 @@ namespace ENI2
|
||||
|
||||
protected bool _initialized = false;
|
||||
|
||||
#region enum
|
||||
|
||||
protected enum LocodeState
|
||||
{
|
||||
UNKNOWN,
|
||||
@ -30,6 +27,18 @@ namespace ENI2
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region events
|
||||
|
||||
/// <summary>
|
||||
/// Mit diesem event kann ein Listenelement den programmatischen Sprung auf ein anderes Listenelement auslösen
|
||||
/// (das wird zunächst nur vom Overview -> Auswahl Meldeklasse verwendet)
|
||||
/// </summary>
|
||||
public event Action<int> JumpToListElementRequest;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
public MessageCore Core { get; set; }
|
||||
@ -46,6 +55,10 @@ namespace ENI2
|
||||
|
||||
}
|
||||
|
||||
protected virtual void OnJumpToListElementRequest(int index)
|
||||
{
|
||||
this.JumpToListElementRequest?.Invoke(index);
|
||||
}
|
||||
|
||||
protected void SetLocodeStateImage(Image stateImage, LocodeState state)
|
||||
{
|
||||
|
||||
@ -4,18 +4,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
using bsmd.database;
|
||||
using ENI2.DetailViewControls;
|
||||
@ -58,7 +47,7 @@ namespace ENI2
|
||||
this.listBoxMessages.ItemsSource = this._listBoxList;
|
||||
|
||||
_messages = DBManager.Instance.GetMessagesForCore(_core, DBManager.MessageLoad.ALL);
|
||||
|
||||
Dispatcher.BeginInvoke((Action)(() => this.listBoxMessages.SelectedIndex = 0));
|
||||
}
|
||||
|
||||
#region class MessageGroup
|
||||
@ -85,6 +74,12 @@ namespace ENI2
|
||||
DetailBaseControl detailControl = (DetailBaseControl) Activator.CreateInstance(mg.MessageGroupControlType);
|
||||
detailControl.Core = _core;
|
||||
detailControl.Messages = _messages;
|
||||
detailControl.JumpToListElementRequest += (index) => {
|
||||
if((index >= 0) && (index < _listBoxList.Count))
|
||||
{
|
||||
this.listBoxMessages.SelectedIndex = index;
|
||||
}
|
||||
};
|
||||
detailControl.Initialize();
|
||||
// plug it in ;-)
|
||||
detailView.Children.Clear();
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
<ColumnDefinition Width="1*" />
|
||||
<ColumnDefinition Width="2*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textPortCall}" />
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textPortCall}" Margin="0,0,10,0"/>
|
||||
<enictrl:LocodeControl Grid.Column="1" Grid.Row="0" Width="Auto" x:Name="locodePoC" LocodeValue="{Binding PoC, Mode=TwoWay}"/>
|
||||
<!--Grid Grid.Column="1" Grid.Row="0" Width="Auto">
|
||||
<Grid.ColumnDefinitions>
|
||||
@ -35,19 +35,66 @@
|
||||
<xctk:WatermarkComboBox Grid.Column="0" x:Name="comboBoxPoC" Margin="2" IsEditable="True" Watermark="Type for Locode.." TextBoxBase.TextChanged="ComboBox_TextChanged" ItemsSource="{Binding LocodePoCList, Mode=TwoWay}" SelectedItem="{Binding PoC, Mode=TwoWay}" />
|
||||
<Image Name="imagePoCState" Grid.Column="1" Source="../Resources/bullet_ball_grey.png" />
|
||||
</-->
|
||||
<Label Grid.Row="0" Grid.Column="2" Content="{x:Static p:Resources.textVisitTransitId}" />
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="2" Content="{x:Static p:Resources.textVisitTransitId}" Margin="0,0,10,0"/>
|
||||
<TextBox Name="textBoxDisplayId" Grid.Row="0" Grid.Column="3" IsReadOnly="True" Margin="2"/>
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textIMO}" />
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textIMO}" Margin="0,0,10,0" />
|
||||
<TextBox Name="textBoxIMO" Grid.Row="1" Grid.Column="1" Text="{Binding IMO}" Margin="2" />
|
||||
<Label Grid.Row="1" Grid.Column="2" Content="{x:Static p:Resources.textENI}" />
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="2" Content="{x:Static p:Resources.textENI}" Margin="0,0,10,0" />
|
||||
<TextBox Name="textBoxENI" Grid.Row="1" Grid.Column="3" Text="{Binding ENI}" Margin="2" />
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textETAPortOfCall}" />
|
||||
<Label Grid.Row="2" Grid.Column="2" Content="{x:Static p:Resources.textETDPortOfCall}" />
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textATAPortOfCall}" />
|
||||
<Label Grid.Row="3" Grid.Column="2" Content="{x:Static p:Resources.textATDPortOfCall}" />
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textETAPortOfCall}" Margin="0,0,10,0" />
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="2" Content="{x:Static p:Resources.textETDPortOfCall}" Margin="0,0,10,0" />
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textATAPortOfCall}" Margin="0,0,10,0" />
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="2" Content="{x:Static p:Resources.textATDPortOfCall}" Margin="0,0,10,0" />
|
||||
<xctk:DateTimePicker Grid.Column="1" Grid.Row="2" Value="{Binding ETA, Mode=TwoWay}" Name="dateTimePickerETA" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="False" ContextMenu="{DynamicResource ClearContextMenu}"/>
|
||||
<xctk:DateTimePicker Grid.Column="3" Grid.Row="2" Name="dateTimePickerETD" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="False" ContextMenu="{DynamicResource ClearContextMenu}" />
|
||||
|
||||
<xctk:DateTimePicker Grid.Column="1" Grid.Row="3" 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="3" Grid.Row="3" Name="dateTimePickerATD" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="False" ContextMenu="{DynamicResource ClearContextMenu}" />
|
||||
<DataGrid Grid.Row="4" Grid.ColumnSpan="4" Margin="0,8,0,0" x:Name="dataGridMessages" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" CanUserAddRows="False"
|
||||
SelectionMode="Single" AutoGenerateColumns="False" MouseDoubleClick="dataGrid_MouseDoubleClick" PreviewKeyDown="dataGrid_PreviewKeyDown">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTemplateColumn Header=" " Width="SizeToCells" IsReadOnly="True">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<!--Image Source="{Binding src:Util.ImageDict[ENINotificationDetailGroup]}" /-->
|
||||
<!--Image Source="{Binding Source={x:Static src:Util.ImageDict}, Path=[ENINotificationDetailGroup]}"></-->
|
||||
<Image Source="{Binding ENINotificationIconString}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textNotificationGroup}" Binding="{Binding ENINotificationDetailGroup}" IsReadOnly="True" Width="0.25*" />
|
||||
-->
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textNotificationClass}" Binding="{Binding MessageNotificationClassDisplay}" IsReadOnly="True" Width="0.1*" FontWeight="Bold">
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="Margin" Value="10,0,0,0" />
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textChanged}" Binding="{Binding Changed}" IsReadOnly="True" Width="0.15*">
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textStatus}" Binding="{Binding InternalStatus}" IsReadOnly="True" Width="0.1*">
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textChangedBy}" Binding="{Binding ChangedBy}" IsReadOnly="True" Width="0.5*">
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</src:DetailBaseControl>
|
||||
|
||||
@ -2,24 +2,13 @@
|
||||
// Description:
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
using bsmd.database;
|
||||
using bsmd.ExcelReadService;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace ENI2.DetailViewControls
|
||||
{
|
||||
@ -35,6 +24,7 @@ namespace ENI2.DetailViewControls
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
#region Initialize
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@ -59,18 +49,147 @@ namespace ENI2.DetailViewControls
|
||||
foreach (Message aMessage in this.Messages)
|
||||
{
|
||||
if (aMessage.MessageNotificationClass == notificationClass)
|
||||
{
|
||||
_message = aMessage;
|
||||
switch(aMessage.MessageNotificationClass)
|
||||
{
|
||||
case Message.NotificationClass.VISIT:
|
||||
case Message.NotificationClass.TRANSIT:
|
||||
aMessage.ENINotificationDetailGroup = Properties.Resources.textOverview;
|
||||
aMessage.ENINotificationIconString = "../Resources/documents.png";
|
||||
aMessage.ENINotificationDetailIndex = 0;
|
||||
break;
|
||||
case Message.NotificationClass.NOA_NOD:
|
||||
case Message.NotificationClass.AGNT:
|
||||
aMessage.ENINotificationIconString = "../Resources/eye_blue.png";
|
||||
aMessage.ENINotificationDetailGroup = Properties.Resources.textPortCall;
|
||||
aMessage.ENINotificationDetailIndex = 1;
|
||||
break;
|
||||
case Message.NotificationClass.NAME:
|
||||
case Message.NotificationClass.INFO:
|
||||
case Message.NotificationClass.SERV:
|
||||
case Message.NotificationClass.LADG:
|
||||
aMessage.ENINotificationIconString = "../Resources/anchor.png";
|
||||
aMessage.ENINotificationDetailGroup = Properties.Resources.textPortNotification;
|
||||
aMessage.ENINotificationDetailIndex = 2;
|
||||
break;
|
||||
case Message.NotificationClass.WAS:
|
||||
aMessage.ENINotificationIconString = "../Resources/garbage.png";
|
||||
aMessage.ENINotificationDetailGroup = Properties.Resources.textWaste;
|
||||
aMessage.ENINotificationDetailIndex = 3;
|
||||
break;
|
||||
case Message.NotificationClass.ATA:
|
||||
case Message.NotificationClass.POBA:
|
||||
case Message.NotificationClass.TIEFA:
|
||||
case Message.NotificationClass.BKRA:
|
||||
aMessage.ENINotificationIconString = "../Resources/arrow_down_right_red.png";
|
||||
aMessage.ENINotificationDetailGroup = Properties.Resources.textArrivalNotification;
|
||||
aMessage.ENINotificationDetailIndex = 4;
|
||||
break;
|
||||
case Message.NotificationClass.SEC:
|
||||
aMessage.ENINotificationIconString = "../Resources/shield_yellow.png";
|
||||
aMessage.ENINotificationDetailGroup = Properties.Resources.textSecurity;
|
||||
aMessage.ENINotificationDetailIndex = 5;
|
||||
break;
|
||||
case Message.NotificationClass.PRE72H:
|
||||
aMessage.ENINotificationIconString = "../Resources/alarmclock.png";
|
||||
aMessage.ENINotificationDetailGroup = Properties.Resources.textPSC72h;
|
||||
aMessage.ENINotificationDetailIndex = 6;
|
||||
break;
|
||||
case Message.NotificationClass.MDH:
|
||||
aMessage.ENINotificationIconString = "../Resources/medical_bag.png";
|
||||
aMessage.ENINotificationDetailGroup = Properties.Resources.textMDH;
|
||||
aMessage.ENINotificationDetailIndex = 7;
|
||||
break;
|
||||
case Message.NotificationClass.STAT:
|
||||
aMessage.ENINotificationIconString = "../Resources/containership.png";
|
||||
aMessage.ENINotificationDetailGroup = Properties.Resources.textShipData;
|
||||
aMessage.ENINotificationDetailIndex = 8;
|
||||
break;
|
||||
case Message.NotificationClass.BPOL:
|
||||
case Message.NotificationClass.CREW:
|
||||
case Message.NotificationClass.PAS:
|
||||
aMessage.ENINotificationIconString = "../Resources/policeman_german.png";
|
||||
aMessage.ENINotificationDetailGroup = Properties.Resources.textBorderPolice;
|
||||
aMessage.ENINotificationDetailIndex = 9;
|
||||
break;
|
||||
case Message.NotificationClass.ATD:
|
||||
case Message.NotificationClass.TIEFD:
|
||||
case Message.NotificationClass.BKRD:
|
||||
case Message.NotificationClass.POBD:
|
||||
aMessage.ENINotificationIconString = "../Resources/arrow_up_right_green.png";
|
||||
aMessage.ENINotificationDetailGroup = Properties.Resources.textDepartureNotification;
|
||||
aMessage.ENINotificationDetailIndex = 10;
|
||||
break;
|
||||
case Message.NotificationClass.HAZA:
|
||||
aMessage.ENINotificationIconString = "../Resources/sign_warning_radiation.png";
|
||||
aMessage.ENINotificationDetailGroup = Properties.Resources.textDGArrival;
|
||||
aMessage.ENINotificationDetailIndex = 11;
|
||||
break;
|
||||
case Message.NotificationClass.HAZD:
|
||||
aMessage.ENINotificationIconString = "../Resources/sign_warning_radiation.png";
|
||||
aMessage.ENINotificationDetailGroup = Properties.Resources.textDGDeparture;
|
||||
aMessage.ENINotificationDetailIndex = 12;
|
||||
break;
|
||||
case Message.NotificationClass.TOWA:
|
||||
case Message.NotificationClass.TOWD:
|
||||
aMessage.ENINotificationIconString = "../Resources/ship2.png";
|
||||
aMessage.ENINotificationDetailGroup = Properties.Resources.textTowage;
|
||||
aMessage.ENINotificationDetailIndex = 13;
|
||||
break;
|
||||
default:
|
||||
aMessage.ENINotificationDetailGroup = "unspecified";
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (_message != null)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
this.dataGridMessages.ItemsSource = this.Messages;
|
||||
this._initialized = true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void jumpToMessage(Message message)
|
||||
{
|
||||
|
||||
this.OnJumpToListElementRequest(message.ENINotificationDetailIndex);
|
||||
}
|
||||
|
||||
#region mouse event handler
|
||||
|
||||
private void dataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (sender != null)
|
||||
{
|
||||
DataGrid grid = sender as DataGrid;
|
||||
if ((grid != null) && (grid.SelectedItems != null) && (grid.SelectedItems.Count == 1))
|
||||
{
|
||||
DataGridRow dgr = grid.ItemContainerGenerator.ContainerFromItem(grid.SelectedItem) as DataGridRow;
|
||||
Message selectedMessage = grid.SelectedItem as Message;
|
||||
this.jumpToMessage(selectedMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void dataGrid_PreviewKeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if ((e.Key == Key.Return) || (e.Key == Key.Enter))
|
||||
{
|
||||
Message selectedMessage = this.dataGridMessages.SelectedItem as Message;
|
||||
this.jumpToMessage(selectedMessage);
|
||||
}
|
||||
else
|
||||
{
|
||||
base.OnPreviewKeyDown(e);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,15 +32,15 @@
|
||||
<RowDefinition Height="24" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textETAPortOfCall}" Name="label_ETAToPortOfCall"/>
|
||||
<Label Grid.Row="0" Grid.Column="2" Content="{x:Static p:Resources.textETDPortOfCall}" Name="label_ETDFromPortOfCall"/>
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textETAKielCanal}" Name="label_ETAToKielCanal"/>
|
||||
<Label Grid.Row="1" Grid.Column="2" Content="{x:Static p:Resources.textETDKielCanal}" Name="label_ETDFromKielCanal"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textLastPort}" Name="label_LastPort"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textNextPort}" Name="label_NextPort"/>
|
||||
<Label Grid.Row="2" Grid.Column="2" Content="{x:Static p:Resources.textETDLastPort}" Name="label_ETDFromLastport" />
|
||||
<Label Grid.Row="3" Grid.Column="2" Content="{x:Static p:Resources.textETANextPort}" Name="label_ETAToNextPort" />
|
||||
<Label Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textAnchored}" Name="label_IsAnchored" />
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textETAPortOfCall}" Name="label_ETAToPortOfCall" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="2" Content="{x:Static p:Resources.textETDPortOfCall}" Name="label_ETDFromPortOfCall" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textETAKielCanal}" Name="label_ETAToKielCanal" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="2" Content="{x:Static p:Resources.textETDKielCanal}" Name="label_ETDFromKielCanal" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textLastPort}" Name="label_LastPort" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textNextPort}" Name="label_NextPort" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="2" Content="{x:Static p:Resources.textETDLastPort}" Name="label_ETDFromLastport" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="2" Content="{x:Static p:Resources.textETANextPort}" Name="label_ETAToNextPort" Margin="0,0,10,0" />
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textAnchored}" Name="label_IsAnchored" Margin="0,0,10,0" />
|
||||
<xctk:DateTimePicker Grid.Column="1" Grid.Row="0" Value="{Binding ETAToPortOfCall, Mode=TwoWay}" Name="dateTimePicker_ETAToPortOfCall" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="False" ContextMenu="{DynamicResource ClearContextMenu}"/>
|
||||
<xctk:DateTimePicker Grid.Column="3" Grid.Row="0" Value="{Binding ETDFromPortOfCall, Mode=TwoWay}" Name="dateTimePicker_ETDFromPortOfCall" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="False" ContextMenu="{DynamicResource ClearContextMenu}"/>
|
||||
<xctk:DateTimePicker Grid.Column="1" Grid.Row="1" Value="{Binding ETAToKielCanal, Mode=TwoWay}" Name="dateTimePicker_ETAToKielCanal" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="False" ContextMenu="{DynamicResource ClearContextMenu}"/>
|
||||
@ -83,15 +83,15 @@
|
||||
<ColumnDefinition Width="2*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textCompanyName}" Name="label_AgentCompanyName"/>
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textStreetNumber}" Name="label_AgentStreetAndNumber"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textPostalCode}" Name="label_AgentPostalCode"/>
|
||||
<Label Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textLastName}" Name="label_AgentLastName"/>
|
||||
<Label Grid.Row="6" Grid.Column="0" Content="{x:Static p:Resources.textPhone}" Name="label_AgentPhone" />
|
||||
<Label Grid.Row="7" Grid.Column="0" Content="{x:Static p:Resources.textEMail}" Name="label_AgentEMail" />
|
||||
<Label Grid.Row="2" Grid.Column="2" Content="{x:Static p:Resources.textCity}" Name="label_AgentCity" />
|
||||
<Label Grid.Row="5" Grid.Column="2" Content="{x:Static p:Resources.textFirstName}" Name="label_AgentFirstName"/>
|
||||
<Label Grid.Row="6" Grid.Column="2" Content="{x:Static p:Resources.textFax}" Name="label_AgentFax"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textCompanyName}" Name="label_AgentCompanyName" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textStreetNumber}" Name="label_AgentStreetAndNumber" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textPostalCode}" Name="label_AgentPostalCode" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textLastName}" Name="label_AgentLastName" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="6" Grid.Column="0" Content="{x:Static p:Resources.textPhone}" Name="label_AgentPhone" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="7" Grid.Column="0" Content="{x:Static p:Resources.textEMail}" Name="label_AgentEMail" Margin="0,0,10,0" />
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="2" Content="{x:Static p:Resources.textCity}" Name="label_AgentCity" Margin="0,0,10,0" />
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="5" Grid.Column="2" Content="{x:Static p:Resources.textFirstName}" Name="label_AgentFirstName" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="6" Grid.Column="2" Content="{x:Static p:Resources.textFax}" Name="label_AgentFax" Margin="0,0,10,0"/>
|
||||
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Name="textBox_AgentCompanyName" MaxLength="100" Margin="2" Text="{Binding AgentCompanyName}"/>
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Name="textBox_AgentStreetAndNumber" MaxLength="100" Margin="2" Text="{Binding AgentStreetAndNumber}" />
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
<ColumnDefinition Width="1*" />
|
||||
<ColumnDefinition Width="5*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textNameMaster}" Name="label_nameMaster"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textNameMaster}" Name="label_nameMaster" Margin="0,0,10,0"/>
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Name="textBox_NameMaster" MaxLength="100" Margin="2" Text="{Binding NameOfMaster}" VerticalContentAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
@ -45,15 +45,15 @@
|
||||
<RowDefinition Height="26" />
|
||||
<RowDefinition Height="26" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textShippingArea}" Name="label_INFOShippingArea" VerticalContentAlignment="Center"/>
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textPortArea}" Name="label_INFOPortArea" VerticalContentAlignment="Center"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textRequestedPositionInPortOfCall}" Name="label_INFORequestedBerth" VerticalContentAlignment="Center"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textBowThrusterPower}" Name="label_INFOBowThrusterPower" VerticalContentAlignment="Center"/>
|
||||
<Label Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textSternThrusterPower}" Name="label_INFOSternThrusterPower" VerticalContentAlignment="Center"/>
|
||||
<Label Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textFumigatedBulkCargo}" Name="label_INFOFumigatedBulkCargo" VerticalContentAlignment="Center"/>
|
||||
<Label Grid.Row="6" Grid.Column="0" Content="{x:Static p:Resources.textDeplacementSummerDraught}" Name="label_INFODeplacementSummerDraught" VerticalContentAlignment="Center"/>
|
||||
<Label Grid.Row="2" Grid.Column="2" Content="{x:Static p:Resources.textSpecialRequirementsOfShipAtBerth}" Name="label_INFOSpecialRequirements" VerticalContentAlignment="Center"/>
|
||||
<Label Grid.Row="4" Grid.Column="2" Content="{x:Static p:Resources.textConstructionCharacteristics}" Name="label_INFOConstructionCharacteristics" VerticalContentAlignment="Center"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textShippingArea}" Name="label_INFOShippingArea" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textPortArea}" Name="label_INFOPortArea" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textRequestedPositionInPortOfCall}" Name="label_INFORequestedBerth" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textBowThrusterPower}" Name="label_INFOBowThrusterPower" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textSternThrusterPower}" Name="label_INFOSternThrusterPower" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textFumigatedBulkCargo}" Name="label_INFOFumigatedBulkCargo" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="6" Grid.Column="0" Content="{x:Static p:Resources.textDeplacementSummerDraught}" Name="label_INFODeplacementSummerDraught" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="2" Content="{x:Static p:Resources.textSpecialRequirementsOfShipAtBerth}" Name="label_INFOSpecialRequirements" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="4" Grid.Column="2" Content="{x:Static p:Resources.textConstructionCharacteristics}" Name="label_INFOConstructionCharacteristics" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||
<ComboBox Grid.Row="0" Grid.Column="1" Name="comboBoxShippingArea" Margin="2" SelectedIndex="{Binding ShippingArea}"/>
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Name="textBoxPortArea" Margin="2" Text="{Binding PortArea}" />
|
||||
<TextBox Grid.Row="2" Grid.Column="1" Name="textRequestedPostionInPortOfCall" Margin="2" Text="{Binding RequestedPositionInPortOfCall}" />
|
||||
|
||||
@ -35,8 +35,8 @@
|
||||
<MinimumRequiredVersion>3.5.1.0</MinimumRequiredVersion>
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>publish.html</WebPage>
|
||||
<ApplicationRevision>10</ApplicationRevision>
|
||||
<ApplicationVersion>3.5.6.%2a</ApplicationVersion>
|
||||
<ApplicationRevision>6</ApplicationRevision>
|
||||
<ApplicationVersion>3.5.7.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
|
||||
@ -4,15 +4,18 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:p="clr-namespace:ENI2.Properties"
|
||||
xmlns:enidtctrl="clr-namespace:ENI2.DetailViewControls"
|
||||
xmlns:local="clr-namespace:ENI2"
|
||||
mc:Ignorable="d"
|
||||
Title="ENI 2" Height="450" Width="825" Icon="Resources/logo_schwarz.ico" Loaded="Window_Loaded" Closing="Window_Closing"
|
||||
SourceInitialized="Window_SourceInitialized">
|
||||
|
||||
<Window.CommandBindings>
|
||||
<CommandBinding Command="{x:Static local:CustomCommands.Clear}"
|
||||
Executed="ExecutedClearCommand"
|
||||
CanExecute="CanExecuteClearCommand" />
|
||||
</Window.CommandBindings>
|
||||
|
||||
<DockPanel>
|
||||
<Grid DockPanel.Dock="Top" Height="80" Background="#FFE8F6FF">
|
||||
<Image x:Name="logoImage" HorizontalAlignment="Left" Height="80" Width="80" Source="Resources/EUREPORT.png" Stretch="Fill" MouseUp="logoImage_MouseUp"/>
|
||||
|
||||
@ -46,10 +46,11 @@ namespace ENI2
|
||||
if(aMessageCore != null)
|
||||
{
|
||||
ClosableTabItem searchResultItem = new ClosableTabItem();
|
||||
searchResultItem.SetHeaderText(aMessageCore.Shipname);
|
||||
searchResultItem.SetHeaderText(string.Format("{0} [{1}-{2}]", aMessageCore.Shipname, aMessageCore.PoC, aMessageCore.ETA.HasValue ? aMessageCore.ETA.Value.ToShortDateString() : ""));
|
||||
DetailRootControl drc = new DetailRootControl(aMessageCore);
|
||||
searchResultItem.Content = drc;
|
||||
this.mainFrame.Items.Add(searchResultItem);
|
||||
Dispatcher.BeginInvoke((Action)(() => this.mainFrame.SelectedIndex = (this.mainFrame.Items.Count - 1)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
58
ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs
generated
58
ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs
generated
@ -501,6 +501,24 @@ namespace ENI2.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Changed.
|
||||
/// </summary>
|
||||
public static string textChanged {
|
||||
get {
|
||||
return ResourceManager.GetString("textChanged", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Changed by.
|
||||
/// </summary>
|
||||
public static string textChangedBy {
|
||||
get {
|
||||
return ResourceManager.GetString("textChangedBy", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to City.
|
||||
/// </summary>
|
||||
@ -528,6 +546,15 @@ namespace ENI2.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Comment.
|
||||
/// </summary>
|
||||
public static string textComment {
|
||||
get {
|
||||
return ResourceManager.GetString("textComment", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Company name.
|
||||
/// </summary>
|
||||
@ -601,7 +628,7 @@ namespace ENI2.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Dangerous goods departuer.
|
||||
/// Looks up a localized string similar to Dangerous goods departure.
|
||||
/// </summary>
|
||||
public static string textDGDeparture {
|
||||
get {
|
||||
@ -826,7 +853,7 @@ namespace ENI2.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to New Visit/Transit Id.
|
||||
/// Looks up a localized string similar to Create new id.
|
||||
/// </summary>
|
||||
public static string textNewVisitTransitId {
|
||||
get {
|
||||
@ -843,6 +870,24 @@ namespace ENI2.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Notification class.
|
||||
/// </summary>
|
||||
public static string textNotificationClass {
|
||||
get {
|
||||
return ResourceManager.GetString("textNotificationClass", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Notification class type.
|
||||
/// </summary>
|
||||
public static string textNotificationGroup {
|
||||
get {
|
||||
return ResourceManager.GetString("textNotificationGroup", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Operations.
|
||||
/// </summary>
|
||||
@ -1059,6 +1104,15 @@ namespace ENI2.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Status.
|
||||
/// </summary>
|
||||
public static string textStatus {
|
||||
get {
|
||||
return ResourceManager.GetString("textStatus", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stern thruster power.
|
||||
/// </summary>
|
||||
|
||||
@ -133,6 +133,6 @@
|
||||
<value>Löschen bestätigen</value>
|
||||
</data>
|
||||
<data name="textNewVisitTransitId" xml:space="preserve">
|
||||
<value>Neue Visit/Transit Id</value>
|
||||
<value>Neue Id erstellen</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -362,7 +362,7 @@
|
||||
<value>Dangerous goods arrival</value>
|
||||
</data>
|
||||
<data name="textDGDeparture" xml:space="preserve">
|
||||
<value>Dangerous goods departuer</value>
|
||||
<value>Dangerous goods departure</value>
|
||||
</data>
|
||||
<data name="textTowage" xml:space="preserve">
|
||||
<value>Towage</value>
|
||||
@ -467,6 +467,24 @@
|
||||
<value>Transit</value>
|
||||
</data>
|
||||
<data name="textNewVisitTransitId" xml:space="preserve">
|
||||
<value>New Visit/Transit Id</value>
|
||||
<value>Create new id</value>
|
||||
</data>
|
||||
<data name="textNotificationGroup" xml:space="preserve">
|
||||
<value>Notification class type</value>
|
||||
</data>
|
||||
<data name="textNotificationClass" xml:space="preserve">
|
||||
<value>Notification class</value>
|
||||
</data>
|
||||
<data name="textChanged" xml:space="preserve">
|
||||
<value>Changed</value>
|
||||
</data>
|
||||
<data name="textStatus" xml:space="preserve">
|
||||
<value>Status</value>
|
||||
</data>
|
||||
<data name="textComment" xml:space="preserve">
|
||||
<value>Comment</value>
|
||||
</data>
|
||||
<data name="textChangedBy" xml:space="preserve">
|
||||
<value>Changed by</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -29,12 +29,12 @@
|
||||
<RowDefinition Height="30" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="Id"/>
|
||||
<Label Grid.Column="0" Grid.Row="1" Content="IMO / ENI No."/>
|
||||
<Label Grid.Column="0" Grid.Row="2" Content="Shipname"/>
|
||||
<Label Grid.Column="2" Grid.Row="0" Content="Port of call"/>
|
||||
<Label Grid.Column="2" Grid.Row="1" Content="ETA"/>
|
||||
<Label Grid.Column="2" Grid.Row="2" Content="Ticket-No."/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Column="0" Grid.Row="0" Content="Id" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Column="0" Grid.Row="1" Content="IMO / ENI No." Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Column="0" Grid.Row="2" Content="Shipname" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Column="2" Grid.Row="0" Content="Port of call" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Column="2" Grid.Row="1" Content="ETA" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Column="2" Grid.Row="2" Content="Ticket-No." Margin="0,0,10,0"/>
|
||||
<TextBox Grid.Column="1" Grid.Row="0" Name="textBoxId" VerticalContentAlignment="Center" Margin="2"/>
|
||||
<TextBox Grid.Column="1" Grid.Row="1" Name="textBoxIMO" VerticalContentAlignment="Center" Margin="2" MaxLength="7"/>
|
||||
<TextBox Grid.Column="1" Grid.Row="2" Name="textBoxName" VerticalContentAlignment="Center" Margin="2"/>
|
||||
@ -47,9 +47,9 @@
|
||||
<ColumnDefinition Width="3*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="From:" HorizontalAlignment="Left" />
|
||||
<xctk:DateTimePicker Grid.Column="1" Grid.Row="0" Name="dateTimePickerETAFrom" Format="Custom" FormatString="dd.MM.yyyy" ShowButtonSpinner="False" VerticalContentAlignment="Center" AutoCloseCalendar="True" ValueChanged="etaValueChanged" AllowTextInput="False" TimePickerVisibility="Collapsed" ContextMenu="{DynamicResource ClearContextMenu}"/>
|
||||
<DatePicker Grid.Column="1" Grid.Row="0" Name="dateTimePickerETAFrom" VerticalContentAlignment="Center" SelectedDateChanged="etaValueChanged" ContextMenu="{DynamicResource ClearContextMenu}" />
|
||||
<Label Grid.Column="2" Grid.Row="0" Content="To:" HorizontalAlignment="Left" />
|
||||
<xctk:DateTimePicker Grid.Column="3" Grid.Row="0" Name="dateTimePickerETATo" Format="Custom" FormatString="dd.MM.yyyy" ShowButtonSpinner="False" VerticalContentAlignment="Center" AutoCloseCalendar="True" ValueChanged="etaValueChanged" AllowTextInput="False" TimePickerVisibility="Collapsed" ContextMenu="{DynamicResource ClearContextMenu}"/>
|
||||
<DatePicker Grid.Column="3" Grid.Row="0" Name="dateTimePickerETATo" VerticalContentAlignment="Center" SelectedDateChanged="etaValueChanged" ContextMenu="{DynamicResource ClearContextMenu}"/>
|
||||
</Grid>
|
||||
<TextBox Grid.Column="3" Grid.Row="2" Name="textBoxTicketNr" Margin="2"/>
|
||||
|
||||
|
||||
@ -49,8 +49,8 @@ namespace ENI2
|
||||
textBoxIMO.Text = string.Empty;
|
||||
textBoxName.Text = string.Empty;
|
||||
textBoxTicketNr.Text = string.Empty;
|
||||
dateTimePickerETAFrom.Text = string.Empty;
|
||||
dateTimePickerETATo.Text = string.Empty;
|
||||
dateTimePickerETAFrom.SelectedDate = null;
|
||||
dateTimePickerETATo.SelectedDate = null;
|
||||
this.dataGrid.ItemsSource = null;
|
||||
this.searchResultLabel.Content = "";
|
||||
}
|
||||
@ -71,13 +71,13 @@ namespace ENI2
|
||||
filterDict.Add(MessageCore.SearchFilterType.FILTER_TICKETNO, this.textBoxTicketNr.Text.Trim());
|
||||
|
||||
uint? from = null, to = null;
|
||||
if(!this.dateTimePickerETAFrom.Text.IsNullOrEmpty())
|
||||
if(this.dateTimePickerETAFrom.SelectedDate.HasValue)
|
||||
{
|
||||
from = this.dateTimePickerETAFrom.Value.Value.ToUnixTimeStamp();
|
||||
from = this.dateTimePickerETAFrom.SelectedDate.Value.ToUnixTimeStamp();
|
||||
}
|
||||
if(!this.dateTimePickerETATo.Text.IsNullOrEmpty())
|
||||
if(this.dateTimePickerETATo.SelectedDate.HasValue)
|
||||
{
|
||||
DateTime toTime = this.dateTimePickerETATo.Value.Value.Add(new TimeSpan(23, 59, 59)); // search till the end of the "to" day (no time selection)
|
||||
DateTime toTime = this.dateTimePickerETATo.SelectedDate.Value.Add(new TimeSpan(23, 59, 59)); // search till the end of the "to" day (no time selection)
|
||||
to = toTime.ToUnixTimeStamp();
|
||||
}
|
||||
|
||||
@ -96,8 +96,8 @@ namespace ENI2
|
||||
private void etaValueChanged(object sender, EventArgs args)
|
||||
{
|
||||
bool valid = true;
|
||||
if ((this.dateTimePickerETAFrom.Value != null) && (this.dateTimePickerETATo.Value != null) &&
|
||||
this.dateTimePickerETATo.Value.Value < this.dateTimePickerETAFrom.Value.Value)
|
||||
if ((this.dateTimePickerETAFrom.SelectedDate.HasValue) && (this.dateTimePickerETATo.SelectedDate.HasValue) &&
|
||||
this.dateTimePickerETATo.SelectedDate.Value < this.dateTimePickerETAFrom.SelectedDate.Value)
|
||||
valid = false;
|
||||
|
||||
this.dateTimePickerETAFrom.Background = valid ? SystemColors.ControlBrush : Brushes.Red;
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
xmlns:local="clr-namespace:ENI2">
|
||||
|
||||
|
||||
|
||||
<Style TargetType="{x:Type enictrl:ENIDataGrid}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
|
||||
Binary file not shown.
@ -36,6 +36,14 @@ namespace bsmd.database
|
||||
/// </summary>
|
||||
public Message.NotificationClass MessageNotificationClass { get; set; }
|
||||
|
||||
public string MessageNotificationClassDisplay
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.MessageNotificationClass.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Referenz zur eigentlichen Schiffankunft
|
||||
/// </summary>
|
||||
|
||||
@ -18,6 +18,7 @@ namespace bsmd.database
|
||||
private Guid? reportingPartyId;
|
||||
private ReportingParty reportingParty;
|
||||
private DateTime? created;
|
||||
private DateTime? changed;
|
||||
private List<MessageError> errorList = new List<MessageError>();
|
||||
private List<MessageViolation> violationList = new List<MessageViolation>();
|
||||
private List<DatabaseEntity> elements = new List<DatabaseEntity>();
|
||||
@ -268,6 +269,27 @@ namespace bsmd.database
|
||||
/// </summary>
|
||||
public string ChangedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Database last "Changed" date display
|
||||
/// </summary>
|
||||
public DateTime? Changed { get { return this.changed; } }
|
||||
|
||||
/// <summary>
|
||||
/// ENI-2 detail group text
|
||||
/// </summary>
|
||||
public string ENINotificationDetailGroup { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Hilfsproperty zum schnellen Auffinden der passenden Gruppe
|
||||
/// </summary>
|
||||
public int ENINotificationDetailIndex { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Hilfsproperty zum Speichern des Icon-Pfads in ENI-2
|
||||
/// </summary>
|
||||
public string ENINotificationIconString { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region IDatabaseEntity implementation
|
||||
@ -333,7 +355,7 @@ namespace bsmd.database
|
||||
public override void PrepareLoadCommand(IDbCommand cmd, LoadFilter filter, params object[] criteria )
|
||||
{
|
||||
string query = string.Format("SELECT Id, ClientRequestId, MessageCoreId, MessageId, SentAt, ReceivedAt, RequestedAt, NotificationClass, " +
|
||||
"Reset, Cancel, Status, ReportingPartyId, BSMDStatus, HIS, Created, CreatedBy, ChangedBy FROM {0} ", this.Tablename);
|
||||
"Reset, Cancel, Status, ReportingPartyId, BSMDStatus, HIS, Created, CreatedBy, ChangedBy, Changed FROM {0} ", this.Tablename);
|
||||
|
||||
switch (filter)
|
||||
{
|
||||
@ -410,6 +432,7 @@ namespace bsmd.database
|
||||
if (!reader.IsDBNull(14)) msg.created = reader.GetDateTime(14);
|
||||
if (!reader.IsDBNull(15)) msg.CreatedBy = reader.GetString(15);
|
||||
if (!reader.IsDBNull(16)) msg.ChangedBy = reader.GetString(16);
|
||||
if (!reader.IsDBNull(17)) msg.changed = reader.GetDateTime(17);
|
||||
result.Add(msg);
|
||||
}
|
||||
reader.Close();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user