Beispiel #1
0
        public bool AddBadgeToDatabase(BadgeItem badge)
        {
            int StartingCount = _badgeDatabase.Count;

            _badgeDatabase.Add(badge.BadgeId, badge);
            if (StartingCount < _badgeDatabase.Count)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #2
0
        public bool UpdateBadge(int oldBadgeItem, BadgeItem newBadgeItem)
        {
            BadgeItem oldBadge = GetBadge(oldBadgeItem);

            if (oldBadge == null)
            {
                return(false);
            }
            else
            {
                oldBadge.BadgeId   = newBadgeItem.BadgeId;
                oldBadge.DoorNames = newBadgeItem.DoorNames;
                return(true);
            }
        }