Esempio n. 1
0
        public static void AddItem(int portalID, int productID, int quantity)
        {
            string cartID = getCartID(portalID);

            ItemInfo itemInfo = new ItemInfo();
            itemInfo.CartID = cartID;
            itemInfo.ProductID = productID;
            itemInfo.Quantity = quantity;

            CartController controller = new CartController();
            controller.AddItem(itemInfo);
        }
Esempio n. 2
0
        /*
        public static void AddItem(int portalID, int productID, int quantity, int deliveryMethod)
        {
            string cartID = getCartID(portalID);

            ItemInfo itemInfo = new ItemInfo();
            itemInfo.CartID = cartID;
            itemInfo.ProductID = productID;
            itemInfo.Quantity = quantity;
            itemInfo.DeliveryMethod = deliveryMethod;

            CartController controller = new CartController();
            controller.AddItem(itemInfo);
        }
        */
        // canadean changed: added method for the Data Extracts products
        public static void AddItem(int portalID, int productID, int quantity, int deliveryMethod, string modelNumber, string modelName, decimal cost)
        {
            string cartID = getCartID(portalID);

            ItemInfo itemInfo = new ItemInfo();
            itemInfo.CartID = cartID;
            if (productID == -1)
                productID = 15;        // DE product. Only used as a reference
            itemInfo.ProductID = productID;
            itemInfo.Quantity = quantity;
            itemInfo.DeliveryMethod = deliveryMethod;

            itemInfo.ModelNumber = modelNumber;
            itemInfo.ModelName = modelName;
            itemInfo.UnitCost = cost;

            CartController controller = new CartController();
            controller.AddItem(itemInfo);
        }
Esempio n. 3
0
 public void AddItem(ItemInfo itemInfo)
 {
     // canadean changed: added new product cart attributes
     DataProvider.Instance().AddItem(itemInfo.CartID, itemInfo.ProductID, itemInfo.Quantity, itemInfo.DeliveryMethod, itemInfo.ModelNumber, itemInfo.ModelName, itemInfo.UnitCost);
 }
Esempio n. 4
0
 public void UpdateItem(ItemInfo itemInfo)
 {
     DataProvider.Instance().UpdateItem(itemInfo.ItemID, itemInfo.Quantity);
 }