Exemple #1
0
        /// <summary>
        /// Add an access group matching person's group number and zone number
        /// </summary>
        /// <param name="cardReader"></param>
        /// <param name="cardNum"></param>
        /// <param name="groupNum"></param>
        /// <returns>True (Success) or False (Failed)</returns>
        public bool AddNewAccessGroup(string cardReader, int groupNum, int zoneNum)
        {
            // ( Address, GroupNumber, ZoneNumber, Legal, AllTimPass, FF, Timing )


            newCardReader.AcsGroup(
                cardReader,
                groupNum.ToString().PadLeft(2, '0'),
                Convert.ToString(zoneNum, 2).PadLeft(8, '0'),
                true,
                false,
                "0",
                2000);
            if (MessageReceived == "54063030030d0a54473030030d0a")
            {
                MessageReceived = "";
                return(true);
            }
            return(false);
        }