Neuer Stand ENI2:

- Port Notification (INFO SERV LADG NAME)
- Custom Commands (Kontext - Clear)
This commit is contained in:
Daniel Schick 2017-04-29 20:24:15 +00:00
parent e6711b1280
commit 47237ebf68
29 changed files with 920 additions and 538 deletions

View File

@ -8,7 +8,7 @@
d:DesignHeight="300" d:DesignWidth="300">
<Grid Background="#FFCAE4FF" Margin="4">
<DataGrid x:Name="dataGrid" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" SelectionMode="Single"
AutoGenerateColumns="False" MouseDoubleClick="dataGrid_MouseDoubleClick">
AutoGenerateColumns="False" MouseDoubleClick="dataGrid_MouseDoubleClick" CanUserAddRows="False">
<DataGrid.Columns>
<DataGridTextColumn Header="Type" Binding="{Binding HerbergReportType}" IsReadOnly="True" />
<DataGridTextColumn Header="IMO" Binding="{Binding IMO}" IsReadOnly="True" />

View File

@ -2,8 +2,16 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:ENI2"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:p="clr-namespace:ENI2.Properties"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ContextMenu x:Key="ClearContextMenu" x:Shared="true">
<MenuItem Header="{x:Static p:Resources.textClear}" IsCheckable="False" Command="local:CustomCommands.Clear" >
<MenuItem.Icon>
<Image Source="Resources/delete.png" />
</MenuItem.Icon>
</MenuItem>
</ContextMenu>
</Application.Resources>
</Application>

View File

@ -76,21 +76,22 @@ namespace ENI2.Controls
this.MouseDoubleClick += dataGrid_MouseDoubleClick;
this.ContextMenu = new ContextMenu();
this.CanUserAddRows = false;
MenuItem addItem = new MenuItem();
addItem.Header = "_Add";
addItem.Header = Properties.Resources.textAdd;
addItem.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/add.png")) };
addItem.Click += new RoutedEventHandler(this.addItem);
this.ContextMenu.Items.Add(addItem);
MenuItem deleteItem = new MenuItem();
deleteItem.Header = "_Delete";
deleteItem.Header = Properties.Resources.textDelete;
deleteItem.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/delete.png")) };
deleteItem.Click += this.deleteItem;
this.ContextMenu.Items.Add(deleteItem);
MenuItem editItem = new MenuItem();
editItem.Header = "_Edit";
editItem.Header = Properties.Resources.textEdit;
editItem.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/edit.png")) };
editItem.Click += this.editItem;
this.ContextMenu.Items.Add(editItem);
@ -98,19 +99,19 @@ namespace ENI2.Controls
this.ContextMenu.Items.Add(new Separator());
MenuItem printItem = new MenuItem();
printItem.Header = "_Print";
printItem.Header = Properties.Resources.textPrint;
printItem.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/printer.png")) };
printItem.Click += this.printItem;
this.ContextMenu.Items.Add(printItem);
MenuItem exportItem = new MenuItem();
exportItem.Header = "_Export";
exportItem.Header = Properties.Resources.textExport;
exportItem.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/floppy_disk_blue.png")) };
exportItem.Click += this.exportItem;
this.ContextMenu.Items.Add(exportItem);
MenuItem showTextItem = new MenuItem();
showTextItem.Header = "_Show data as text";
showTextItem.Header = Properties.Resources.textShowAsText;
showTextItem.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/document_plain.png")) };
showTextItem.Click += this.showTextItem;
this.ContextMenu.Items.Add(showTextItem);

View File

@ -47,5 +47,11 @@ namespace ENI2.Controls
// this.SetPlacement(..)
}
protected virtual void OnOkClicked()
{
this.DialogResult = true;
OKClicked?.Invoke();
}
}
}

View File

@ -3,7 +3,8 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
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:local="clr-namespace:ENI2.Controls"
mc:Ignorable="d"
d:DesignHeight="30" d:DesignWidth="300">
@ -13,7 +14,7 @@
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<xctk:WatermarkComboBox Grid.Column="0" x:Name="comboBoxLocode" Margin="2" IsEditable="True" Watermark="Type for Locode.."
<xctk:WatermarkComboBox Grid.Column="0" x:Name="comboBoxLocode" Margin="2" IsEditable="True" Watermark="{x:Static p:Resources.textTypeLocode}"
TextBoxBase.TextChanged="ComboBox_TextChanged" SelectionChanged="comboBoxLocode_SelectionChanged"/> <!-- ItemsSource="{Binding LocodeList, Mode=TwoWay}"
SelectedItem="{Binding LocodeValue}" /> -->
<!--, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type local:LocodeControl}}-->

View File

@ -0,0 +1,45 @@
// Copyright (c) 2017 schick Informatik
// Description: Eigene routed commands. Damit können "globale" Commands definiert werden, die überall in XAML
// an Objekte attached werden können. Erste Verwendung war das Kontextmenü "löschen" für DateTimePicker, um den
// ausgewählten Wert zu leeren.
using System.Windows;
using System.Windows.Input;
using System.Windows.Media;
namespace ENI2
{
public static class CustomCommands
{
public static readonly RoutedUICommand Clear = new RoutedUICommand(
Properties.Resources.textClear,
"Clear",
typeof(CustomCommands),
new InputGestureCollection()
{
new KeyGesture(Key.Delete)
}
);
public static T FindParent<T>(DependencyObject child) where T : DependencyObject
{
if (child == null) return null;
//get parent item
DependencyObject parentObject = VisualTreeHelper.GetParent(child);
//we've reached the end of the tree
if (parentObject == null) return null;
//check if the parent matches the type we're looking for
T parent = parentObject as T;
if (parent != null)
return parent;
else
return FindParent<T>(parentObject);
}
}
}

View File

