示例#1
0
        /// <summary>
        /// obtm a informao das seces e constroi os objectos que
        /// representam a sua informao no menu (SectionMenuLink)
        /// </summary>
        /// <returns>o contentor com os objectos menuLink que representam a
        /// a informao das seces</returns>
        private ArrayList calculateMotherSections()
        {
            ArrayList sectionsCollection = ((SectionCollection)SectionUtility.getAllSections()).getOrderedSections();
            ArrayList menuSection        = new ArrayList();
            int       menuLevel          = getMenuLevel();

            foreach (SectionInfo sectionInfo in sectionsCollection)
            {
                if (!sectionInfo.isVisible)
                {
                    continue;
                }
                if (sectionInfo.sectionName.CompareTo("Admin") == 0)
                {
                    if (!checkRole("admin"))
                    {
                        continue;
                    }
                }
                if (sectionInfo.sectionParentId <= menuLevel)
                {
                    SectionMenuLink link = new SectionMenuLink(sectionInfo.sectionName, sectionInfo.sectionPath);
                    menuSection.Add(link);
                }
            }

            return(menuSection);
        }
示例#2
0
        /// <summary>
        /// obtem a informao das seces e constroi os objectos que
        /// representam a sua informao no menu (SectionMenuLink)
        /// </summary>
        /// <returns>o contentor com os objectos menuLink que representam a
        /// a informao das seces</returns>
        private ArrayList calculateSubSections()
        {
            ArrayList sectionsCollection = getOrderedSections();
            ArrayList menuSection        = new ArrayList();

            foreach (SectionInfo sectionInfo in sectionsCollection)
            {
                if (isSectionGood(sectionInfo) && isSectionAvailable(sectionInfo.sectionName))
                {
                    SectionMenuLink link = new SectionMenuLink(sectionInfo.sectionName, sectionInfo.sectionPath);
                    menuSection.Add(link);
                }
            }
            return(menuSection);
        }
示例#3
0
 /// <summary>
 /// obtem a informao das seces e constroi os objectos que
 /// representam a sua informao no menu (SectionMenuLink)
 /// </summary>
 /// <returns>o contentor com os objectos menuLink que representam a
 /// a informao das seces</returns>
 private ArrayList calculateSubSections()
 {
     ArrayList sectionsCollection = getOrderedSections();
     ArrayList menuSection = new ArrayList();
     foreach(SectionInfo sectionInfo in sectionsCollection ) {
         if( isSectionGood(sectionInfo) && isSectionAvailable(sectionInfo.sectionName)  ) {
             SectionMenuLink link = new SectionMenuLink(sectionInfo.sectionName,sectionInfo.sectionPath);
             menuSection.Add(link);
         }
     }
     return menuSection;
 }
示例#4
0
        /// <summary>
        /// obtm a informao das seces e constroi os objectos que
        /// representam a sua informao no menu (SectionMenuLink)
        /// </summary>
        /// <returns>o contentor com os objectos menuLink que representam a
        /// a informao das seces</returns>
        private ArrayList calculateMotherSections()
        {
            ArrayList sectionsCollection = ((SectionCollection)SectionUtility.getAllSections()).getOrderedSections();
            ArrayList menuSection = new ArrayList();
            int menuLevel = getMenuLevel();

            foreach(SectionInfo sectionInfo in sectionsCollection ) {
                if( !sectionInfo.isVisible )
                    continue;
                if( sectionInfo.sectionName.CompareTo("Admin") == 0 )
                    if( !checkRole("admin") )
                        continue;
                if( sectionInfo.sectionParentId <= menuLevel ) {
                    SectionMenuLink link = new SectionMenuLink(sectionInfo.sectionName,sectionInfo.sectionPath);
                    menuSection.Add(link);
                }
            }

            return menuSection;
        }