diff --git a/src/BreCalClient/EditTimesAgencyIncomingControl.xaml b/src/BreCalClient/EditTimesAgencyIncomingControl.xaml
index 8e7132a..318c7ac 100644
--- a/src/BreCalClient/EditTimesAgencyIncomingControl.xaml
+++ b/src/BreCalClient/EditTimesAgencyIncomingControl.xaml
@@ -44,7 +44,14 @@
-
+
+
+
+
+
+
+
+
diff --git a/src/BreCalClient/EditTimesAgencyIncomingControl.xaml.cs b/src/BreCalClient/EditTimesAgencyIncomingControl.xaml.cs
index 3617b03..671fc4c 100644
--- a/src/BreCalClient/EditTimesAgencyIncomingControl.xaml.cs
+++ b/src/BreCalClient/EditTimesAgencyIncomingControl.xaml.cs
@@ -90,6 +90,7 @@ namespace BreCalClient
if (this.ShipcallModel.Shipcall != null)
{
this.Times.EtaBerth = this.datePickerETA.Value;
+ this.Times.EtaIntervalEnd = this.datePickerETA_End.Value;
if (this.comboBoxPierside.SelectedIndex >= 0)
{
@@ -178,6 +179,8 @@ namespace BreCalClient
if (this.ShipcallModel.Shipcall.Eta != DateTime.MinValue)
this.datePickerETA.Value = this.ShipcallModel.Shipcall.Eta;
}
+
+ this.datePickerETA_End.Value = this.Times.EtaIntervalEnd;
if (Times.BerthId.HasValue)
this.comboBoxArrivalBerth.SelectedValue = Times.BerthId;
@@ -249,6 +252,7 @@ namespace BreCalClient
private void EnableControls()
{
this.datePickerETA.IsEnabled = _editing;
+ this.datePickerETA_End.IsEnabled = _editing;
this.comboBoxArrivalBerth.IsEnabled = _editing;
this.comboBoxPierside.IsEnabled = _editing;
this.textBoxBerthRemarks.IsEnabled = _editing;
@@ -279,6 +283,10 @@ namespace BreCalClient
bool areSet = this.datePickerETA.Value.HasValue &&
this.doubleUpDownDraft.Value.HasValue &&
this.comboBoxArrivalBerth.SelectedIndex >= 0;
+
+ if (areSet && this.datePickerETA_End.Value.HasValue)
+ areSet &= (this.datePickerETA.Value < this.datePickerETA_End.Value);
+
return areSet;
}
@@ -337,6 +345,11 @@ namespace BreCalClient
}
private void comboBoxArrivalBerth_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
+ {
+ this.CheckOKButton();
+ }
+
+ private void datePickerETA_End_ValueChanged(object sender, RoutedPropertyChangedEventArgs