Exemplo n.º 1
0
 private static OrderItem GetOrderItemById(int orderItemId, CheckoutDataContextProvider dcp)
 {
     OrderItem orderItem = GetAllOrderItemsAsQueryable(dcp).FirstOrDefault(x => x.ID == orderItemId);
     if (orderItem == null)
     {
         throw new TechnicalException("OrderItem not found. ID:" + orderItemId);
     }
     return orderItem;
 }
Exemplo n.º 2
0
 public static IQueryable<vOrderItem> GetAllvOrderItemsAsQueryable(CheckoutDataContextProvider dcp = null)
 {
     if (dcp == null)
     {
         dcp = CheckoutDataContextProvider.Instance;
     }
     Repository<vOrderItem> rep = new Repository<vOrderItem>(dcp);
     return rep.GetAll();
 }
Exemplo n.º 3
0
        public static List<OrderItem> GetLocationWaitingItemList(CheckoutDataContextProvider dcp = null)
        {
            if (dcp == null)
                dcp = CheckoutDataContextProvider.Instance;

            Repository<OrderItem> rep = new Repository<OrderItem>(dcp);
            List<OrderItem> orderItems = rep.GetAll().Where(x => x.IsCancelled == false && x.StatusCode == OrderItemStatus.LocationWaiting.ToString()).ToList();
            return orderItems;
        }
Exemplo n.º 4
0
        public static List<OrderItem> GetCheckoutWaitingItemList(CheckoutDataContextProvider dcp = null)
        {
            if (dcp == null)
                dcp = CheckoutDataContextProvider.Instance;

            Repository<OrderItem> rep = new Repository<OrderItem>(dcp);
            Repository<CollectionOrderItem> repCollectionItem = new Repository<CollectionOrderItem>(dcp);
            List<OrderItem> orderItems = rep.GetAll().Where(x => x.IsCancelled == false
                                                                && x.IsCheckoutManually == false
                                                                && x.StatusCode == OrderItemStatus.CheckoutWaiting.ToString()
                                                                && repCollectionItem.GetAll().Any(p => p.OrderItemID == x.ID) == false).ToList();
            return orderItems;
        }
Exemplo n.º 5
0
        private static IQueryable<OrderItem> GetAllOrderItemsAsQueryable(CheckoutDataContextProvider dcp = null)
        {
            if (dcp == null)
                dcp = CheckoutDataContextProvider.Instance;

            Repository<OrderItem> rep = new Repository<OrderItem>(dcp);
            return rep.GetAll();
        }