@ -11,6 +11,8 @@ using System.Windows.Controls;
using bsmd.database;
using System.Windows.Media.Imaging;
using System.Windows;
using System.Windows.Input;
namespace ENI2
{
@ -38,7 +40,12 @@ namespace ENI2
#region protected methods
public virtual void Initialize() { }
public virtual void Initialize() {
}
protected void SetLocodeStateImage(Image stateImage, LocodeState state)
{

View File

@ -39,20 +39,20 @@ namespace ENI2
displayIdLabel.Content = aCore.DisplayId;
// Listbox befüllen
this._listBoxList.Add(new MessageGroup() { MessageGroupName = "Overview", MessageGroupControlType = typeof(OverViewDetailControl), ImagePath = "Resources/documents.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = "Port Call", MessageGroupControlType = typeof(PortCallDetailControl), ImagePath = "Resources/eye_blue.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = "Port Notification", MessageGroupControlType = typeof(PortNotificationDetailControl), ImagePath = "Resources/anchor.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = "Waste", MessageGroupControlType = typeof(WasteDetailControl), ImagePath = "Resources/garbage.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = "Arrival Notification", MessageGroupControlType = typeof(ArrivalNotificationDetailControl), ImagePath = "Resources/arrow_down_right_red.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = "Security", MessageGroupControlType = typeof(SecurityDetailControl), ImagePath = "Resources/shield_yellow.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = "PSC 72h", MessageGroupControlType = typeof(PSC72hDetailControl), ImagePath = "Resources/alarmclock.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = "Maritime Health Declaration", MessageGroupControlType = typeof(MaritimeHealthDeclarationDetailControl), ImagePath = "Resources/medical_bag.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = "Ship Data", MessageGroupControlType = typeof(ShipDataDetailControl), ImagePath = "Resources/containership.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = "Border Police", MessageGroupControlType = typeof(BorderPoliceDetailControl), ImagePath = "Resources/policeman_german.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = "Departure Notification", MessageGroupControlType = typeof(DepartureNotificationDetailControl), ImagePath = "Resources/arrow_up_right_green.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = "Dangerous Goods Arrival", MessageGroupControlType = typeof(DangerousGoodsDetailControl), ImagePath = "Resources/sign_warning_radiation.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = "Dangerous Goods Departure", MessageGroupControlType = typeof(DangerousGoodsDetailControl), ImagePath = "Resources/sign_warning_radiation.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = "Towage", MessageGroupControlType = typeof(TowageDetailControl), ImagePath = "Resources/ship2.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textOverview, MessageGroupControlType = typeof(OverViewDetailControl), ImagePath = "Resources/documents.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textPortCall, MessageGroupControlType = typeof(PortCallDetailControl), ImagePath = "Resources/eye_blue.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textPortNotification, MessageGroupControlType = typeof(PortNotificationDetailControl), ImagePath = "Resources/anchor.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textWaste, MessageGroupControlType = typeof(WasteDetailControl), ImagePath = "Resources/garbage.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textArrivalNotification, MessageGroupControlType = typeof(ArrivalNotificationDetailControl), ImagePath = "Resources/arrow_down_right_red.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textSecurity, MessageGroupControlType = typeof(SecurityDetailControl), ImagePath = "Resources/shield_yellow.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textPSC72h, MessageGroupControlType = typeof(PSC72hDetailControl), ImagePath = "Resources/alarmclock.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textMDH, MessageGroupControlType = typeof(MaritimeHealthDeclarationDetailControl), ImagePath = "Resources/medical_bag.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textShipData, MessageGroupControlType = typeof(ShipDataDetailControl), ImagePath = "Resources/containership.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textBorderPolice, MessageGroupControlType = typeof(BorderPoliceDetailControl), ImagePath = "Resources/policeman_german.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textDepartureNotification, MessageGroupControlType = typeof(DepartureNotificationDetailControl), ImagePath = "Resources/arrow_up_right_green.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textDGArrival, MessageGroupControlType = typeof(DangerousGoodsDetailControl), ImagePath = "Resources/sign_warning_radiation.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textDGDeparture, MessageGroupControlType = typeof(DangerousGoodsDetailControl), ImagePath = "Resources/sign_warning_radiation.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textTowage, MessageGroupControlType = typeof(TowageDetailControl), ImagePath = "Resources/ship2.png" });
this.listBoxMessages.ItemsSource = this._listBoxList;

View File

@ -5,10 +5,12 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:enictrl="clr-namespace:ENI2.Controls"
xmlns:p="clr-namespace:ENI2.Properties"
xmlns:local="clr-namespace:ENI2.DetailViewControls"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="600">
<GroupBox Name="visitTransitGroupBox" Header="Visit/Transit">
<GroupBox Name="visitTransitGroupBox" Header="{x:Static p:Resources.textVisitTransit}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="24" />
@ -23,27 +25,28 @@
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="2*" />
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Anlaufhafen" />
<Grid Grid.Column="1" Grid.Row="0" Width="Auto">
<Label Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textPortCall}" />
<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>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<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" />
</Grid>
<Label Grid.Row="0" Grid.Column="2" Content="Visit/Transit-ID" />
</-->
<Label Grid.Row="0" Grid.Column="2" Content="{x:Static p:Resources.textVisitTransitId}" />
<TextBox Name="textBoxDisplayId" Grid.Row="0" Grid.Column="3" IsReadOnly="True" Margin="2"/>
<Label Grid.Row="1" Grid.Column="0" Content="IMO-Nummer" />
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textIMO}" />
<TextBox Name="textBoxIMO" Grid.Row="1" Grid.Column="1" Text="{Binding IMO}" Margin="2" />
<Label Grid.Row="1" Grid.Column="2" Content="ENI-Nummer" />
<Label Grid.Row="1" Grid.Column="2" Content="{x:Static p:Resources.textENI}" />
<TextBox Name="textBoxENI" Grid.Row="1" Grid.Column="3" Text="{Binding ENI}" Margin="2" />
<Label Grid.Row="2" Grid.Column="0" Content="ETA PoC" />
<Label Grid.Row="2" Grid.Column="2" Content="ETD PoC" />
<Label Grid.Row="3" Grid.Column="0" Content="ATA PoC" />
<Label Grid.Row="3" Grid.Column="2" Content="ATD PoC" />
<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"/>
<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"/>
<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}" />
<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}" />
</Grid>
</GroupBox>

View File

@ -26,47 +26,28 @@ namespace ENI2.DetailViewControls
/// <summary>
/// Interaction logic for OverViewDetailControl.xaml
/// </summary>
public partial class OverViewDetailControl : DetailBaseControl, INotifyPropertyChanged
public partial class OverViewDetailControl : DetailBaseControl
{
private Message _message = null;
private List<string> _locodePoCList = new List<string>();
public event PropertyChangedEventHandler PropertyChanged;
private Message _message = null;
public OverViewDetailControl()
{
InitializeComponent();
}
public List<string> LocodePoCList
{
get { return this._locodePoCList; }
set { this._locodePoCList = value; }
}
public string PoC
{
get { return this.Core.PoC; }
set { this.Core.PoC = value; }
}
}
public override void Initialize()
{
base.Initialize();
Message.NotificationClass notificationClass = this.Core.IsTransit ? Message.NotificationClass.TRANSIT : Message.NotificationClass.VISIT;
if (this.Messages == null) return;
if (this.Core == null) return;
this.textBoxENI.DataContext = this.Core;
this.textBoxIMO.DataContext = this.Core;
this.comboBoxPoC.DataContext = this;
this.locodePoC.DataContext = this.Core;
this.dateTimePickerETA.DataContext = this.Core;
//this.dateTimePickerETD.DataContext = ..
if (!this.Core.PoC.IsNullOrEmpty())
{
this._locodePoCList.Add(this.Core.PoC);
// LocodeState locodeState = LocodeDB.PortNameFromLocode(this.Core.PoC).IsNullOrEmpty() ? LocodeState.INVALID : LocodeState.OK;
}
//this.dateTimePickerETD.DataContext = ..
Binding vtBinding = new Binding();
vtBinding.Source = this.Core;
@ -90,39 +71,6 @@ namespace ENI2.DetailViewControls
}
this._initialized = true;
}
private void ComboBox_TextChanged(object sender, RoutedEventArgs e)
{
if (!_initialized) return;
if(this.comboBoxPoC.Text.Length > 3)
{
// check if actual locode
bool isLocode = !LocodeDB.PortNameFromLocode(this.comboBoxPoC.Text).IsNullOrEmpty();
if(isLocode)
{
this.SetLocodeStateImage(this.imagePoCState, LocodeState.OK);
return;
}
// assume this is a harbour name typed out..
this.LocodePoCList = LocodeDB.AllLocodesForCityName(this.comboBoxPoC.Text + "%");
if(this.LocodePoCList.Count == 1)
{
this.comboBoxPoC.SelectedItem = this.LocodePoCList[0];
this.SetLocodeStateImage(this.imagePoCState, LocodeState.OK);
}
else if(this.LocodePoCList.Count == 0)
{
this.SetLocodeStateImage(this.imagePoCState, LocodeState.INVALID);
}
else
{
this.SetLocodeStateImage(this.imagePoCState, LocodeState.AMBIGUOUS);
}
}
this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("LocodePoCList"));
}
}
}

