public static bool CanOrderItemBeAddedToNotFoundList(CollectionDataDO collection, OrderItemDO orderItem)
        {
            if (CanOrderItemBeAddedToCollection(collection, orderItem) == false)
                return false;

            if (collection.NotFoundItemList.Select(x => x.ID).Contains(orderItem.ID))
            {
                return false;
            }

            return true;
        }
        public static bool IsShowManualCheckoutButton(OrderItemDO orderItem)
        {
            if (orderItem == null)
            {
                return false;
            }

            if (orderItem.StatusCode != OrderItemStatus.ManualCheckout.ToString() && orderItem.StatusCode != OrderItemStatus.Found.ToString())
            {
                return true;
            }

            return false;
        }
        public static bool IsShowAddPickupQueueButton(OrderItemDO orderItem)
        {
            if (orderItem == null)
            {
                return false;
            }

            if (orderItem.IsCancelled)
            {
                return false;
            }

            if (orderItem.StatusCode == OrderItemStatus.ManualCheckout.ToString() || orderItem.StatusCode == OrderItemStatus.Found.ToString())
            {
                return true;
            }
            return false;
        }
        private static bool CanOrderItemBeAddedToCollection(CollectionDataDO collection, OrderItemDO orderItem)
        {
            if (collection == null)
            {
                return false;
            }

            if (orderItem == null)
            {
                return false;
            }

            if (orderItem.StatusCode != OrderItemStatus.CheckoutWaiting.ToString())
            {
                return false;
            }
            return true;
        }
        public bool IsItemReportedSuccessfully(OrderItemDO orderItem)
        {
            if (orderItem == null)
            {
                return false;
            }

            if (CanUserRemoveItemFromList && orderItem.IsEditable)
            {
                return false;
            }

            if (orderItem.IsTransferStatusUncertain)
            {
                return false;
            }

            return true;
        }
 public NotFoundViewModel()
 {
     OrderItem = new OrderItemDO();
 }
 public RemarkViewModel()
 {
     OrderItem = new OrderItemDO();
 }
        public static void AddOrderItemToNotFoundList(OrderItemDO orderItemDO, int locationId, int userId)
        {
            CollectionDataDO collectionDataDO = CollectionDataBL.CreateCollectionDataIfNotExist(locationId, userId);

            ValidateLocation(locationId, collectionDataDO.Location.ID);

            CheckoutDataContextProvider dcp = CheckoutDataContextProvider.Instance;

            OrderItemDO orderItem = CheckoutBL.GetOrderItemById(orderItemDO.ID);

            if (SupplyRuleEngine.CanOrderItemBeAddedToNotFoundList(collectionDataDO, orderItem))
            {
                Repository<CollectionOrderItem> rep = new Repository<CollectionOrderItem>(dcp);
                CollectionOrderItem collectionOrderItem = new CollectionOrderItem();
                collectionOrderItem.OrderItemID = orderItemDO.ID;
                collectionOrderItem.StatusCode = OrderItemStatus.NotFound.ToString();
                collectionOrderItem.CollectionDataID = collectionDataDO.ID;
                collectionOrderItem.NotFoundReasonID = orderItemDO.NotFoundReasonID;
                rep.InsertOnSubmit(collectionOrderItem);
                dcp.CommitChanges(userId);
            }
        }