コード例 #1
0
        public bool UpdateBadgeAccess(int badgeID, Badges newDoorAccess)
        {
            Badges oldAccess = SearchBadgeID(badgeID);

            if (oldAccess != null)
            {
                oldAccess.BadgeID   = newDoorAccess.BadgeID;
                oldAccess.DoorNames = newDoorAccess.DoorNames;
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #2
0
        public bool DeleteDoorFromBadge(int badgeID)
        {
            Badges badge = SearchBadgeID(badgeID);

            if (badge == null)
            {
                return(false);
            }
            int initialCount = _badgeLog.Count();

            if (initialCount > _badgeLog.Count)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #3
0
 public void CreateNewBadge(int badgeid, Badges badge)
 {
     _badgeLog.Add(badgeid, badge);
 }