Example #1
0
        public bool setActiveUserState(bool active, int UserID)
        {
            bool result = false;

            try
            {
                if (active)
                {
                    result = 1 == _userAccessor.ActivateUser(UserID);
                }
                else
                {
                    result = 1 == _userAccessor.DeactivateUser(UserID);
                }
                if (result == false)
                {
                    throw new ApplicationException("Employee record out of date");
                }
            }
            catch (Exception ex)
            {
                throw new ApplicationException("Update to user failed", ex);
            }
            return(result);
        }