public bool Handle(RemoveFoodItem command)
        {
            bool res = false;

            if (command.command())
            {
                res = true;
            }
            return(res);
        }
示例#2
0
        //removes the food item identifed by bfid
        public bool removeFoodItem(long bfid)
        {
            Mediator m = new Mediator();

            FindId findId = new FindId(bfid);

            if (m.findIdHandler.Handle(findId).response != 0)
            {
                RemoveFoodItem removeFoodItem = new RemoveFoodItem(bfid);
                return(m.removeFoodItemHandler.Handle(removeFoodItem));
            }
            return(false);
        }