merged wip

This commit is contained in:
Daniel Schick 2023-02-22 09:42:45 +01:00
commit f529fa9ac9
2 changed files with 9 additions and 8 deletions

View File

@ -1,5 +1,5 @@
// Copyright (c) 2017 schick Informatik
// Description: PO Nummer Übersicht. Ergänzung Nummern. Excel Export
// Copyright (c) 2017 / 2023 schick Informatik
// Description: Request dbh ids for Maersk data lists
//
using System;
@ -440,7 +440,8 @@ namespace ENI2.Controls
{
foreach (MaerskData md in this.dataGridPOCores.SelectedItems)
{
if ((md.MessageCore != null) || (!md.ColM.IsNullOrEmpty())) continue; // already requested
if (md.MessageCore?.VisitId.IsNullOrEmpty() == false) continue; // already requested
if (md.ColM?.IsNullOrEmpty() == false) continue; // already something there
requestList.Add(md);
}
}
@ -448,7 +449,8 @@ namespace ENI2.Controls
{
foreach(MaerskData md in this.maerskDataList)
{
if((md.MessageCore == null) && md.ColM.IsNullOrEmpty())
if(((md.MessageCore == null) && md.ColM.IsNullOrEmpty()) ||
((md.MessageCore != null) && md.MessageCore.VisitId.IsNullOrEmpty()))
{
if (md.ETA.HasValue && md.ETA.Value.IsNextXDays(3))
requestList.Add(md);
@ -461,8 +463,7 @@ namespace ENI2.Controls
MessageBox.Show("No valid rows selected", "Warning", MessageBoxButton.OK, MessageBoxImage.Exclamation);
}
else
{
// Todo:
{
foreach (MaerskData md in requestList)
{
md.Status = MaerskData.MDStatus.REQUESTING_ID;

View File

@ -256,9 +256,9 @@ namespace bsmd.database
/// </summary>
public int CompareTo(MaerskData other)
{
if (this.ColK == null) return 0;
if (this.ColA == null) return 0;
if (other == null) return 0;
return this.ColK.CompareTo(other.ColK);
return this.ColA.CompareTo(other.ColA);
}
public bool Update(MaerskData md)