Ejemplo n.º 1
0
 public static bool IsCompleted(EMDataSet.ContainerTblRow row, out string reason)
 {
     reason = null;
     if (!row.IsApplyClosingToEntireContainerNull() &&
         row.ApplyClosingToEntireContainer!=0)
     {
         if (!row.IsContainerPickupTerminalNull() &&
             row.ContainerPickupTerminal != "")
             return true;
         if (!row.IsContainerProofOfDeliveryNull() &&
             row.ContainerProofOfDelivery != "")
             return true;
         reason = "You must enter either a terminal or a bill of lading before closing.";
         return false;
     }
     foreach (EMDataSet.ContBundleTblRow bundleRow in row.GetContBundleTblRows())
     {
         // 2 options: either, each row has a bil of lading item
         // or it has a pick up date and terminal
         if (IsContainerItemDone(bundleRow,out reason))
             continue;
         return false;
     }
     if (row.GetContBundleTblRows().Length == 0)
         return false;
     return true;
 }