View File

@ -6,16 +6,17 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
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"
d:DesignHeight="600" d:DesignWidth="800">
<GroupBox Name="portCallGroupBox" Header="Port Call">
<GroupBox Name="portCallGroupBox" Header="{x:Static p:Resources.textPortCall}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="280" />
<RowDefinition Height="250" />
</Grid.RowDefinitions>
<GroupBox Name="noaNodGroupBox" Header="Arrival/Departure" Margin="5, 20, 5, 0">
<GroupBox Name="noaNodGroupBox" Header="{x:Static p:Resources.textArrivalDeparture}" Margin="5, 20, 5, 0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
@ -31,38 +32,38 @@
<RowDefinition Height="24" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="ETA port of call" Name="label_ETAToPortOfCall"/>
<Label Grid.Row="0" Grid.Column="2" Content="ETD port of call" Name="label_ETDFromPortOfCall"/>
<Label Grid.Row="1" Grid.Column="0" Content="ETA Kiel Canal" Name="label_ETAToKielCanal"/>
<Label Grid.Row="1" Grid.Column="2" Content="ETD Kiel Canal" Name="label_ETDFromKielCanal"/>
<Label Grid.Row="2" Grid.Column="0" Content="Last port" Name="label_LastPort"/>
<Label Grid.Row="3" Grid.Column="0" Content="Next port" Name="label_NextPort"/>
<Label Grid.Row="2" Grid.Column="2" Content="ETD last port" Name="label_ETDFromLastport" />
<Label Grid.Row="3" Grid.Column="2" Content="ETA next port" Name="label_ETAToNextPort" />
<Label Grid.Row="4" Grid.Column="0" Content="Anchored" Name="label_IsAnchored" />
<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"/>
<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"/>
<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"/>
<xctk:DateTimePicker Grid.Column="3" Grid.Row="1" Value="{Binding ETDFromKielCanal, Mode=TwoWay}" Name="dateTimePicker_ETDFromKielCanal" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="False"/>
<xctk:DateTimePicker Grid.Column="3" Grid.Row="3" Value="{Binding ETAToNextPort, Mode=TwoWay}" Name="dateTimePicker_ETAToNextPort" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="False"/>
<xctk:DateTimePicker Grid.Column="3" Grid.Row="2" Value="{Binding ETDFromLastPort, Mode=TwoWay}" Name="dateTimePicker_ETDFromLastPort" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="False"/>
<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" />
<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}"/>
<xctk:DateTimePicker Grid.Column="3" Grid.Row="1" Value="{Binding ETDFromKielCanal, Mode=TwoWay}" Name="dateTimePicker_ETDFromKielCanal" 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" Value="{Binding ETAToNextPort, Mode=TwoWay}" Name="dateTimePicker_ETAToNextPort" 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" Value="{Binding ETDFromLastPort, Mode=TwoWay}" Name="dateTimePicker_ETDFromLastPort" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="False" ContextMenu="{DynamicResource ClearContextMenu}"/>
<enictrl:LocodeControl Grid.Column="1" Grid.Row="2" Width="Auto" x:Name="locodeControl_LastPort" LocodeValue="{Binding LastPort, Mode=TwoWay}"/>
<enictrl:LocodeControl Grid.Column="1" Grid.Row="3" Width="Auto" x:Name="locodeControl_NextPort" LocodeValue="{Binding NextPort, Mode=TwoWay}"/>
<CheckBox Grid.Column="1" Grid.Row="4" IsThreeState="True" VerticalContentAlignment="Center" Name="checkBox_IsAnchored" IsChecked="{Binding IsAnchored}"/>
<GroupBox Grid.Row="5" Grid.ColumnSpan="4" Name="groupBoxCallPurpose" Header="Call Purposes" >
<GroupBox Grid.Row="5" Grid.ColumnSpan="4" Name="groupBoxCallPurpose" Header="{x:Static p:Resources.textCallPurposes}" >
<enictrl:ENIDataGrid x:Name="dataGridCallPurposes" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
SelectionMode="Single" AutoGenerateColumns="False" Margin="0,5,0,0">
<DataGrid.Columns>
<DataGridTextColumn Header="Code" Binding="{Binding CallPurposeCode, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
<DataGridTextColumn Header="Description" Binding="{Binding CallPurposeDescription, Mode=TwoWay}" IsReadOnly="True" Width="0.9*" />
<DataGridTextColumn Header="{x:Static p:Resources.textCode}" Binding="{Binding CallPurposeCode, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
<DataGridTextColumn Header="{x:Static p:Resources.textDescription}" Binding="{Binding CallPurposeDescription, Mode=TwoWay}" IsReadOnly="True" Width="0.9*" />
</DataGrid.Columns>
</enictrl:ENIDataGrid>
</GroupBox>
</Grid>
</GroupBox>
<GroupBox Name="agentGroupBox" Header="Agent" Grid.Row="1" Margin="5, 20, 5, 0">
<GroupBox Name="agentGroupBox" Header="{x:Static p:Resources.textAgent}" Grid.Row="1" Margin="5, 20, 5, 0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="24" />
@ -81,16 +82,16 @@
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="2*" />
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Company name " Name="label_AgentCompanyName"/>
<Label Grid.Row="1" Grid.Column="0" Content="Street / number" Name="label_AgentStreetAndNumber"/>
<Label Grid.Row="2" Grid.Column="0" Content="Postalcode" Name="label_AgentPostalCode"/>
<Label Grid.Row="5" Grid.Column="0" Content="Last name" Name="label_AgentLastName"/>
<Label Grid.Row="6" Grid.Column="0" Content="Phone" Name="label_AgentPhone" />
<Label Grid.Row="7" Grid.Column="0" Content="E-Mail" Name="label_AgentEMail" />
<Label Grid.Row="2" Grid.Column="2" Content="City" Name="label_AgentCity" />
<Label Grid.Row="5" Grid.Column="2" Content="First name" Name="label_AgentFirstName"/>
<Label Grid.Row="6" Grid.Column="2" Content="Fax" Name="label_AgentFax"/>
<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"/>
<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}" />

