Esempio n. 1
0
        public static bool AddPurchaseOrderItem(PurchaseShoppingCartItemInfo item, string POrderId)
        {
            SalesProvider provider = SalesProvider.Instance();
            int           currentPOrderItemQuantity = provider.GetCurrentPOrderItemQuantity(POrderId, item.SkuId);

            if (currentPOrderItemQuantity == 0)
            {
                return(provider.AddPurchaseOrderItem(item, POrderId));
            }
            return(provider.UpdatePurchaseOrderQuantity(POrderId, item.SkuId, item.Quantity + currentPOrderItemQuantity));
        }