//removes the food item identifed by bfid
        public void removeFoodItem(long bfid)
        {
            FoodItemAccess fia = new FoodItemAccess();

            if (fia.findId(bfid) != 0)
            {
                fia.removeFoodItem(bfid);
            }
        }
        //allows the user to set and update the consumption date. First checks if the date is valod
        //and if the item exists
        public int editConsDate(long bfid, DateTime?consDate)
        {
            FoodItemAccess fia = new FoodItemAccess();

            if (fia.findId(bfid) != 0)
            {
                if (consDate == null)
                {
                    fia.editConsDate(bfid, consDate);
                    return(0);
                }

                BFoodItem bFoodItem = getBFoodItem(bfid);
                if (bFoodItem.PurchaseDate > consDate)
                {
                    return(1);
                }
                fia.editConsDate(bfid, consDate);
                return(0);
            }
            return(2);
        }