View File

@ -30,7 +30,7 @@ namespace ENI2.DetailViewControls
public partial class PortCallDetailControl : DetailBaseControl
{
private NOA_NOD _noa_nod;
private AGNT _agnt;
private AGNT _agnt;
public PortCallDetailControl()
{
@ -74,7 +74,8 @@ namespace ENI2.DetailViewControls
this.dataGridCallPurposes.EditRequested += DataGridCallPurposes_EditRequested;
this.dataGridCallPurposes.AddingNewItem += DataGridCallPurposes_AddingNewItem;
this.dataGridCallPurposes.CreateRequested += DataGridCallPurposes_CreateRequested;
this.dataGridCallPurposes.DeleteRequested += DataGridCallPurposes_DeleteRequested;
this.dataGridCallPurposes.DeleteRequested += DataGridCallPurposes_DeleteRequested;
this.agentGroupBox.DataContext = _agnt;
@ -84,9 +85,7 @@ namespace ENI2.DetailViewControls
this.dateTimePicker_ETDFromKielCanal.DataContext = _noa_nod;
this.dateTimePicker_ETDFromLastPort.DataContext = _noa_nod;
this.dateTimePicker_ETDFromPortOfCall.DataContext = _noa_nod;
}
}
private void DataGridCallPurposes_DeleteRequested(DatabaseEntity obj)
{

View File

@ -5,9 +5,93 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
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"
d:DesignHeight="300" d:DesignWidth="300">
<Grid>
</Grid>
d:DesignHeight="800" d:DesignWidth="800">
<GroupBox Name="portNotificationGroupBox" Header="{x:Static p:Resources.textPortNotification}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50" />
<RowDefinition Height="220" />
<RowDefinition Height="200" />
<RowDefinition Height="200" />
</Grid.RowDefinitions>
<GroupBox Name="nameGroupBox" Header="{x:Static p:Resources.textMaster}" Grid.Row="0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="5*" />
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textNameMaster}" Name="label_nameMaster"/>
<TextBox Grid.Row="0" Grid.Column="1" Name="textBox_NameMaster" MaxLength="100" Margin="2" Text="{Binding NameOfMaster}" VerticalContentAlignment="Center" VerticalAlignment="Center"/>
</Grid>
</GroupBox>
<GroupBox Name="infoGroupBox" Header="{x:Static p:Resources.textInfo}" Grid.Row="1" Margin="0,5,0,5">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="2*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="26" />
<RowDefinition Height="26" />
<RowDefinition Height="26" />
<RowDefinition Height="26" />
<RowDefinition Height="26" />
<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"/>
<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}" />
<TextBox Grid.Row="3" Grid.Column="1" Name="textBowThrusterPower" Margin="2" Text="{Binding BowThrusterPower}" />
<TextBox Grid.Row="4" Grid.Column="1" Name="textSternThrusterPower" Margin="2" Text="{Binding SternThrusterPower}" />
<CheckBox Grid.Row="5" Grid.Column="1" Name="checkBoxFumigatedBulkCargo" IsThreeState="True" VerticalContentAlignment="Center" IsChecked="{Binding FumigatedBulkCargo}" Margin="2"/>
<xctk:DoubleUpDown Grid.Row="6" Grid.Column="1" Name="doubleUpDownDisplacementSummerDraught" ShowButtonSpinner="False" ParsingNumberStyle="Any" Value="{Binding DeplacementSummerDraught_TNE}" Margin="2" FormatString="N1"/>
<TextBox Grid.Row="2" Grid.Column="3" Grid.RowSpan="2" Name="textSpecialRequirements" Margin="2" Text="{Binding SpecialRequirementsOfShipAtBerth}" />
<TextBox Grid.Row="4" Grid.Column="3" Grid.RowSpan="2" Name="textConstructionCharacteristics" Margin="2" Text="{Binding ConstructionCharacteristicsOfShip}" />
</Grid>
</GroupBox>
<GroupBox Name="servGroupBox" Header="{x:Static p:Resources.textServ}" Grid.Row="2">
<enictrl:ENIDataGrid x:Name="dataGridSERV" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
SelectionMode="Single" AutoGenerateColumns="False" Margin="0,5,0,0">
<DataGrid.Columns>
<DataGridTextColumn Header="{x:Static p:Resources.textServiceName}" Binding="{Binding ServiceName, Mode=TwoWay}" IsReadOnly="True" Width="0.3*" />
<DataGridTextColumn Header="{x:Static p:Resources.textServiceBeneficiary}" Binding="{Binding ServiceBeneficiary, Mode=TwoWay}" IsReadOnly="True" Width="0.3*" />
<DataGridTextColumn Header="{x:Static p:Resources.textServiceInvoiceRecipient}" Binding="{Binding ServiceInvoiceRecipient, Mode=TwoWay}" IsReadOnly="True" Width="0.4*" />
</DataGrid.Columns>
</enictrl:ENIDataGrid>
</GroupBox>
<GroupBox Name="ladgGroupBox" Header="{x:Static p:Resources.textLadg}" Grid.Row="3">
<enictrl:ENIDataGrid x:Name="dataGridLADG" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
SelectionMode="Single" AutoGenerateColumns="False" Margin="0,5,0,0">
<DataGrid.Columns>
<DataGridTextColumn Header="{x:Static p:Resources.textCargoCodeNST}" Binding="{Binding CallCodeNST, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
<DataGridTextColumn Header="{x:Static p:Resources.textLACodes}" Binding="{Binding CargoLACode, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
<DataGridTextColumn Header="{x:Static p:Resources.textCargoCodeNST}" Binding="{Binding CargoCodeNST, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
<DataGridTextColumn Header="{x:Static p:Resources.textCargoCodeNST3}" Binding="{Binding CargoCodeNST_3, Mode=TwoWay}" IsReadOnly="True" Width="0.15*" />
<DataGridTextColumn Header="{x:Static p:Resources.textCargoNumberOfItems}" Binding="{Binding CargoNumberOfItems, Mode=TwoWay}" IsReadOnly="True" Width="0.15*" />
<DataGridTextColumn Header="{x:Static p:Resources.textCargoGrossQuantity}" Binding="{Binding CargoLGrossQuantity_TNE, Mode=TwoWay}" IsReadOnly="True" Width="0.15*" />
<DataGridTextColumn Header="{x:Static p:Resources.textCargoPortOfLoading}" Binding="{Binding PortOfLoading, Mode=TwoWay}" IsReadOnly="True" Width="0.15*" />
<DataGridTextColumn Header="{x:Static p:Resources.textCargoPortOfDischarge}" Binding="{Binding PortOfDischarge, Mode=TwoWay}" IsReadOnly="True" Width="0.15*" />
</DataGrid.Columns>
</enictrl:ENIDataGrid>
</GroupBox>
</Grid>
</GroupBox>
</src:DetailBaseControl>

View File

