Fixed some bugs with FCT Junge in Port notification ctrl.

This commit is contained in:
Daniel Schick 2024-03-15 08:34:48 +01:00
parent d9f5c37482
commit cdeae588be
5 changed files with 38 additions and 17 deletions

View File

@ -71,7 +71,8 @@
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="2" Content="{x:Static p:Resources.textSpecialRequirementsOfShipAtBerth}" Name="label_INFOSpecialRequirements" VerticalContentAlignment="Center" Margin="0,0,10,0"/> <Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="2" Content="{x:Static p:Resources.textSpecialRequirementsOfShipAtBerth}" Name="label_INFOSpecialRequirements" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
<Label HorizontalContentAlignment="Right" Grid.Row="5" Grid.Column="2" Content="{x:Static p:Resources.textConstructionCharacteristics}" Name="label_INFOConstructionCharacteristics" VerticalContentAlignment="Center" Margin="0,0,10,0"/> <Label HorizontalContentAlignment="Right" Grid.Row="5" Grid.Column="2" Content="{x:Static p:Resources.textConstructionCharacteristics}" Name="label_INFOConstructionCharacteristics" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
<ComboBox Grid.Row="0" Grid.Column="1" x:Name="comboBoxShippingArea" Margin="2" SelectedIndex="{Binding ShippingArea, Converter={util:ByteConverter}}" ContextMenu="{DynamicResource ClearContextMenu}" /> <ComboBox Grid.Row="0" Grid.Column="1" x:Name="comboBoxShippingArea" Margin="2" SelectedIndex="{Binding ShippingArea, Converter={util:ByteConverter}}" ContextMenu="{DynamicResource ClearContextMenu}" />
<ComboBox Grid.Row="0" Grid.Column="3" x:Name="comboBoxGroup" Margin="2,2,4,2" ItemsSource="{StaticResource arrList}" DisplayMemberPath="Key" SelectedValuePath="Value" SelectionChanged="comboBoxGroup_SelectionChanged"/> <ComboBox Grid.Row="0" Grid.Column="3" x:Name="comboBoxGroup" Margin="2,2,4,2" ItemsSource="{StaticResource arrList}"
DisplayMemberPath="Key" SelectedValuePath="Value" SelectionChanged="comboBoxGroup_SelectionChanged" ContextMenu="{DynamicResource ClearContextMenu}" />
<Button Grid.Row="1" Grid.Column="3" x:Name="buttonSearchPortArea" Margin="2" Content="Lookup port area" Click="buttonSearchPortArea_Click" /> <Button Grid.Row="1" Grid.Column="3" x:Name="buttonSearchPortArea" Margin="2" Content="Lookup port area" Click="buttonSearchPortArea_Click" />
<ComboBox Grid.Row="1" Grid.Column="1" Name="comboBoxPortArea" Margin="2" SelectedValue="{Binding PortArea}" SelectedValuePath="Key" DisplayMemberPath="Value" ContextMenu="{DynamicResource ClearContextMenu}" /> <ComboBox Grid.Row="1" Grid.Column="1" Name="comboBoxPortArea" Margin="2" SelectedValue="{Binding PortArea}" SelectedValuePath="Key" DisplayMemberPath="Value" ContextMenu="{DynamicResource ClearContextMenu}" />
<TextBox Grid.Row="2" Grid.Column="1" Name="textRequestedPostionInPortOfCall" Margin="2" Text="{Binding RequestedPositionInPortOfCall, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/> <TextBox Grid.Row="2" Grid.Column="1" Name="textRequestedPostionInPortOfCall" Margin="2" Text="{Binding RequestedPositionInPortOfCall, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>

View File

@ -381,6 +381,13 @@ namespace ENI2.DetailViewControls
this.Core.SetFlag(false, MessageCore.CoreFlags.ELBE_BULK); this.Core.SetFlag(false, MessageCore.CoreFlags.ELBE_BULK);
this.Core.SetFlag(false, MessageCore.CoreFlags.FCT_JUNGE); 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; DictionaryEntry selectedItem = (DictionaryEntry)this.comboBoxGroup.SelectedItem;
if (Int32.TryParse((string)selectedItem.Value, out int selectedValue)) if (Int32.TryParse((string)selectedItem.Value, out int selectedValue))
{ {
@ -393,6 +400,7 @@ namespace ENI2.DetailViewControls
DBManager.Instance.Save(this.Core); DBManager.Instance.Save(this.Core);
} }
} }
}
#endregion #endregion
@ -472,7 +480,7 @@ namespace ENI2.DetailViewControls
bool found = false; bool found = false;
foreach (SERV serv in this._servMessage.Elements) foreach (SERV serv in this._servMessage.Elements)
{ {
if (serv.ServiceBeneficiary.Equals("Fct Junge - Hamburg")) if (serv.ServiceName.Equals("FCT JUNGE"))
found = true; found = true;
} }
@ -495,7 +503,7 @@ namespace ENI2.DetailViewControls
bool found = false; bool found = false;
foreach (SERV serv in this._servMessage.Elements) foreach (SERV serv in this._servMessage.Elements)
{ {
if (serv.ServiceBeneficiary.Equals("Elbe Bulk Schiffe - Hamburg")) if (serv.ServiceName.Equals("ELBE BULK"))
found = true; found = true;
} }
@ -531,5 +539,14 @@ namespace ENI2.DetailViewControls
#endregion #endregion
private void MenuItem_Click(object sender, RoutedEventArgs e)
{
}
private void contextMenuClearMaersk_Click(object sender, RoutedEventArgs e)
{
}
} }
} }

View File

@ -36,8 +36,8 @@
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion> <MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish> <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.html</WebPage> <WebPage>publish.html</WebPage>
<ApplicationRevision>4</ApplicationRevision> <ApplicationRevision>5</ApplicationRevision>
<ApplicationVersion>7.2.2.4</ApplicationVersion> <ApplicationVersion>7.2.2.5</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut> <CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted> <PublishWizardCompleted>true</PublishWizardCompleted>

View File

@ -44,6 +44,7 @@ namespace ENI2.EditControls
private void Window_Loaded(object sender, RoutedEventArgs e) private void Window_Loaded(object sender, RoutedEventArgs e)
{ {
if(LocalizedLookup.getPortAreaInfos().ContainsKey(this._poc))
_portAreas = LocalizedLookup.getPortAreaInfos()[this._poc]; _portAreas = LocalizedLookup.getPortAreaInfos()[this._poc];
this.labelLocode.Content = this._poc; this.labelLocode.Content = this._poc;
} }

View File

@ -310,6 +310,7 @@ namespace ENI2
public static Dictionary<string, List<PortAreaInfo>> getPortAreaInfos() public static Dictionary<string, List<PortAreaInfo>> getPortAreaInfos()
{ {
int cnt = 0;
if (_portAreaInfos == null) if (_portAreaInfos == null)
{ {
_portAreaInfos = new Dictionary<string, List<PortAreaInfo>>(); _portAreaInfos = new Dictionary<string, List<PortAreaInfo>>();
@ -338,6 +339,7 @@ namespace ENI2
_portAreaInfos[pai.Locode] = new List<PortAreaInfo>(); _portAreaInfos[pai.Locode] = new List<PortAreaInfo>();
} }
_portAreaInfos[pai.Locode].Add(pai); _portAreaInfos[pai.Locode].Add(pai);
cnt++;
} }
} }
return _portAreaInfos; return _portAreaInfos;