Fixed some bugs with FCT Junge in Port notification ctrl.
This commit is contained in:
parent
d9f5c37482
commit
cdeae588be
@ -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="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="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" />
|
||||
<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"/>
|
||||
|
||||
@ -381,17 +381,25 @@ namespace ENI2.DetailViewControls
|
||||
this.Core.SetFlag(false, MessageCore.CoreFlags.ELBE_BULK);
|
||||
this.Core.SetFlag(false, MessageCore.CoreFlags.FCT_JUNGE);
|
||||
|
||||
DictionaryEntry selectedItem = (DictionaryEntry) this.comboBoxGroup.SelectedItem;
|
||||
if(Int32.TryParse((string)selectedItem.Value, out int selectedValue))
|
||||
if (this.comboBoxGroup.SelectedItem == null)
|
||||
{
|
||||
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);
|
||||
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
|
||||
@ -472,7 +480,7 @@ namespace ENI2.DetailViewControls
|
||||
bool found = false;
|
||||
foreach (SERV serv in this._servMessage.Elements)
|
||||
{
|
||||
if (serv.ServiceBeneficiary.Equals("Fct Junge - Hamburg"))
|
||||
if (serv.ServiceName.Equals("FCT JUNGE"))
|
||||
found = true;
|
||||
}
|
||||
|
||||
@ -495,7 +503,7 @@ namespace ENI2.DetailViewControls
|
||||
bool found = false;
|
||||
foreach (SERV serv in this._servMessage.Elements)
|
||||
{
|
||||
if (serv.ServiceBeneficiary.Equals("Elbe Bulk Schiffe - Hamburg"))
|
||||
if (serv.ServiceName.Equals("ELBE BULK"))
|
||||
found = true;
|
||||
}
|
||||
|
||||
@ -531,5 +539,14 @@ namespace ENI2.DetailViewControls
|
||||
|
||||
#endregion
|
||||
|
||||
private void MenuItem_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void contextMenuClearMaersk_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,8 +36,8 @@
|
||||
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>publish.html</WebPage>
|
||||
<ApplicationRevision>4</ApplicationRevision>
|
||||
<ApplicationVersion>7.2.2.4</ApplicationVersion>
|
||||
<ApplicationRevision>5</ApplicationRevision>
|
||||
<ApplicationVersion>7.2.2.5</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
|
||||
@ -44,7 +44,8 @@ namespace ENI2.EditControls
|
||||
|
||||
private void Window_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
_portAreas = LocalizedLookup.getPortAreaInfos()[this._poc];
|
||||
if(LocalizedLookup.getPortAreaInfos().ContainsKey(this._poc))
|
||||
_portAreas = LocalizedLookup.getPortAreaInfos()[this._poc];
|
||||
this.labelLocode.Content = this._poc;
|
||||
}
|
||||
|
||||
|
||||
@ -310,7 +310,8 @@ namespace ENI2
|
||||
|
||||
public static Dictionary<string, List<PortAreaInfo>> getPortAreaInfos()
|
||||
{
|
||||
if(_portAreaInfos == null)
|
||||
int cnt = 0;
|
||||
if (_portAreaInfos == null)
|
||||
{
|
||||
_portAreaInfos = new Dictionary<string, List<PortAreaInfo>>();
|
||||
string query = @"SELECT Locode, Agentur, Schiffe, Liegeplatz, Hafengebiet, `Hafengebiet-Code`, Bemerkungen from INFO_PortArea_Helper";
|
||||
@ -338,6 +339,7 @@ namespace ENI2
|
||||
_portAreaInfos[pai.Locode] = new List<PortAreaInfo>();
|
||||
}
|
||||
_portAreaInfos[pai.Locode].Add(pai);
|
||||
cnt++;
|
||||
}
|
||||
}
|
||||
return _portAreaInfos;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user