public static ActivityType GetActivityType(LoginUser loginUser, int ActivityTypeID)
        {
            ActivityTypes ActivityTypes = new ActivityTypes(loginUser);

            ActivityTypes.LoadByActivityTypeID(ActivityTypeID);
            if (ActivityTypes.IsEmpty)
            {
                return(null);
            }
            else
            {
                return(ActivityTypes[0]);
            }
        }
        public void MovePositionUp(int ActivityTypeID)
        {
            ActivityTypes types1 = new ActivityTypes(LoginUser);

            types1.LoadByActivityTypeID(ActivityTypeID);
            if (types1.IsEmpty || types1[0].Position < 1)
            {
                return;
            }

            ActivityTypes types2 = new ActivityTypes(LoginUser);

            types2.LoadByPosition(types1[0].OrganizationID, types1[0].Position - 1);
            if (!types2.IsEmpty)
            {
                types2[0].Position = types2[0].Position + 1;
                types2.Save();
            }

            types1[0].Position = types1[0].Position - 1;
            types1.Save();
            ValidatePositions(LoginUser.OrganizationID);
        }