From 8e0fdfa4ff88e9114ecb919f9df528648cf676be Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Thu, 26 May 2022 07:04:57 +0200 Subject: [PATCH] default for planned works/operations as n --- ENI2/Excel/DakosyUtil.cs | 2 ++ ENI2/Excel/ExcelUtil.cs | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ENI2/Excel/DakosyUtil.cs b/ENI2/Excel/DakosyUtil.cs index ffe341d4..b895ad54 100644 --- a/ENI2/Excel/DakosyUtil.cs +++ b/ENI2/Excel/DakosyUtil.cs @@ -636,6 +636,8 @@ namespace ENI2.Excel pre72h.PlannedWorks = reader.ReadCellAsText("port state control", "C15"); pre72h.DateOfLastExpandedInspection = reader.ReadCellAsDateTime("port state control", "C16"); pre72h.PlannedPeriodOfStay_HUR = reader.ReadCellAsDecimal("port state control", "C17"); + if (pre72h.PlannedOperations.IsNullOrEmpty()) pre72h.PlannedOperations = "n"; + if (pre72h.PlannedWorks.IsNullOrEmpty()) pre72h.PlannedWorks = "n"; return true; } diff --git a/ENI2/Excel/ExcelUtil.cs b/ENI2/Excel/ExcelUtil.cs index 30ac5f1c..8079f17d 100644 --- a/ENI2/Excel/ExcelUtil.cs +++ b/ENI2/Excel/ExcelUtil.cs @@ -1867,7 +1867,7 @@ namespace ENI2.Excel #region PRE72H private static bool ScanPRE72H(Message pre72hMessage, ExcelReader reader) - { + { if (pre72hMessage.Elements.Count == 0) { PRE72H newPRE72H = new PRE72H(); @@ -1880,6 +1880,8 @@ namespace ENI2.Excel pre72h.ConditionCargoBallastTanks = reader.ReadConditionTanks("PRE72H.ConditionCargoBallastTanks"); pre72h.TankerHullConfiguration = reader.ReadHullConfiguration("PRE72H.TankerHullConfiguration"); pre72h.PlannedWorks = reader.ReadText("PRE72H.PlannedWorks"); + if (pre72h.PlannedOperations.IsNullOrEmpty()) pre72h.PlannedOperations = "n"; + if (pre72h.PlannedWorks.IsNullOrEmpty()) pre72h.PlannedWorks = "n"; return true; }