@ -1,5 +1,5 @@
// Copyright (c) 2017 schick Informatik
// Description:
// Description: Detailansicht Gruppe Port Notification
//
using System;
@ -16,6 +16,10 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using ENI2.EditControls;
using bsmd.database;
namespace ENI2.DetailViewControls
{
@ -24,9 +28,200 @@ namespace ENI2.DetailViewControls
/// </summary>
public partial class PortNotificationDetailControl : DetailBaseControl
{
private Message _nameMessage;
private Message _infoMessage;
private Message _servMessage;
private Message _ladgMessage;
private static string[] shippingAreas = {
Properties.Resources.textShippingAreaNORTHBALTIC,
Properties.Resources.textShippingAreaEUROPE,
Properties.Resources.textShippingAreaOverseas
};
public PortNotificationDetailControl()
{
InitializeComponent();
}
public override void Initialize()
{
base.Initialize();
foreach (Message aMessage in this.Messages)
{
if (aMessage.MessageNotificationClass == Message.NotificationClass.NAME) this._nameMessage = aMessage;
if (aMessage.MessageNotificationClass == Message.NotificationClass.INFO) this._infoMessage = aMessage;
if (aMessage.MessageNotificationClass == Message.NotificationClass.SERV) this._servMessage = aMessage;
if (aMessage.MessageNotificationClass == Message.NotificationClass.LADG) this._ladgMessage = aMessage;
}
#region init NAME
if (this._nameMessage == null)
{
this._nameMessage = this.Core.CreateMessage(Message.NotificationClass.NAME);
this.Messages.Add(this._nameMessage);
}
NAME name = null;
if(this._nameMessage.Elements.Count > 0)
name = this._nameMessage.Elements[0] as NAME;
if (name == null) {
name = new NAME();
name.MessageCore = this.Core;
name.MessageHeader = this._nameMessage;
_nameMessage.Elements.Add(name);
}
this.textBox_NameMaster.DataContext = name;
#endregion
#region init INFO
if(this._infoMessage == null)
{
this._infoMessage = this.Core.CreateMessage(Message.NotificationClass.INFO);
this.Messages.Add(this._infoMessage);
}
INFO info = null;
if(this._infoMessage.Elements.Count > 0)
info = this._infoMessage.Elements[0] as INFO;
if(info == null)
{
info = new INFO();
info.MessageCore = this.Core;
info.MessageHeader = this._infoMessage;
_infoMessage.Elements.Add(info);
}
this.comboBoxShippingArea.ItemsSource = shippingAreas;
this.infoGroupBox.DataContext = info;
#endregion
#region init SERV
if(this._servMessage == null)
{
this._servMessage = this.Core.CreateMessage(Message.NotificationClass.SERV);
this.Messages.Add(this._servMessage);
}
this.dataGridSERV.Initialize();
this.dataGridSERV.ItemsSource = this._servMessage.Elements;
this.dataGridSERV.AddingNewItem += DataGridSERV_AddingNewItem;
this.dataGridSERV.EditRequested += DataGridSERV_EditRequested;
this.dataGridSERV.DeleteRequested += DataGridSERV_DeleteRequested;
this.dataGridSERV.CreateRequested += DataGridSERV_CreateRequested;
#endregion
#region init LADG
if(this._ladgMessage == null)
{
this._ladgMessage = this.Core.CreateMessage(Message.NotificationClass.LADG);
this.Messages.Add(this._ladgMessage);
}
this.dataGridLADG.Initialize();
this.dataGridLADG.ItemsSource = this._ladgMessage.Elements;
this.dataGridLADG.AddingNewItem += DataGridLADG_AddingNewItem;
this.dataGridLADG.EditRequested += DataGridLADG_EditRequested;
this.dataGridLADG.DeleteRequested += DataGridLADG_DeleteRequested;
this.dataGridLADG.CreateRequested += DataGridLADG_CreateRequested;
#endregion
}
private void DataGridLADG_CreateRequested()
{
LADG ladg = new LADG();
EditLADGDialog eld = new EditLADGDialog();
eld.LADG = ladg;
if (eld.ShowDialog() ?? false)
{
ladg.MessageHeader = _ladgMessage;
_ladgMessage.Elements.Add(ladg);
this.dataGridLADG.Items.Refresh();
}
}
private void DataGridLADG_DeleteRequested(DatabaseEntity obj)
{
LADG ladg = obj as LADG;
if (ladg != null)
{
// are you sure dialog is in base class
this._ladgMessage.Elements.Remove(ladg);
// DBManager.Instance.Delete(ladg); // not yet
this.dataGridLADG.Items.Refresh();
}
}
private void DataGridLADG_EditRequested(DatabaseEntity obj)
{
LADG ladg = obj as LADG;
if(ladg != null)
{
EditLADGDialog eld = new EditLADGDialog();
eld.LADG = ladg;
if (eld.ShowDialog() ?? false)
this.dataGridLADG.Items.Refresh();
}
}
private void DataGridLADG_AddingNewItem(object sender, AddingNewItemEventArgs e)
{
this.DataGridLADG_CreateRequested();
}
private void DataGridSERV_CreateRequested()
{
SERV serv = new SERV();
EditSERVDialog esd = new EditSERVDialog();
esd.SERV = serv;
if(esd.ShowDialog() ?? false)
{
serv.MessageHeader = _servMessage;
_servMessage.Elements.Add(serv);
this.dataGridSERV.Items.Refresh();
}
}
private void DataGridSERV_DeleteRequested(DatabaseEntity obj)
{
SERV serv = obj as SERV;
if (serv != null)
{
// are you sure dialog is in base class
_servMessage.Elements.Remove(serv);
// DBManager.Instance.Delete(serv); // not yet
this.dataGridSERV.Items.Refresh();
}
}
private void DataGridSERV_EditRequested(DatabaseEntity obj)
{
SERV serv = obj as SERV;
if(serv != null)
{
EditSERVDialog esd = new EditSERVDialog();
esd.SERV = serv;
if (esd.ShowDialog() ?? false)
this.dataGridSERV.Items.Refresh();
}
}
private void DataGridSERV_AddingNewItem(object sender, AddingNewItemEventArgs e)
{
this.DataGridSERV_CreateRequested();
}
}
}

View File

@ -35,7 +35,7 @@
<MinimumRequiredVersion>3.5.1.0</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.html</WebPage>
<ApplicationRevision>7</ApplicationRevision>
<ApplicationRevision>9</ApplicationRevision>
<ApplicationVersion>3.5.6.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
@ -164,6 +164,7 @@
<Compile Include="Controls\LocodeControl.xaml.cs">
<DependentUpon>LocodeControl.xaml</DependentUpon>
</Compile>
<Compile Include="CustomCommands.cs" />
<Compile Include="DetailBaseControl.cs" />
<Compile Include="DetailRootControl.xaml.cs">
<DependentUpon>DetailRootControl.xaml</DependentUpon>
@ -210,6 +211,12 @@
<Compile Include="EditControls\EditCallPurposeDialog.xaml.cs">
<DependentUpon>EditCallPurposeDialog.xaml</DependentUpon>
</Compile>
<Compile Include="EditControls\EditLADGDialog.xaml.cs">
<DependentUpon>EditLADGDialog.xaml</DependentUpon>
</Compile>
<Compile Include="EditControls\EditSERVDialog.xaml.cs">
<DependentUpon>EditSERVDialog.xaml</DependentUpon>
</Compile>
<Compile Include="SucheControl.xaml.cs">
<DependentUpon>SucheControl.xaml</DependentUpon>
</Compile>
@ -285,6 +292,14 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="EditControls\EditLADGDialog.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="EditControls\EditSERVDialog.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>

