From ae0f6cae51ef2d8be0f5893cb6687ae190139b27 Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Thu, 6 Apr 2023 09:58:51 +0200 Subject: [PATCH] fixed Maersk Excel export (sorting and Remark) --- ENI2/Excel/ExcelSimpleWriter.cs | 2 +- bsmd.database/MaerskData.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ENI2/Excel/ExcelSimpleWriter.cs b/ENI2/Excel/ExcelSimpleWriter.cs index e13f3a67..4f73552d 100644 --- a/ENI2/Excel/ExcelSimpleWriter.cs +++ b/ENI2/Excel/ExcelSimpleWriter.cs @@ -59,7 +59,7 @@ namespace ENI2.Excel ws.Cells[i + 2, 11] = md.ColK; ws.Cells[i + 2, 12] = md.ColL; ws.Cells[i + 2, 13] = md.ColM ; - // ws.Cells[i + 2, 14] = md.Remark; + ws.Cells[i + 2, 14] = md.Remark; if((md.MessageCore != null) && (md.MessageCore.Cancelled ?? false)) { diff --git a/bsmd.database/MaerskData.cs b/bsmd.database/MaerskData.cs index 5a2b562d..0f8b1fd8 100644 --- a/bsmd.database/MaerskData.cs +++ b/bsmd.database/MaerskData.cs @@ -258,9 +258,9 @@ namespace bsmd.database /// public int CompareTo(MaerskData other) { - if (this.ColA == null) return 0; - if (other == null) return 0; - return this.ColA.CompareTo(other.ColA); + if (this.ETA == null) return 0; + if ((other == null) || (other.ETA == null)) return 0; + return this.ETA.Value.CompareTo(other.ETA.Value); } public bool Update(MaerskData md)