diff --git a/ENI2/Controls/MaerskListControl.xaml.cs b/ENI2/Controls/MaerskListControl.xaml.cs index 0ebeb899..1cb21559 100644 --- a/ENI2/Controls/MaerskListControl.xaml.cs +++ b/ENI2/Controls/MaerskListControl.xaml.cs @@ -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();