Esempio n. 1
0
        //UPDATE
        public bool UpdateExistingBadgeDir(int existingBadgeID, BadgeAccessDir newData)
        {
            //Find the original content
            BadgeAccessDir currentData = GetDataByBadgeID(existingBadgeID);

            //Update the content
            if (currentData != null)
            {
                currentData.BadgeID    = newData.BadgeID;
                currentData.DoorAccess = newData.DoorAccess;


                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 2
0
        //DELETE
        public bool RemoveDataFromBadgeDir(double badgeID)
        {
            BadgeAccessDir data = GetDataByBadgeID(badgeID);

            if (data == null)
            {
                return(false);
            }

            int intialCount = _badgeDir.Count;

            _badgeDir.Remove(data);

            if (intialCount > _badgeDir.Count)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 3
0
        //Dirtionary



        //CRUD

        //CREATE
        public void AddDataToList(BadgeAccessDir data)
        {
            _badgeDir.Add(data);
        }