a number of smaller issues
This commit is contained in:
parent
11d6bedc71
commit
c206226b3c
2
ENI2/Properties/Resources.Designer.cs
generated
2
ENI2/Properties/Resources.Designer.cs
generated
@ -5656,7 +5656,7 @@ namespace ENI2.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Cruise.
|
||||
/// Looks up a localized string similar to 11 Cruise.
|
||||
/// </summary>
|
||||
public static string textTab14 {
|
||||
get {
|
||||
|
||||
@ -2195,7 +2195,7 @@
|
||||
<value>10 MDH</value>
|
||||
</data>
|
||||
<data name="textTab14" xml:space="preserve">
|
||||
<value>Cruise</value>
|
||||
<value>11 Cruise</value>
|
||||
</data>
|
||||
<data name="textTab21" xml:space="preserve">
|
||||
<value>1-2 Berth</value>
|
||||
|
||||
@ -8,9 +8,21 @@
|
||||
xmlns:enictrl="clr-namespace:ENI2.Controls"
|
||||
xmlns:util="clr-namespace:ENI2.Util"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
xmlns:col="clr-namespace:System.Collections;assembly=mscorlib"
|
||||
xmlns:local="clr-namespace:ENI2.SheetDisplayControls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="1050" d:DesignWidth="800">
|
||||
<UserControl.Resources>
|
||||
<col:ArrayList x:Key="arrList">
|
||||
<col:DictionaryEntry Key="None" Value="0" />
|
||||
<col:DictionaryEntry Key="Maersk BHV" Value="1" />
|
||||
<col:DictionaryEntry Key="SeaGo BHV" Value="2" />
|
||||
<col:DictionaryEntry Key="SeaGo WHV" Value="4" />
|
||||
<col:DictionaryEntry Key="Hoegh BHV" Value="8" />
|
||||
<col:DictionaryEntry Key="Elbe Bulk" Value="16" />
|
||||
<col:DictionaryEntry Key="Fct Junge" Value="32" />
|
||||
</col:ArrayList>
|
||||
</UserControl.Resources>
|
||||
<GroupBox Name="portCallGroupBox" Header="{x:Static p:Resources.text2PortCall}">
|
||||
<TabControl>
|
||||
<TabItem Header="{x:Static p:Resources.textTab21}">
|
||||
@ -41,6 +53,7 @@
|
||||
<TextBox Name="textBoxTicketNo" Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="1" Text="{Binding TicketNo, Mode=TwoWay, Converter={util:TrimStringConverter}}" Margin="2" VerticalContentAlignment="Center" MaxLength="50"/>
|
||||
|
||||
<TextBlock FontSize="18" VerticalAlignment="Bottom" Text="{x:Static p:Resources.text22PortOperations}" Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2"/>
|
||||
|
||||
<GroupBox Grid.Row="4" Grid.ColumnSpan="3" 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">
|
||||
@ -95,6 +108,7 @@
|
||||
<RowDefinition Height="28" />
|
||||
|
||||
<RowDefinition Height="36" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="140" />
|
||||
|
||||
</Grid.RowDefinitions>
|
||||
@ -164,7 +178,9 @@
|
||||
<TextBox Grid.Row="12" Grid.Column="1" Name="textBox_AgentFirstName" MaxLength="99" Margin="2" Text="{Binding AgentFirstName, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
||||
|
||||
<TextBlock FontSize="18" VerticalAlignment="Bottom" Text="{x:Static p:Resources.text24Invoice}" Grid.Column="0" Grid.Row="13" Grid.ColumnSpan="3"/>
|
||||
<GroupBox Name="servGroupBox" Header="{x:Static p:Resources.textServ}" Grid.Row="14" Grid.Column="0" Grid.ColumnSpan="3">
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="14" Grid.Column="0" Content="{x:Static p:Resources.textMaerskSeago}" Name="label_MaerskSeaGo" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||
<ComboBox Grid.Row="14" Grid.Column="1" x:Name="comboBoxGroup" Margin="2" ItemsSource="{StaticResource arrList}" DisplayMemberPath="Key" SelectedValuePath="Value" SelectionChanged="comboBoxGroup_SelectionChanged" ContextMenu="{DynamicResource ClearContextMenu}" />
|
||||
<GroupBox Name="servGroupBox" Header="{x:Static p:Resources.textServ}" Grid.Row="15" Grid.Column="0" Grid.ColumnSpan="3">
|
||||
<enictrl:ENIDataGrid x:Name="dataGridSERV" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||
AutoGenerateColumns="False" Margin="0,5,0,0">
|
||||
<DataGrid.Columns>
|
||||
|
||||
@ -7,6 +7,7 @@ using ENI2.EditControls;
|
||||
using ExcelDataReader;
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
@ -132,6 +133,18 @@ namespace ENI2.SheetDisplayControls
|
||||
this.comboBox_AgentTemplate.ItemsSource = _agntTemplates;
|
||||
|
||||
// 2.4
|
||||
|
||||
#region init helper Maersk / SeaGo Field
|
||||
|
||||
if (this.Core.IsFlagSet(MessageCore.CoreFlags.MAERSK_BHV)) this.comboBoxGroup.SelectedIndex = 1;
|
||||
if (this.Core.IsFlagSet(MessageCore.CoreFlags.SEAGO_BHV)) this.comboBoxGroup.SelectedIndex = 2;
|
||||
if (this.Core.IsFlagSet(MessageCore.CoreFlags.SEAGO_WHV)) this.comboBoxGroup.SelectedIndex = 3;
|
||||
if (this.Core.IsFlagSet(MessageCore.CoreFlags.HOEGH)) this.comboBoxGroup.SelectedIndex = 4;
|
||||
if (this.Core.IsFlagSet(MessageCore.CoreFlags.ELBE_BULK)) this.comboBoxGroup.SelectedIndex = 5;
|
||||
if (this.Core.IsFlagSet(MessageCore.CoreFlags.FCT_JUNGE)) this.comboBoxGroup.SelectedIndex = 6;
|
||||
|
||||
#endregion
|
||||
|
||||
this.dataGridSERV.Initialize();
|
||||
this.dataGridSERV.ItemsSource = this._servMessage.Elements;
|
||||
this.dataGridSERV.AddingNewItem += DataGridSERV_AddingNewItem;
|
||||
@ -543,6 +556,156 @@ namespace ENI2.SheetDisplayControls
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBoxGroup_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
// clear all
|
||||
this.Core.SetFlag(false, MessageCore.CoreFlags.MAERSK_BHV);
|
||||
this.Core.SetFlag(false, MessageCore.CoreFlags.SEAGO_BHV);
|
||||
this.Core.SetFlag(false, MessageCore.CoreFlags.SEAGO_WHV);
|
||||
this.Core.SetFlag(false, MessageCore.CoreFlags.HOEGH);
|
||||
this.Core.SetFlag(false, MessageCore.CoreFlags.ELBE_BULK);
|
||||
this.Core.SetFlag(false, MessageCore.CoreFlags.FCT_JUNGE);
|
||||
|
||||
if (this.comboBoxGroup.SelectedItem == null)
|
||||
{
|
||||
this.comboBoxGroup.SelectedIndex = 0;
|
||||
DBManager.Instance.Save(this.Core);
|
||||
}
|
||||
else
|
||||
{
|
||||
DictionaryEntry selectedItem = (DictionaryEntry)this.comboBoxGroup.SelectedItem;
|
||||
if (Int32.TryParse((string)selectedItem.Value, out int selectedValue))
|
||||
{
|
||||
if (selectedValue == (int)MessageCore.CoreFlags.MAERSK_BHV) CheckServiceEntryMaerskBHV();
|
||||
if (selectedValue == (int)MessageCore.CoreFlags.SEAGO_BHV) CheckServiceEntrySeaGoBHV();
|
||||
if (selectedValue == (int)MessageCore.CoreFlags.HOEGH) CheckServiceEntryHoegh();
|
||||
if (selectedValue == (int)MessageCore.CoreFlags.ELBE_BULK) CheckServiceEntryElbeBulk();
|
||||
if (selectedValue == (int)MessageCore.CoreFlags.FCT_JUNGE) CheckServiceEntryFctJunge();
|
||||
this.Core.SetFlag(true, (MessageCore.CoreFlags)selectedValue);
|
||||
DBManager.Instance.Save(this.Core);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region special entry ship service check
|
||||
|
||||
private void CheckServiceEntryMaerskBHV()
|
||||
{
|
||||
bool found = false;
|
||||
foreach (SERV serv in _servMessage.Elements.Cast<SERV>())
|
||||
{
|
||||
if (serv.ServiceBeneficiary.Equals("Maersk A/S, Esplanaden 50, DK-1263 Copenhagen K, VAT-ID: DK53139655"))
|
||||
found = true;
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
SERV newServ = new SERV();
|
||||
newServ.ServiceBeneficiary = "Maersk A/S, Esplanaden 50, DK-1263 Copenhagen K, VAT-ID: DK53139655";
|
||||
newServ.ServiceInvoiceRecipient = "Maersk Deutschland A/S & Co.KG, Johanniswall 7, 20095 Hamburg";
|
||||
newServ.ServiceName = "Maersk BHV";
|
||||
newServ.MessageHeader = this._servMessage;
|
||||
newServ.Identifier = SERV.GetNewIdentifier(_servMessage.Elements);
|
||||
this._servMessage.Elements.Add(newServ);
|
||||
this.dataGridSERV.Items.Refresh();
|
||||
this.SublistElementChanged(Message.NotificationClass.SERV);
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckServiceEntrySeaGoBHV()
|
||||
{
|
||||
bool found = false;
|
||||
foreach (SERV serv in _servMessage.Elements.Cast<SERV>())
|
||||
{
|
||||
if (serv.ServiceBeneficiary.Equals("Sealand Europe A/S, Dampfaergevej 10, 3.tv, DK- 2100 Copenhagen, VAT-ID: DK53139655"))
|
||||
found = true;
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
SERV newServ = new SERV();
|
||||
newServ.ServiceBeneficiary = "Sealand Europe A/S, Dampfaergevej 10, 3.tv, DK- 2100 Copenhagen, VAT-ID: DK53139655";
|
||||
newServ.ServiceInvoiceRecipient = "Maersk Deutschland A/S & Co. KG on behalf of Sealand Europe A/S, Johanniswall 7, 20095 Hamburg";
|
||||
newServ.ServiceName = "SeaGo BHV";
|
||||
newServ.MessageHeader = this._servMessage;
|
||||
newServ.Identifier = SERV.GetNewIdentifier(_servMessage.Elements);
|
||||
this._servMessage.Elements.Add(newServ);
|
||||
this.dataGridSERV.Items.Refresh();
|
||||
this.SublistElementChanged(Message.NotificationClass.SERV);
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckServiceEntryHoegh()
|
||||
{
|
||||
bool found = false;
|
||||
foreach (SERV serv in _servMessage.Elements.Cast<SERV>())
|
||||
{
|
||||
if (serv.ServiceBeneficiary.Equals("Höegh Autoliners AS, Oslo, Norway"))
|
||||
found = true;
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
SERV newServ = new SERV();
|
||||
newServ.ServiceBeneficiary = "Höegh Autoliners AS, Oslo, Norway";
|
||||
newServ.ServiceInvoiceRecipient = " PWL Port Services GmbH & Co. KG";
|
||||
newServ.ServiceName = "HOEGH BHV";
|
||||
newServ.MessageHeader = this._servMessage;
|
||||
newServ.Identifier = SERV.GetNewIdentifier(_servMessage.Elements);
|
||||
this._servMessage.Elements.Add(newServ);
|
||||
this.dataGridSERV.Items.Refresh();
|
||||
this.SublistElementChanged(Message.NotificationClass.SERV);
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckServiceEntryFctJunge()
|
||||
{
|
||||
bool found = false;
|
||||
foreach (SERV serv in _servMessage.Elements.Cast<SERV>())
|
||||
{
|
||||
if (serv.ServiceName.Equals("Fct Junge - Hamburg"))
|
||||
found = true;
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
SERV newServ = new SERV();
|
||||
newServ.ServiceBeneficiary = "";
|
||||
newServ.ServiceInvoiceRecipient = " Frachtcontor Junge & Co. GmbH";
|
||||
newServ.ServiceName = "Fct Junge - Hamburg";
|
||||
newServ.MessageHeader = this._servMessage;
|
||||
newServ.Identifier = SERV.GetNewIdentifier(_servMessage.Elements);
|
||||
this._servMessage.Elements.Add(newServ);
|
||||
this.dataGridSERV.Items.Refresh();
|
||||
this.SublistElementChanged(Message.NotificationClass.SERV);
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckServiceEntryElbeBulk()
|
||||
{
|
||||
bool found = false;
|
||||
foreach (SERV serv in _servMessage.Elements.Cast<SERV>())
|
||||
{
|
||||
if (serv.ServiceName.Equals("Elbe Bulk Schiffe - Hamburg"))
|
||||
found = true;
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
SERV newServ = new SERV();
|
||||
newServ.ServiceBeneficiary = "";
|
||||
newServ.ServiceInvoiceRecipient = " Division Elbe Bulk, Frachtcontor Junge & Co. GmbH";
|
||||
newServ.ServiceName = "Elbe Bulk Schiffe - Hamburg";
|
||||
newServ.MessageHeader = this._servMessage;
|
||||
newServ.Identifier = SERV.GetNewIdentifier(_servMessage.Elements);
|
||||
this._servMessage.Elements.Add(newServ);
|
||||
this.dataGridSERV.Items.Refresh();
|
||||
this.SublistElementChanged(Message.NotificationClass.SERV);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Templates
|
||||
|
||||
@ -111,11 +111,11 @@
|
||||
|
||||
<RowDefinition Height="36" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="120" />
|
||||
<RowDefinition Height="220" />
|
||||
|
||||
<RowDefinition Height="36" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="300" />
|
||||
<RowDefinition Height="340" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock FontSize="18" VerticalAlignment="Bottom" Text="{x:Static p:Resources.text17Last10PortFacilitiesCalled}" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"/>
|
||||
|
||||
@ -100,6 +100,7 @@ namespace ENI2.SheetDisplayControls
|
||||
// 1.7
|
||||
this.dataGridLast10PortFacilities.Initialize();
|
||||
this.dataGridLast10PortFacilities.ItemsSource = _sec.LastTenPortFacilitesCalled;
|
||||
this.textBlockNumL10PEntries.DataContext = _sec;
|
||||
|
||||
this.dataGridLast10PortFacilities.AddingNewItem += DataGridLast10PortFacilities_AddingNewItem;
|
||||
this.dataGridLast10PortFacilities.EditRequested += DataGridLast10PortFacilities_EditRequested;
|
||||
@ -107,6 +108,7 @@ namespace ENI2.SheetDisplayControls
|
||||
this.dataGridLast10PortFacilities.CreateRequested += DataGridLast10PortFacilities_CreateRequested;
|
||||
|
||||
// 1.8
|
||||
this.textBlockNumS2SEntries.DataContext = _sec;
|
||||
this.dataGridShip2ShipActivities.Initialize();
|
||||
foreach (ShipToShipActivitiesDuringLastTenPortFacilitiesCalled s2s in _sec.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled)
|
||||
{
|
||||
@ -120,6 +122,7 @@ namespace ENI2.SheetDisplayControls
|
||||
this.dataGridShip2ShipActivities.CreateRequested += DataGridShip2ShipActivities_CreateRequested;
|
||||
|
||||
// 1.9
|
||||
this.textBlockNumPoCEntries.DataContext = _mdh;
|
||||
this.dataGridPortOfCallLast30Days.Initialize();
|
||||
this.dataGridPortOfCallLast30Days.ItemsSource = _mdh.PortOfCallLast30Days;
|
||||
this.dataGridPortOfCallLast30Days.AddingNewItem += DataGridPortOfCallLast30Days_AddingNewItem;
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
xmlns:local="clr-namespace:ENI2.SheetDisplayControls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="600" d:DesignWidth="800">
|
||||
d:DesignHeight="1200" d:DesignWidth="800">
|
||||
<GroupBox Name="wasteReceiptsGroupBox" Header="{x:Static p:Resources.text13WasteReceipts}">
|
||||
<ScrollViewer PreviewMouseWheel="ScrollViewer_PreviewMouseWheel">
|
||||
<Grid>
|
||||
@ -20,16 +20,16 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="36" />
|
||||
<RowDefinition Height="640" />
|
||||
<RowDefinition Height="1080" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock FontSize="18" VerticalAlignment="Bottom" Text="{x:Static p:Resources.text131WasteReceipt}" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"/>
|
||||
<GroupBox Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Name="was_rcptGroupBox" Header="{x:Static p:Resources.textWasteReceipt}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="120" />
|
||||
<RowDefinition Height="240" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="330*" />
|
||||
<RowDefinition Height=".9*" />
|
||||
</Grid.RowDefinitions>
|
||||
<enictrl:ENIDataGrid x:Name="dataGridWasteReceipt" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" SelectionMode="Single"
|
||||
AutoGenerateColumns="False" Margin="0,5,0,0" Grid.Row="0" SelectionChanged="dataGridWasteReceipt_SelectionChanged">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user