diff --git a/src/BreCalClient/EditTimesAgencyIncomingControl.xaml.cs b/src/BreCalClient/EditTimesAgencyIncomingControl.xaml.cs index 968923f..48f2b34 100644 --- a/src/BreCalClient/EditTimesAgencyIncomingControl.xaml.cs +++ b/src/BreCalClient/EditTimesAgencyIncomingControl.xaml.cs @@ -152,18 +152,18 @@ namespace BreCalClient this.doubleUpDownDraft.Value = this.ShipcallModel.Shipcall.Draft; this.datePickerTidalWindowFrom.Value = this.ShipcallModel.Shipcall.TidalWindowFrom; this.datePickerTidalWindowTo.Value = this.ShipcallModel.Shipcall.TidalWindowTo; - this.checkBoxCanceled.IsChecked = this.ShipcallModel.Shipcall.Canceled; + this.checkBoxCanceled.IsChecked = this.ShipcallModel.Shipcall.Canceled ?? false; - this.checkBoxAnchored.IsChecked = this.ShipcallModel.Shipcall.Anchored; - this.checkBoxTugRequired.IsChecked = this.ShipcallModel.Shipcall.TugRequired; + this.checkBoxAnchored.IsChecked = this.ShipcallModel.Shipcall.Anchored ?? false; + this.checkBoxTugRequired.IsChecked = this.ShipcallModel.Shipcall.TugRequired ?? false; this.integerUpDownRecommendedTugs.Value = this.ShipcallModel.Shipcall.RecommendedTugs; - this.checkBoxPilotRequired.IsChecked = this.ShipcallModel.Shipcall.PilotRequired; + this.checkBoxPilotRequired.IsChecked = this.ShipcallModel.Shipcall.PilotRequired ?? false; - this.checkBoxMooredLock.IsChecked = this.ShipcallModel.Shipcall.MooredLock; + this.checkBoxMooredLock.IsChecked = this.ShipcallModel.Shipcall.MooredLock ?? false; - this.checkBoxBunkering.IsChecked = this.ShipcallModel.Shipcall.Bunkering; - this.checkBoxReplenishingLock.IsChecked = this.ShipcallModel.Shipcall.ReplenishingLock; - this.checkBoxReplenishingTerminal.IsChecked = this.ShipcallModel.Shipcall.ReplenishingTerminal; + this.checkBoxBunkering.IsChecked = this.ShipcallModel.Shipcall.Bunkering ?? false; + this.checkBoxReplenishingLock.IsChecked = this.ShipcallModel.Shipcall.ReplenishingLock ?? false; + this.checkBoxReplenishingTerminal.IsChecked = this.ShipcallModel.Shipcall.ReplenishingTerminal ?? false; if(!string.IsNullOrEmpty(this.Times.Remarks)) this.textBoxRemarks.Text = this.Times.Remarks; diff --git a/src/BreCalClient/EditTimesAgencyOutgoingControl.xaml.cs b/src/BreCalClient/EditTimesAgencyOutgoingControl.xaml.cs index 17ccaf1..f53a5e8 100644 --- a/src/BreCalClient/EditTimesAgencyOutgoingControl.xaml.cs +++ b/src/BreCalClient/EditTimesAgencyOutgoingControl.xaml.cs @@ -147,14 +147,14 @@ namespace BreCalClient this.doubleUpDownDraft.Value = this.ShipcallModel.Shipcall.Draft; this.datePickerTidalWindowFrom.Value = this.ShipcallModel.Shipcall.TidalWindowFrom; this.datePickerTidalWindowTo.Value = this.ShipcallModel.Shipcall.TidalWindowTo; - this.checkBoxCanceled.IsChecked = this.ShipcallModel.Shipcall.Canceled; + this.checkBoxCanceled.IsChecked = this.ShipcallModel.Shipcall.Canceled ?? false; - this.checkBoxTugRequired.IsChecked = this.ShipcallModel.Shipcall.TugRequired; + this.checkBoxTugRequired.IsChecked = this.ShipcallModel.Shipcall.TugRequired ?? false; this.integerUpDownRecommendedTugs.Value = this.ShipcallModel.Shipcall.RecommendedTugs; - this.checkBoxPilotRequired.IsChecked = this.ShipcallModel.Shipcall.PilotRequired; + this.checkBoxPilotRequired.IsChecked = this.ShipcallModel.Shipcall.PilotRequired ?? false; - this.checkBoxMooredLock.IsChecked = this.ShipcallModel.Shipcall.MooredLock; - this.checkBoxRainsensitiveCargo.IsChecked = this.ShipcallModel.Shipcall.RainSensitiveCargo; + this.checkBoxMooredLock.IsChecked = this.ShipcallModel.Shipcall.MooredLock ?? false; + this.checkBoxRainsensitiveCargo.IsChecked = this.ShipcallModel.Shipcall.RainSensitiveCargo ?? false; if(!string.IsNullOrEmpty(this.Times.Remarks)) this.textBoxRemarks.Text = this.Times.Remarks; diff --git a/src/BreCalClient/EditTimesAgencyShiftingControl.xaml.cs b/src/BreCalClient/EditTimesAgencyShiftingControl.xaml.cs index eaf3478..362cfc8 100644 --- a/src/BreCalClient/EditTimesAgencyShiftingControl.xaml.cs +++ b/src/BreCalClient/EditTimesAgencyShiftingControl.xaml.cs @@ -164,14 +164,14 @@ namespace BreCalClient this.doubleUpDownDraft.Value = this.ShipcallModel.Shipcall.Draft; this.datePickerTidalWindowFrom.Value = this.ShipcallModel.Shipcall.TidalWindowFrom; this.datePickerTidalWindowTo.Value = this.ShipcallModel.Shipcall.TidalWindowTo; - this.checkBoxCanceled.IsChecked = this.ShipcallModel.Shipcall.Canceled; + this.checkBoxCanceled.IsChecked = this.ShipcallModel.Shipcall.Canceled ?? false; - this.checkBoxTugRequired.IsChecked = this.ShipcallModel.Shipcall.TugRequired; + this.checkBoxTugRequired.IsChecked = this.ShipcallModel.Shipcall.TugRequired ?? false; this.integerUpDownRecommendedTugs.Value = this.ShipcallModel.Shipcall.RecommendedTugs; - this.checkBoxPilotRequired.IsChecked = this.ShipcallModel.Shipcall.PilotRequired; + this.checkBoxPilotRequired.IsChecked = this.ShipcallModel.Shipcall.PilotRequired ?? false; - this.checkBoxMooredLock.IsChecked = this.ShipcallModel.Shipcall.MooredLock; - this.checkBoxRainsensitiveCargo.IsChecked = this.ShipcallModel.Shipcall.RainSensitiveCargo; + this.checkBoxMooredLock.IsChecked = this.ShipcallModel.Shipcall.MooredLock ?? false; + this.checkBoxRainsensitiveCargo.IsChecked = this.ShipcallModel.Shipcall.RainSensitiveCargo ?? false; if(!string.IsNullOrEmpty(this.Times.Remarks)) this.textBoxRemarks.Text = this.Times.Remarks;