diff --git a/ENI2/Controls/MaerskListControl.xaml b/ENI2/Controls/MaerskListControl.xaml
index 8f4391b5..c45a235f 100644
--- a/ENI2/Controls/MaerskListControl.xaml
+++ b/ENI2/Controls/MaerskListControl.xaml
@@ -46,7 +46,7 @@
-
+
diff --git a/ENI2/Controls/MaerskListControl.xaml.cs b/ENI2/Controls/MaerskListControl.xaml.cs
index e7bec545..b7410ee6 100644
--- a/ENI2/Controls/MaerskListControl.xaml.cs
+++ b/ENI2/Controls/MaerskListControl.xaml.cs
@@ -214,7 +214,7 @@ namespace ENI2.Controls
}
else
{
- if(md.ETA.Value.IsNextXDays(3))
+ if(md.ETA.Value.IsNextXDays(4))
{
md.Status = MaerskData.MDStatus.NO_ID_AND_DUE;
}
@@ -271,7 +271,7 @@ namespace ENI2.Controls
}
}
this.TimeFilterItemSource();
- this.SortItemSource();
+ // this.SortItemSource();
this.dataGridPOCores.SelectedItem = null;
busyControl.BusyState = Util.UIHelper.BusyStateEnum.NEUTRAL;
}
@@ -404,6 +404,8 @@ namespace ENI2.Controls
throw new InvalidOperationException($"{md.ColI} found in import to {PortLocode}, this is probably an error. Aborting import");
}
if (!reader.IsDBNull(9)) md.ColJ = ReadFieldAsString(reader, 9);
+ if (md.ColJ == null) continue;
+ if (!(md.ColJ.Equals("msk", StringComparison.OrdinalIgnoreCase) || md.ColJ.Equals("sgl", StringComparison.OrdinalIgnoreCase))) continue; // skip operator we are not interested in
if (!reader.IsDBNull(10)) md.ColK = ReadFieldAsString(reader, 10);
if (!reader.IsDBNull(11)) md.ColL = ReadFieldAsString(reader, 11);
if (!reader.IsDBNull(12)) md.ColM = ReadFieldAsString(reader, 12);
@@ -449,7 +451,7 @@ namespace ENI2.Controls
}
}
this.TimeFilterItemSource();
- this.SortItemSource();
+ // this.SortItemSource();
busyControl.BusyState = Util.UIHelper.BusyStateEnum.NEUTRAL;
}
@@ -508,7 +510,7 @@ namespace ENI2.Controls
private async void buttonRequestIds_Click(object sender, RoutedEventArgs e)
{
- // find all entries from now until 3 days into the future and track parallel requests
+ // find all entries from now until 4 days into the future and track parallel requests
List requestList = new List();
if (sender == this.buttonRequestIds)
{
@@ -526,7 +528,7 @@ namespace ENI2.Controls
if(((md.MessageCore == null) && md.ColM.IsNullOrEmpty()) ||
((md.MessageCore != null) && md.MessageCore.VisitId.IsNullOrEmpty()))
{
- if (md.ETA.HasValue && md.ETA.Value.IsNextXDays(3))
+ if (md.ETA.HasValue && md.ETA.Value.IsNextXDays(4))
requestList.Add(md);
}
}
diff --git a/ENI2/ENI2.csproj b/ENI2/ENI2.csproj
index 352a2621..a0dc5c09 100644
--- a/ENI2/ENI2.csproj
+++ b/ENI2/ENI2.csproj
@@ -36,7 +36,7 @@
5.4.0.0
true
publish.html
- 10
+ 12
7.9.0.%2a
false
true
diff --git a/ENI2/Excel/ExcelSimpleWriter.cs b/ENI2/Excel/ExcelSimpleWriter.cs
index b61bed79..774f8798 100644
--- a/ENI2/Excel/ExcelSimpleWriter.cs
+++ b/ENI2/Excel/ExcelSimpleWriter.cs
@@ -56,7 +56,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;
}
wb.SaveAs(filename, XlFileFormat.xlOpenXMLWorkbook, Type.Missing, Type.Missing, Type.Missing,
diff --git a/bsmd.database/Extensions.cs b/bsmd.database/Extensions.cs
index bcfd3866..9392547a 100644
--- a/bsmd.database/Extensions.cs
+++ b/bsmd.database/Extensions.cs
@@ -126,11 +126,12 @@ namespace bsmd.database
///
/// Returns true if the date is between now and numDays in the future (or past, if numDays is negative)
+ /// (regarding full days, ignoring time component
///
public static bool IsNextXDays(this DateTime datetime, int numDays)
{
- double diff = (datetime - DateTime.Now).TotalDays;
- if (numDays >= 0) return diff < numDays && diff > 0;
+ double diff = (datetime.Date - DateTime.Now.Date).TotalDays;
+ if (numDays >= 0) return diff <= numDays && diff >= 0;
else return diff < numDays && diff < 0;
}