Пример #1
0
        //create
        public bool NewBadge(Badges newBadge)
        {
            int startingcount = _dictionaryOfBadges.Count();

            _dictionaryOfBadges.Add(newBadge.BadgeID, newBadge.doorAccess);
            bool wasAdded = (_dictionaryOfBadges.Count() > startingcount) ? true : false;

            return(wasAdded);
        }
Пример #2
0
        public bool AccessDoor(Badges newBadge)
        {
            int           startingcount = _dictionaryOfBadges.Count;
            int           id            = newBadge.BadgeID;
            List <string> listOfDoors   = newBadge.doorAccess;

            _dictionaryOfBadges.Add(id, listOfDoors);
            bool wasAdded = (_dictionaryOfBadges.Count > startingcount) ? true : false;

            return(wasAdded);
        }