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); } }
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); } }
public void CreateNewBadge(int badgeid, Badges badge) { _badgeLog.Add(badgeid, badge); }