View File

@ -5,8 +5,9 @@
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="Edit call purpose" Height="150" Width="300" WindowStyle="SingleBorderWindow" Background="AliceBlue">
Title="{x:Static p:Resources.textCallPurposes}" Height="150" Width="300" WindowStyle="SingleBorderWindow" Background="AliceBlue">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="30" />
@ -16,8 +17,8 @@
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="2*" />
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Code" />
<Label Grid.Row="1" Grid.Column="0" Content="Description" />
<Label Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textCode}" />
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textDescription}" />
<ComboBox Grid.Row="0" Grid.Column="1" Width="auto" Name="comboBoxCode" Margin="2" TextBlock.TextAlignment="Center" SelectionChanged="comboBoxCode_Selected"/>
<TextBox Grid.Row="1" Grid.Column="1" Width="auto" Name="textBoxDescription" Margin="2" MinLines="2" TextWrapping="Wrap" AcceptsReturn="True" MaxLength="100" />

View File

@ -1,4 +1,8 @@
using System;
// Copyright (c) 2017 schick Informatik
// Description:
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@ -70,7 +74,8 @@ namespace ENI2.EditControls
if(itemList == null)
{
this.itemList = new List<string>();
for (int i = 0; i < edifact8025Codes.Length; i++)
this.itemList.Add("");
for (int i = 1; i < edifact8025Codes.Length; i++)
this.itemList.Add(string.Format("{0} - {1}", i, edifact8025Codes[i]));
}
return itemList;
@ -82,7 +87,7 @@ namespace ENI2.EditControls
this.OKClicked += EditCallPurposeDialog_OKClicked;
this.comboBoxCode.ItemsSource = this.EdiCodes;
if(this.CallPurpose != null)
if((this.CallPurpose != null) && (this.CallPurpose.CallPurposeCode != 0))
{
this.comboBoxCode.SelectedIndex = this.CallPurpose.CallPurposeCode;
this.textBoxDescription.Text = this.CallPurpose.CallPurposeDescription;
@ -98,7 +103,11 @@ namespace ENI2.EditControls
private void comboBoxCode_Selected(object sender, RoutedEventArgs e)
{
this.textBoxDescription.Text = edifact8025Codes[this.comboBoxCode.SelectedIndex];
if (this.comboBoxCode.SelectedIndex != this.CallPurpose.CallPurposeCode)
{
this.textBoxDescription.Text = edifact8025Codes[this.comboBoxCode.SelectedIndex];
this.OnOkClicked();
}
}
}
}

View File

@ -0,0 +1,35 @@
<enictrl:EditWindowBase x:Class="ENI2.EditControls.EditLADGDialog"
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.textLadg}" Height="250" 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="28" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="2*" />
</Grid.ColumnDefinitions>
<Label Name="labelHandlingType" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textCargoHandlingType}" />
<Label Name="labelCodeNST" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textCargoCodeNST}" />
<Label Name="labelLACode" Grid.Row="0" Grid.Column="2" Content="{x:Static p:Resources.textLACodes}" />
<Label Name="labelNumberOfItems" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textCargoNumberOfItems}" />
<Label Name="labelGrossQuantity" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textCargoGrossQuantity}" />
<Label Name="labelPortOfLoading" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textCargoPortOfLoading}" />
<Label Name="labelPortOfDischarge" Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textCargoPortOfDischarge}" />
<Label Name="labelCodeNST3" Grid.Row="1" Grid.Column="2" Content="{x:Static p:Resources.textCargoCodeNST3}" />
</Grid>
</enictrl:EditWindowBase>

View File

@ -0,0 +1,37 @@
// Copyright (c) 2017 schick Informatik
// 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.Shapes;
using bsmd.database;
using ENI2.Controls;
namespace ENI2.EditControls
{
/// <summary>
/// Interaction logic for EditLADGDialog.xaml
/// </summary>
public partial class EditLADGDialog : EditWindowBase
{
public EditLADGDialog()
{
InitializeComponent();
}
public LADG LADG { get; set; }
}
}

View File

@ -0,0 +1,28 @@
<enictrl:EditWindowBase x:Class="ENI2.EditControls.EditSERVDialog"
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.textServ}" Height="270" Width="400" WindowStyle="SingleBorderWindow" Background="AliceBlue">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="28" />
<RowDefinition Height="84" />
<RowDefinition Height="84" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="2*" />
</Grid.ColumnDefinitions>
<Label Name="labelServiceName" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textServiceName}" />
<Label Name="labelServiceBeneficiary" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textServiceBeneficiary}" />
<Label Name="labelServiceInvoiceRecipient" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textServiceInvoiceRecipient}" />
<TextBox Grid.Row="0" Grid.Column="1" Width="auto" Name="textBoxServiceName" Margin="2" MinLines="2" MaxLength="100" />
<TextBox Grid.Row="1" Grid.Column="1" Width="auto" Name="textBoxServiceBeneficiary" Margin="2" MinLines="2" TextWrapping="Wrap" AcceptsReturn="True" MaxLength="100" />
<TextBox Grid.Row="2" Grid.Column="1" Width="auto" Name="textBoxServiceInvoiceRecipient" Margin="2" MinLines="2" TextWrapping="Wrap" AcceptsReturn="True" MaxLength="100" />
</Grid>
</enictrl:EditWindowBase>

View File

@ -0,0 +1,55 @@
// Copyright (c) 2017 schick Informatik
// 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.Shapes;
using bsmd.database;
using ENI2.Controls;
namespace ENI2.EditControls
{
/// <summary>
/// Interaction logic for EditSERVDialog.xaml
/// </summary>
public partial class EditSERVDialog : EditWindowBase
{
public EditSERVDialog()
{
InitializeComponent();
Loaded += EditSERVDialog_Loaded;
}
private void EditSERVDialog_Loaded(object sender, RoutedEventArgs e)
{
this.OKClicked += EditSERVDialog_OKClicked;
// copy into fields
this.textBoxServiceName.Text = this.SERV.ServiceName;
this.textBoxServiceBeneficiary.Text = this.SERV.ServiceBeneficiary;
this.textBoxServiceInvoiceRecipient.Text = this.SERV.ServiceInvoiceRecipient;
}
private void EditSERVDialog_OKClicked()
{
// copy back
this.SERV.ServiceName = this.textBoxServiceName.Text.Trim();
this.SERV.ServiceBeneficiary = this.textBoxServiceBeneficiary.Text.Trim();
this.SERV.ServiceInvoiceRecipient = this.textBoxServiceInvoiceRecipient.Text.Trim();
}
public SERV SERV { get; set; }
}
}

