diff --git a/src/BreCalClient/EditShipcallControl.xaml b/src/BreCalClient/EditShipcallControl.xaml
index 006256f..e54c9ad 100644
--- a/src/BreCalClient/EditShipcallControl.xaml
+++ b/src/BreCalClient/EditShipcallControl.xaml
@@ -44,7 +44,9 @@
-
+
+
+
diff --git a/src/BreCalClient/EditShipcallControl.xaml.cs b/src/BreCalClient/EditShipcallControl.xaml.cs
index 65ae975..2235d42 100644
--- a/src/BreCalClient/EditShipcallControl.xaml.cs
+++ b/src/BreCalClient/EditShipcallControl.xaml.cs
@@ -63,6 +63,7 @@ namespace BreCalClient
this.comboBoxDepartureBerth.ItemsSource = BreCalLists.Berths;
this.comboBoxTimeRef.ItemsSource = BreCalLists.TimeRefs;
+ this.comboBoxHarbour.ItemsSource = BreCalLists.Ports;
this.integerUpDownShiftingCount.Value = this.ShipcallModel.ShiftSequence;
@@ -192,6 +193,7 @@ namespace BreCalClient
isEnabled &= this.comboBoxShip.SelectedItem != null;
isEnabled &= this.comboBoxCategories.SelectedItem != null;
+ isEnabled &= this.comboBoxHarbour.SelectedItem != null;
if (comboBoxCategories.SelectedItem == null)
{
@@ -307,7 +309,7 @@ namespace BreCalClient
// set the time reference value (which point do all times refer to?)
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;
}
- }
+ }
+
+ if (BreCalLists.PortLookupDict.ContainsKey(this.ShipcallModel.Shipcall.PortId))
+ this.comboBoxHarbour.SelectedValue = this.ShipcallModel.Shipcall.PortId;
+
}
}