예제 #1
0
        public void Update(int RowID, string MenuName, int MenuID, int ProductID, string ProductName, double Price, string Image)
        {
            MenuItemAux Item = _items[RowID];

            Item.MenuID    = MenuID;
            Item.ProductID = ProductID;
            Item.MenuName  = MenuName;
            Item.Price     = Price;
            Item.Image     = Image;
            _lastUpdate    = DateTime.Now;
        }
예제 #2
0
        public void Insert(string MenuName, int MenuID, int ProductID, string ProductName, double Price, string Image)
        {
            int ItemIndex = ItemIndexOfID(ProductID);

            if (ItemIndex == -1)
            {
                MenuItemAux NewItem = new MenuItemAux();
                NewItem.MenuID      = MenuID;
                NewItem.ProductID   = ProductID;
                NewItem.MenuName    = MenuName;
                NewItem.Price       = Price;
                NewItem.ProductName = ProductName;
                NewItem.Image       = Image;
                _items.Add(NewItem);
            }

            _lastUpdate = DateTime.Now;
        }