View File

@ -8,7 +8,11 @@
mc:Ignorable="d"
Title="ENI 2" Height="350" Width="525" 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"/>

View File

@ -5,18 +5,9 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
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;
@ -131,5 +122,32 @@ namespace ENI2
}
#endregion
#region Command event handler
private void ExecutedClearCommand(object sender, ExecutedRoutedEventArgs e)
{
Xceed.Wpf.Toolkit.DateTimePicker dtPicker = e.OriginalSource as Xceed.Wpf.Toolkit.DateTimePicker;
if (dtPicker == null)
dtPicker = CustomCommands.FindParent<Xceed.Wpf.Toolkit.DateTimePicker>(e.OriginalSource as DependencyObject);
if(dtPicker != null)
{
dtPicker.Value = null;
}
}
private void CanExecuteClearCommand(object sender, CanExecuteRoutedEventArgs e)
{
// validate?
e.CanExecute = true;
}
#endregion
}
}

View File

@ -1,378 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ENI2.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ENI2.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap add {
get {
object obj = ResourceManager.GetObject("add", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap alarmclock {
get {
object obj = ResourceManager.GetObject("alarmclock", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap anchor {
get {
object obj = ResourceManager.GetObject("anchor", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap arrow_down_right_red {
get {
object obj = ResourceManager.GetObject("arrow_down_right_red", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap arrow_up_right_green {
get {
object obj = ResourceManager.GetObject("arrow_up_right_green", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap bullet_ball_green {
get {
object obj = ResourceManager.GetObject("bullet_ball_green", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap bullet_ball_grey {
get {
object obj = ResourceManager.GetObject("bullet_ball_grey", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap bullet_ball_red {
get {
object obj = ResourceManager.GetObject("bullet_ball_red", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap bullet_ball_yellow {
get {
object obj = ResourceManager.GetObject("bullet_ball_yellow", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
public static System.Drawing.Icon containership {
get {
object obj = ResourceManager.GetObject("containership", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap containership1 {
get {
object obj = ResourceManager.GetObject("containership1", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap delete {
get {
object obj = ResourceManager.GetObject("delete", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap document_plain {
get {
object obj = ResourceManager.GetObject("document_plain", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap documents {
get {
object obj = ResourceManager.GetObject("documents", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap edit {
get {
object obj = ResourceManager.GetObject("edit", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap ef_logo {
get {
object obj = ResourceManager.GetObject("ef_logo", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap EUREPORT {
get {
object obj = ResourceManager.GetObject("EUREPORT", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap eye_blue {
get {
object obj = ResourceManager.GetObject("eye_blue", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap floppy_disk_blue {
get {
object obj = ResourceManager.GetObject("floppy_disk_blue", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap garbage {
get {
object obj = ResourceManager.GetObject("garbage", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
public static System.Drawing.Icon logo_schwarz {
get {
object obj = ResourceManager.GetObject("logo_schwarz", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap medical_bag {
get {
object obj = ResourceManager.GetObject("medical_bag", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap policeman_german {
get {
object obj = ResourceManager.GetObject("policeman_german", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap printer {
get {
object obj = ResourceManager.GetObject("printer", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap shield_yellow {
get {
object obj = ResourceManager.GetObject("shield_yellow", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap ship2 {
get {
object obj = ResourceManager.GetObject("ship2", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap sign_warning_radiation {
get {
object obj = ResourceManager.GetObject("sign_warning_radiation", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized string similar to Are you sure?.
/// </summary>
public static string textAreYouSure {
get {
return ResourceManager.GetString("textAreYouSure", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Confirm deletion.
/// </summary>
public static string textCaptionDeleteConfirm {
get {
return ResourceManager.GetString("textCaptionDeleteConfirm", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Declarations.
/// </summary>
public static string textDeclarations {
get {
return ResourceManager.GetString("textDeclarations", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Operations.
/// </summary>
public static string textOperations {
get {
return ResourceManager.GetString("textOperations", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Search.
/// </summary>
public static string textSearch {
get {
return ResourceManager.GetString("textSearch", resourceCulture);
}
}
}
}

View File

@ -214,4 +214,247 @@
<data name="textCaptionDeleteConfirm" xml:space="preserve">
<value>Confirm deletion</value>
</data>
<data name="textTypeLocode" xml:space="preserve">
<value>Type for Locode...</value>
</data>
<data name="textAdd" xml:space="preserve">
<value>_Add</value>
</data>
<data name="textEdit" xml:space="preserve">
<value>_Edit</value>
</data>
<data name="textDelete" xml:space="preserve">
<value>_Delete</value>
</data>
<data name="textExport" xml:space="preserve">
<value>_Export</value>
</data>
<data name="textShowAsText" xml:space="preserve">
<value>_Show as text</value>
</data>
<data name="textPrint" xml:space="preserve">
<value>_Print</value>
</data>
<data name="textPortCall" xml:space="preserve">
<value>Port Call</value>
</data>
<data name="textArrivalDeparture" xml:space="preserve">
<value>Arrival/Departure</value>
</data>
<data name="textETAPortOfCall" xml:space="preserve">
<value>ETA port of call</value>
</data>
<data name="textETAKielCanal" xml:space="preserve">
<value>ETA Kiel Canal</value>
</data>
<data name="textLastPort" xml:space="preserve">
<value>Last Port</value>
</data>
<data name="textNextPort" xml:space="preserve">
<value>Next Port</value>
</data>
<data name="textETDPortOfCall" xml:space="preserve">
<value>ETD port of call</value>
</data>
<data name="textETDKielCanal" xml:space="preserve">
<value>ETD Kiel Canal</value>
</data>
<data name="textETDLastPort" xml:space="preserve">
<value>ETD last port</value>
</data>
<data name="textETANextPort" xml:space="preserve">
<value>ETA next port</value>
</data>
<data name="textAnchored" xml:space="preserve">
<value>Anchored</value>
</data>
<data name="textCallPurposes" xml:space="preserve">
<value>Call Purposes</value>
</data>
<data name="textCode" xml:space="preserve">
<value>Code</value>
</data>
<data name="textDescription" xml:space="preserve">
<value>Description</value>
</data>
<data name="textAgent" xml:space="preserve">
<value>Agent</value>
</data>
<data name="textCompanyName" xml:space="preserve">
<value>Company name</value>
</data>
<data name="textStreetNumber" xml:space="preserve">
<value>Street / number</value>
</data>
<data name="textPostalCode" xml:space="preserve">
<value>Postalcode</value>
</data>
<data name="textCity" xml:space="preserve">
<value>City</value>
</data>
<data name="textLastName" xml:space="preserve">
<value>Last name</value>
</data>
<data name="textPhone" xml:space="preserve">
<value>Phone</value>
</data>
<data name="textEMail" xml:space="preserve">
<value>E-Mail</value>
</data>
<data name="textFirstName" xml:space="preserve">
<value>First name</value>
</data>
<data name="textFax" xml:space="preserve">
<value>Fax</value>
</data>
<data name="textVisitTransit" xml:space="preserve">
<value>Visit / transit</value>
</data>
<data name="textPortCall" xml:space="preserve">
<value>Port of call</value>
</data>
<data name="textIMO" xml:space="preserve">
<value>IMO number</value>
</data>
<data name="textVisitTransitId" xml:space="preserve">
<value>Visit / transit id</value>
</data>
<data name="textENI" xml:space="preserve">
<value>ENI number</value>
</data>
<data name="textATAPortOfCall" xml:space="preserve">
<value>ATA port of call</value>
</data>
<data name="textATDPortOfCall" xml:space="preserve">
<value>ATD port of call</value>
</data>
<data name="textOverview" xml:space="preserve">
<value>Overview</value>
</data>
<data name="textPortNotification" xml:space="preserve">
<value>Port notification</value>
</data>
<data name="textWaste" xml:space="preserve">
<value>Waste</value>
</data>
<data name="textArrivalNotification" xml:space="preserve">
<value>Arrival notification</value>
</data>
<data name="textSecurity" xml:space="preserve">
<value>Security</value>
</data>
<data name="textPSC72h" xml:space="preserve">
<value>PSC 72h</value>
</data>
<data name="textMDH" xml:space="preserve">
<value>Maritime health declaration</value>
</data>
<data name="textShipData" xml:space="preserve">
<value>Ship data</value>
</data>
<data name="textBorderPolice" xml:space="preserve">
<value>Border Police</value>
</data>
<data name="textDepartureNotification" xml:space="preserve">
<value>Departure notification</value>
</data>
<data name="textDGArrival" xml:space="preserve">
<value>Dangerous goods arrival</value>
</data>
<data name="textDGDeparture" xml:space="preserve">
<value>Dangerous goods departuer</value>
</data>
<data name="textTowage" xml:space="preserve">
<value>Towage</value>
</data>
<data name="textMaster" xml:space="preserve">
<value>Master</value>
</data>
<data name="textNameMaster" xml:space="preserve">
<value>Name of master</value>
</data>
<data name="textInfo" xml:space="preserve">
<value>Info</value>
</data>
<data name="textClear" xml:space="preserve">
<value>Clear</value>
</data>
<data name="textShippingArea" xml:space="preserve">
<value>Shipping area</value>
</data>
<data name="textRequestedPositionInPortOfCall" xml:space="preserve">
<value>Requested position in port of call</value>
</data>
<data name="textSpecialRequirementsOfShipAtBerth" xml:space="preserve">
<value>Special requirements</value>
</data>
<data name="textConstructionCharacteristics" xml:space="preserve">
<value>Construction characteristics</value>
</data>
<data name="textFumigatedBulkCargo" xml:space="preserve">
<value>Fumigated bulk cargo</value>
</data>
<data name="textDeplacementSummerDraught" xml:space="preserve">
<value>Deplacement summer draught</value>
</data>
<data name="textPortArea" xml:space="preserve">
<value>Port area</value>
</data>
<data name="textBowThrusterPower" xml:space="preserve">
<value>Bow thruster power</value>
</data>
<data name="textSternThrusterPower" xml:space="preserve">
<value>Stern thruster power</value>
</data>
<data name="textPortFacility" xml:space="preserve">
<value>Port facility</value>
</data>
<data name="textServ" xml:space="preserve">
<value>Ship services</value>
</data>
<data name="textLadg" xml:space="preserve">
<value>Cargo</value>
</data>
<data name="textServiceName" xml:space="preserve">
<value>Service name</value>
</data>
<data name="textServiceBeneficiary" xml:space="preserve">
<value>Beneficiary</value>
</data>
<data name="textServiceInvoiceRecipient" xml:space="preserve">
<value>Invoice recipient</value>
</data>
<data name="textCargoHandlingType" xml:space="preserve">
<value>Handling type</value>
</data>
<data name="textCargoCodeNST" xml:space="preserve">
<value>Code (NST)</value>
</data>
<data name="textCargoNumberOfItems" xml:space="preserve">
<value>Number of items</value>
</data>
<data name="textCargoGrossQuantity" xml:space="preserve">
<value>Gross quantity</value>
</data>
<data name="textCargoPortOfLoading" xml:space="preserve">
<value>Port of loading</value>
</data>
<data name="textCargoPortOfDischarge" xml:space="preserve">
<value>Port of discharge</value>
</data>
<data name="textCargoCodeNST3" xml:space="preserve">
<value>Code NST 3rd</value>
</data>
<data name="textLACodes" xml:space="preserve">
<value>LA Code</value>
</data>
<data name="textShippingAreaNORTHBALTIC" xml:space="preserve">
<value>North / Baltic Sea</value>
</data>
<data name="textShippingAreaEUROPE" xml:space="preserve">
<value>Europe</value>
</data>
<data name="textShippingAreaOverseas" xml:space="preserve">
<value>Overseas</value>
</data>
</root>

View File

@ -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"/>
<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}"/>
<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"/>
<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}"/>
</Grid>
<TextBox Grid.Column="3" Grid.Row="2" Name="textBoxTicketNr" Margin="2"/>
@ -57,7 +57,7 @@
<Button Grid.Column="2" Grid.Row="3" Grid.ColumnSpan="2" Content="Search" Name="buttonSuche" Click="buttonSuche_Click" Margin="2"/>
<Label Name="searchResultLabel" Grid.ColumnSpan="4" Grid.Row="4" VerticalContentAlignment="Center" />
</Grid>
<DataGrid Grid.Row="1" Margin="0,8,0,0" x:Name="dataGrid" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
<DataGrid Grid.Row="1" Margin="0,8,0,0" x:Name="dataGrid" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" CanUserAddRows="False"
SelectionMode="Single" AutoGenerateColumns="False" MouseDoubleClick="dataGrid_MouseDoubleClick" PreviewKeyDown="dataGrid_PreviewKeyDown" >
<DataGrid.Columns>
<DataGridTextColumn Header="Type" Binding="{Binding HerbergReportType}" IsReadOnly="True" />

View File

@ -2,6 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:enictrl="clr-namespace:ENI2.Controls"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:local="clr-namespace:ENI2">
@ -27,7 +28,7 @@
BorderThickness="{TemplateBinding BorderThickness}">
/-->
<Grid Background="{TemplateBinding Background}" Margin="2">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="30" />
@ -43,4 +44,5 @@
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

Binary file not shown.

View File

@ -454,6 +454,21 @@ namespace bsmd.database
#endregion
#region public methods
public Message CreateMessage(Message.NotificationClass notificationClass)
{
// hier wird keine Validierung gemacht, ob die Messageklasse schon vorhanden ist!!
Message result = new Message();
result.MessageNotificationClass = notificationClass;
result.MessageCoreId = this.Id;
result.MessageCore = this;
return result;
}
#endregion
#region display override
public override string ToString()