Ejemplo n.º 1
0
        public void Update(int RowID, int ProductID, int Quantity, double Price)
        {
            CartItemAux Item = _items[RowID];

            Item.ProductID = ProductID;
            Item.Quantity  = Quantity;
            Item.Price     = Price;
            _lastUpdate    = DateTime.Now;
        }
Ejemplo n.º 2
0
        public void Insert(int ProductID, double Price, int Quantity, string ProductName, string ImageUrl)
        {
            int ItemIndex = ItemIndexOfID(ProductID);

            if (ItemIndex == -1)
            {
                CartItemAux NewItem = new CartItemAux();
                NewItem.ProductID   = ProductID;
                NewItem.Quantity    = Quantity;
                NewItem.Price       = Price;
                NewItem.ProductName = ProductName;
                NewItem.ImageUrl    = ImageUrl;
                _items.Add(NewItem);
            }
            else
            {
                _items[ItemIndex].Quantity += 1;
            }
            _lastUpdate = DateTime.Now;
        }