Exemplo n.º 1
0
        public bool Logout(string mgrId)
        {
            return(AccessPointDAL.Logout(mgrId, m_ID));

            /*
             * TODO in future
             * Session Management
             * */
        }
Exemplo n.º 2
0
        private void ProcessDeviceManagerEvent(string msg)
        {
            char[] WHITESPACE_CHARS = { '\b', '\t', ' ', '\n', '\v', '\f', '\a' };
            msg = msg.Trim();
            var fields = msg.Split(WHITESPACE_CHARS);

            if (fields.Length == 3 && string.Compare(fields[2], m_ID, true) == 0)
            {
                if (string.Compare(fields [0], "checkin", true) == 0)                    // check-in event from DeviceManager
                {
                    Console.WriteLine("RECEIVED: " + msg);
                    AccessPointDAL.Checkin(fields [1], m_ID);
                }
                if (string.Compare(fields[0], "checkout", true) == 0)                   // check-out event from DeviceManager
                {
                    Console.WriteLine("RECEIVED: " + msg);
                    AccessPointDAL.Checkout(fields [1], m_ID);
                }
            }
        }