From 03813b1921f6d5c72758f34b302696e8af9cf4ed Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Wed, 31 May 2017 09:31:11 +0000 Subject: [PATCH] 3.6.3 Statusabfrage, Benutzeranmeldung --- ENI-2/ENI2/ENI2/App.config | 2 +- ENI-2/ENI2/ENI2/Controls/LocodeControl.xaml | 2 +- .../ENI2/ENI2/Controls/LocodeControl.xaml.cs | 20 +- ENI-2/ENI2/ENI2/DetailRootControl.xaml | 9 +- ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs | 4 +- .../OverViewDetailControl.xaml | 19 +- .../OverViewDetailControl.xaml.cs | 25 +- .../PortCallDetailControl.xaml | 24 +- ENI-2/ENI2/ENI2/ENI2.csproj | 24 +- .../SimplePropertyViewDialog.xaml | 19 ++ .../SimplePropertyViewDialog.xaml.cs | 46 ++++ .../ENI2/EditControls/VisitIdDialog.xaml.cs | 8 +- ENI-2/ENI2/ENI2/MainWindow.xaml | 38 ++- ENI-2/ENI2/ENI2/MainWindow.xaml.cs | 70 ++++- .../ENI2/Properties/Resources.Designer.cs | 250 +++++++++++++++++- ENI-2/ENI2/ENI2/Properties/Resources.resx | 79 +++++- ENI-2/ENI2/ENI2/Resources/delete2.png | Bin 0 -> 1787 bytes ENI-2/ENI2/ENI2/Resources/document_view.png | Bin 0 -> 1202 bytes ENI-2/ENI2/ENI2/Resources/flash_red.png | Bin 0 -> 1163 bytes ENI-2/ENI2/ENI2/Resources/flash_yellow.png | Bin 0 -> 1164 bytes ENI-2/ENI2/ENI2/Resources/lightbulb_on.png | Bin 0 -> 1177 bytes ENI-2/ENI2/ENI2/Resources/mail_new.png | Bin 0 -> 1629 bytes ENI-2/ENI2/ENI2/Resources/rotate_left.png | Bin 0 -> 1405 bytes ENI-2/ENI2/ENI2/Resources/sign_warning.png | Bin 0 -> 1305 bytes .../ENI2/Resources/trafficlight_green.png | Bin 0 -> 1209 bytes .../ENI2/ENI2/Resources/trafficlight_off.png | Bin 0 -> 1210 bytes .../ENI2/ENI2/Resources/trafficlight_red.png | Bin 0 -> 1188 bytes .../ENI2/Resources/trafficlight_yellow.png | Bin 0 -> 1209 bytes ENI-2/ENI2/ENI2/Resources/user_edit.png | Bin 0 -> 1445 bytes ENI-2/ENI2/ENI2/SucheControl.xaml | 4 +- Stundensheet.xlsx | Bin 30639 -> 30705 bytes .../SendNSWMessageService/NSWSendService.cs | 4 +- nsw/Source/bsmd.ExcelReadService/LocodeDB.cs | 43 +++ nsw/Source/bsmd.database/Message.cs | 4 +- nsw/Source/bsmd.database/MessageCore.cs | 12 +- .../Properties/AssemblyProductInfo.cs | 2 +- .../Properties/AssemblyProjectInfo.cs | 2 +- nsw/Source/bsmd.database/ReportingParty.cs | 174 ++++++++++-- nsw/Source/bsmd.database/Util.cs | 43 +++ nsw/Source/bsmd.database/XtraSendLogic.cs | 5 +- nsw/Source/bsmd.hisnord/Request.cs | 2 +- nsw/Source/bsmd.hisnord/readme.txt | 82 ++++++ nsw/Source/bsmd.status/Status.cs | 32 ++- nsw/Source/bsmd.status/bsmd.status.csproj | 1 + nsw/Source/misc/db.sqlite | Bin 12046336 -> 12046336 bytes 45 files changed, 944 insertions(+), 105 deletions(-) create mode 100644 ENI-2/ENI2/ENI2/EditControls/SimplePropertyViewDialog.xaml create mode 100644 ENI-2/ENI2/ENI2/EditControls/SimplePropertyViewDialog.xaml.cs create mode 100644 ENI-2/ENI2/ENI2/Resources/delete2.png create mode 100644 ENI-2/ENI2/ENI2/Resources/document_view.png create mode 100644 ENI-2/ENI2/ENI2/Resources/flash_red.png create mode 100644 ENI-2/ENI2/ENI2/Resources/flash_yellow.png create mode 100644 ENI-2/ENI2/ENI2/Resources/lightbulb_on.png create mode 100644 ENI-2/ENI2/ENI2/Resources/mail_new.png create mode 100644 ENI-2/ENI2/ENI2/Resources/rotate_left.png create mode 100644 ENI-2/ENI2/ENI2/Resources/sign_warning.png create mode 100644 ENI-2/ENI2/ENI2/Resources/trafficlight_green.png create mode 100644 ENI-2/ENI2/ENI2/Resources/trafficlight_off.png create mode 100644 ENI-2/ENI2/ENI2/Resources/trafficlight_red.png create mode 100644 ENI-2/ENI2/ENI2/Resources/trafficlight_yellow.png create mode 100644 ENI-2/ENI2/ENI2/Resources/user_edit.png diff --git a/ENI-2/ENI2/ENI2/App.config b/ENI-2/ENI2/ENI2/App.config index 7b435d1f..bc6cfbfc 100644 --- a/ENI-2/ENI2/ENI2/App.config +++ b/ENI-2/ENI2/ENI2/App.config @@ -17,7 +17,7 @@ - Data Source=(localdb)\Projects;Initial Catalog=nsw;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False + Data Source=192.168.2.12;Initial Catalog=nsw;Uid=dfuser;Pwd=dfpasswd;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False True diff --git a/ENI-2/ENI2/ENI2/Controls/LocodeControl.xaml b/ENI-2/ENI2/ENI2/Controls/LocodeControl.xaml index be1d1527..7ffaa378 100644 --- a/ENI-2/ENI2/ENI2/Controls/LocodeControl.xaml +++ b/ENI-2/ENI2/ENI2/Controls/LocodeControl.xaml @@ -14,7 +14,7 @@ - diff --git a/ENI-2/ENI2/ENI2/Controls/LocodeControl.xaml.cs b/ENI-2/ENI2/ENI2/Controls/LocodeControl.xaml.cs index 66be34c6..f2fc7481 100644 --- a/ENI-2/ENI2/ENI2/Controls/LocodeControl.xaml.cs +++ b/ENI-2/ENI2/ENI2/Controls/LocodeControl.xaml.cs @@ -19,8 +19,7 @@ namespace ENI2.Controls /// public partial class LocodeControl : UserControl, INotifyPropertyChanged { - private List _locodeList = new List(); - // private string _selectedLocode; + private List _locodeList = new List(); public event PropertyChangedEventHandler PropertyChanged; public LocodeControl() @@ -47,17 +46,15 @@ namespace ENI2.Controls public static readonly DependencyProperty LocodeValueProperty = DependencyProperty.Register("LocodeValue", typeof(string), typeof(LocodeControl), new UIPropertyMetadata(LocodeValueChangedHandler)); - //new FrameworkPropertyMetadata(default(string), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault)); public static void LocodeValueChangedHandler(DependencyObject sender, DependencyPropertyChangedEventArgs e) { // Get instance of current control from sender // and property value from e.NewValue - - // Set public property on TaregtCatalogControl, e.g. + if(e.NewValue != null) - ((LocodeControl)sender).SelectedItem = e.NewValue.ToString(); + ((LocodeControl)sender).SelectedItem = e.NewValue.ToString().Substring(0,5); } @@ -91,6 +88,8 @@ namespace ENI2.Controls { if (this.comboBoxLocode.Text.Length > 4) { + this.LocodeList.Clear(); + // check if actual locode if (this.comboBoxLocode.Text.Length == 5) { @@ -98,16 +97,17 @@ namespace ENI2.Controls bool isLocode = !LocodeDB.PortNameFromLocode(directLocode).IsNullOrEmpty(); if (isLocode) { - this.comboBoxLocode.Text = directLocode; - this.LocodeList.Clear(); + this.comboBoxLocode.Text = directLocode; this.LocodeList.Add(directLocode); this.SetLocodeStateImage(this.imageLocodeState, LocodeState.OK); return; } } - // assume this is a harbour name typed out.. - this.LocodeList = LocodeDB.AllLocodesForCityName(this.comboBoxLocode.Text + "%"); + // assume this is a harbour name typed out.. + List locodeEntries = LocodeDB.AllLocodesForCityNameAsEntries(this.comboBoxLocode.Text + "%"); + foreach (LocodeDB.LocodeEntry entry in locodeEntries) + this.LocodeList.Add(string.Format("{0} - {1}", entry.Locode, entry.Name)); if (this.LocodeList.Count == 1) { diff --git a/ENI-2/ENI2/ENI2/DetailRootControl.xaml b/ENI-2/ENI2/ENI2/DetailRootControl.xaml index 2c041851..6d73c65d 100644 --- a/ENI-2/ENI2/ENI2/DetailRootControl.xaml +++ b/ENI-2/ENI2/ENI2/DetailRootControl.xaml @@ -4,6 +4,7 @@ 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:p="clr-namespace:ENI2.Properties" xmlns:local="clr-namespace:ENI2" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300"> @@ -21,18 +22,20 @@ - - + + - diff --git a/ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs b/ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs index ce1bbd7f..52cf9408 100644 --- a/ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs +++ b/ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs @@ -134,7 +134,7 @@ namespace ENI2 private void buttonSave_Click(object sender, RoutedEventArgs e) { - MessageBoxResult result = MessageBox.Show(Properties.Resources.textSavePage, Properties.Resources.textConfirmation, + MessageBoxResult result = MessageBox.Show(Properties.Resources.textQuestionSavePage, Properties.Resources.textConfirmation, MessageBoxButton.YesNo, MessageBoxImage.Question); if (result == MessageBoxResult.Yes) { @@ -158,7 +158,7 @@ namespace ENI2 private void buttonSaveAll_Click(object sender, RoutedEventArgs e) { - MessageBoxResult result = MessageBox.Show(Properties.Resources.textSaveAll, Properties.Resources.textConfirmation, + MessageBoxResult result = MessageBox.Show(Properties.Resources.textQuestionSaveAll, Properties.Resources.textConfirmation, MessageBoxButton.YesNo, MessageBoxImage.Question); if (result == MessageBoxResult.Yes) { diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/OverViewDetailControl.xaml b/ENI-2/ENI2/ENI2/DetailViewControls/OverViewDetailControl.xaml index 43c4b610..1bbc949d 100644 --- a/ENI-2/ENI2/ENI2/DetailViewControls/OverViewDetailControl.xaml +++ b/ENI-2/ENI2/ENI2/DetailViewControls/OverViewDetailControl.xaml @@ -10,7 +10,7 @@ xmlns:local="clr-namespace:ENI2.DetailViewControls" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="600"> - + + + + + + + + + + + + + + + +