Ejemplo n.º 1
0
        /// <summary>
        /// Checks to see if the supplied SectionId has a higher SectionType Level than this Section
        /// Returns true if it does otherwise returns false
        /// </summary>
        /// <param name="?"></param>
        /// <returns></returns>
        public bool HasHigherAuthorityThanMe(Section CheckedSection)
        {
            if((CheckedSection.CreatedBySectionTypeID == this.CreatedBySectionTypeID))
            {
                return false;
            }

            if((CheckedSection.CreatedBySectionType.NextSectionTypeID == -99)&&(this.CreatedBySectionType.NextSectionType.ID == -99))
            {
                return false;
            }
            else if((CheckedSection.CreatedBySectionType.NextSectionTypeID == -99)&&(this.CreatedBySectionType.NextSectionTypeID != -99))
            {
                return false;
            }
            else if((CheckedSection.CreatedBySectionType.NextSectionTypeID != -99)&&(this.CreatedBySectionType.NextSectionTypeID == -99))
            {
                return true;
            }

            SectionType Temp = CheckedSection.CreatedBySectionType;
            int CurrentId = this.CreatedBySectionType.ID;

            bool EndIT = false;

            while((Temp.ID != CurrentId)&&(!EndIT))
            {
                Temp = Temp.PreviousSectionType;

                if(Temp.PreviousSectionTypeID == -99)
                    EndIT = true;   //The System Administrator UserType is found which means that this sections user type is somewhere below the
                                    //supplied sections user type
            }
            return EndIT;
        }
Ejemplo n.º 2
0
 public void Add(Section X)
 {
     List.Add(X);
 }