Add port selection to shipcall create / edit dialog
This commit is contained in:
parent
0e7493366c
commit
948684455d
@ -44,7 +44,9 @@
|
|||||||
<xctk:DoubleUpDown x:Name="doubleUpDownWidth" Margin="2" Grid.Column="1" Grid.Row="4" FormatString="N2" IsReadOnly="True" IsEnabled="False" ShowButtonSpinner="False"/>
|
<xctk:DoubleUpDown x:Name="doubleUpDownWidth" Margin="2" Grid.Column="1" Grid.Row="4" FormatString="N2" IsReadOnly="True" IsEnabled="False" ShowButtonSpinner="False"/>
|
||||||
<Label Content="{x:Static p:Resources.textCancelled}" Grid.Column="0" Grid.Row="5" HorizontalContentAlignment="Right" />
|
<Label Content="{x:Static p:Resources.textCancelled}" Grid.Column="0" Grid.Row="5" HorizontalContentAlignment="Right" />
|
||||||
<CheckBox x:Name="checkBoxCancelled" Grid.Column="1" Grid.Row="5" Margin="2" VerticalContentAlignment="Center" />
|
<CheckBox x:Name="checkBoxCancelled" Grid.Column="1" Grid.Row="5" Margin="2" VerticalContentAlignment="Center" />
|
||||||
<Button x:Name="buttonEditShips" Grid.Column="1" Grid.Row="6" Margin="2" Content="{x:Static p:Resources.textEditShips}" Click="buttonEditShips_Click" Visibility="Hidden" />
|
<Label Content="{x:Static p:Resources.textHarbour}" Grid.Column="0" Grid.Row="6" HorizontalContentAlignment="Right" />
|
||||||
|
<ComboBox x:Name="comboBoxHarbour" Grid.Column="1" Margin="2" Grid.Row="6" DisplayMemberPath="Name" SelectedValuePath="Id" />
|
||||||
|
<Button x:Name="buttonEditShips" Grid.Column="1" Grid.Row="7" Margin="2" Content="{x:Static p:Resources.textEditShips}" Click="buttonEditShips_Click" Visibility="Hidden" />
|
||||||
|
|
||||||
<Label Content="{x:Static p:Resources.textType}" Grid.Column="2" Grid.Row="0" HorizontalContentAlignment="Right" />
|
<Label Content="{x:Static p:Resources.textType}" Grid.Column="2" Grid.Row="0" HorizontalContentAlignment="Right" />
|
||||||
|
|
||||||
|
|||||||
@ -63,6 +63,7 @@ namespace BreCalClient
|
|||||||
this.comboBoxDepartureBerth.ItemsSource = BreCalLists.Berths;
|
this.comboBoxDepartureBerth.ItemsSource = BreCalLists.Berths;
|
||||||
|
|
||||||
this.comboBoxTimeRef.ItemsSource = BreCalLists.TimeRefs;
|
this.comboBoxTimeRef.ItemsSource = BreCalLists.TimeRefs;
|
||||||
|
this.comboBoxHarbour.ItemsSource = BreCalLists.Ports;
|
||||||
|
|
||||||
this.integerUpDownShiftingCount.Value = this.ShipcallModel.ShiftSequence;
|
this.integerUpDownShiftingCount.Value = this.ShipcallModel.ShiftSequence;
|
||||||
|
|
||||||
@ -192,6 +193,7 @@ namespace BreCalClient
|
|||||||
|
|
||||||
isEnabled &= this.comboBoxShip.SelectedItem != null;
|
isEnabled &= this.comboBoxShip.SelectedItem != null;
|
||||||
isEnabled &= this.comboBoxCategories.SelectedItem != null;
|
isEnabled &= this.comboBoxCategories.SelectedItem != null;
|
||||||
|
isEnabled &= this.comboBoxHarbour.SelectedItem != null;
|
||||||
|
|
||||||
if (comboBoxCategories.SelectedItem == null)
|
if (comboBoxCategories.SelectedItem == null)
|
||||||
{
|
{
|
||||||
@ -307,7 +309,7 @@ namespace BreCalClient
|
|||||||
|
|
||||||
// set the time reference value (which point do all times refer to?)
|
// set the time reference value (which point do all times refer to?)
|
||||||
this.ShipcallModel.Shipcall.TimeRefPoint = this.comboBoxTimeRef.SelectedIndex;
|
this.ShipcallModel.Shipcall.TimeRefPoint = this.comboBoxTimeRef.SelectedIndex;
|
||||||
|
this.ShipcallModel.Shipcall.PortId = ((Port) this.comboBoxHarbour.SelectedItem).Id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -350,7 +352,11 @@ namespace BreCalClient
|
|||||||
{
|
{
|
||||||
this.comboBoxAgency.SelectedValue = this.ShipcallModel.AssignedParticipants[ParticipantType.AGENCY].ParticipantId;
|
this.comboBoxAgency.SelectedValue = this.ShipcallModel.AssignedParticipants[ParticipantType.AGENCY].ParticipantId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (BreCalLists.PortLookupDict.ContainsKey(this.ShipcallModel.Shipcall.PortId))
|
||||||
|
this.comboBoxHarbour.SelectedValue = this.ShipcallModel.Shipcall.PortId;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user