//Function: register a new manager of the system
        //Return: a manager newd if the record is creaded successfully
        //        null if returned if the manager with a same name exists in db
        public Manager RegisterManager(string pName, string pPwd, string pMail)
        {
            Manager manager = null;
            bool? isExist = false;

            DataContextDataContext dc = new DataContextDataContext();
            dc.is_registered(pName, ref isExist);

            if (isExist == true)
            { } //manager = null
            else // not exist, can insert
            {
                try
                {
                    dc.insert_manager(pName, pPwd, pMail);
                    manager = new Manager(pName, pPwd, pMail);
                }
                catch (Exception ex)
                { } //custom = null;

            }

            return manager;
        }