evaluate UPDATED only if entry is not cancelled

This commit is contained in:
Daniel Schick 2023-04-06 11:13:30 +02:00
parent ae0f6cae51
commit c97b9a72f5

View File

@ -444,8 +444,8 @@ namespace ENI2.Controls
else
{
imosAreOkay = false;
}
}
}
}
else
{
imosAreOkay = false;
@ -459,7 +459,7 @@ namespace ENI2.Controls
importData.Add(md);
if (isFirstRow) isFirstRow = false;
if (isFirstRow) isFirstRow = false;
}
}
catch (Exception ex)
@ -469,7 +469,7 @@ namespace ENI2.Controls
if (imosAreOkay && importData.Count > 0)
{
busyControl.BusyState = Util.UIHelper.BusyStateEnum.BUSY;
busyControl.BusyState = Util.UIHelper.BusyStateEnum.BUSY;
foreach (MaerskData md in importData)
{
@ -480,8 +480,11 @@ namespace ENI2.Controls
(m.ColG != null) ? m.ColG.Equals(md.ColG) : (md.ColG == null) &&
(m.ColH != null) ? m.ColH.Equals(md.ColH) : (md.ColH == null));
if(foundData.ETA.HasValue && ((foundData.ETA.Value - DateTime.Now).TotalSeconds > 0) && foundData.Update(md))
foundData.Status = MaerskData.MDStatus.UPDATED;
if ((foundData.MessageCore == null) || !(foundData.MessageCore.Cancelled ?? false))
{
if (foundData.ETA.HasValue && ((foundData.ETA.Value - DateTime.Now).TotalSeconds > 0) && foundData.Update(md))
foundData.Status = MaerskData.MDStatus.UPDATED;
}
}
else
{
@ -517,7 +520,7 @@ namespace ENI2.Controls
busyControl.BusyState = Util.UIHelper.BusyStateEnum.NEUTRAL;
this.dataGridPOCores.Items.Refresh();
}
}
}
stream.Close();