Example #1
0
        private IMenu BuildUltraMenuItem(MenuTreeNode node)
        {
            string menuName = UserControl.MutiLanguages.ParserString(Menu_Prefix + node.MenuWithUrl.MenuCode);

            if (menuName == string.Empty)
            {
                menuName = UserControl.MutiLanguages.ParserString(Module_Prefix + node.MenuWithUrl.ModuleCode);

                if (menuName == string.Empty)
                {
                    menuName = node.MenuWithUrl.MenuCode;
                }
            }

            string strUrl = node.MenuWithUrl.FormUrl;
            string strKey = strUrl;

            if (strKey == string.Empty)
            {
                strKey = node.MenuWithUrl.MenuCode;
            }
            MenuCommand item = new MenuCommand(strKey, menuName, 0, new CommandOpenForm(strUrl));

            TreeObjectNodeSet set = node.GetSubLevelChildrenNodes();

            ArrayList listSubMenu = new ArrayList();

            foreach (MenuTreeNode subNode in set)
            {
                if (subNode.MenuWithUrl.MenuType.ToUpper() == MenuType.MenuType_PDA.ToUpper())
                {
                    if (this.menuHT != null && this.menuHT.Contains(subNode.MenuWithUrl.ModuleCode))
                    {
                        continue;
                    }
                    if (this.htUnVisibilityMenu != null && this.htUnVisibilityMenu.Contains(subNode.MenuWithUrl.MenuCode))
                    {
                        continue;
                    }
                    listSubMenu.Add(BuildUltraMenuItem(subNode));
                }
            }
            if (listSubMenu.Count > 0)
            {
                MenuCommand[] subMenu = new MenuCommand[listSubMenu.Count];
                listSubMenu.CopyTo(subMenu);
                item.SubMenus = subMenu;
            }

            return(item);
        }
Example #2
0
        private DataMenuItem BuildUltraMenuItemRPTNew(MenuTreeNode node, ControlLibrary.Web.Language.LanguageComponent languageComponent, string reportViewMenuCode, DataMenuItem reportViewMenuItem)
        {
            DataMenuItem item = new DataMenuItem();

            //item.Style.Width = new Unit(180);
            item.Target = "frmWorkSpace";

            string menuName = languageComponent.GetString(Menu_Prefix + node.MenuWithUrl.MenuCode);

            if (menuName == string.Empty)
            {
                menuName = languageComponent.GetString(Module_Prefix + node.MenuWithUrl.ModuleCode);

                if (menuName == string.Empty)
                {
                    menuName = node.MenuWithUrl.MenuCode;
                }
            }

            item.Text = menuName;

            item.NavigateUrl = node.MenuWithUrl.FormUrl;

            TreeObjectNodeSet set = node.GetSubLevelChildrenNodes();

            foreach (MenuTreeNode subNode in set)
            {
                if (subNode.MenuWithUrl.MenuType.ToUpper() == MenuType.MenuType_RPT.ToUpper())
                {
                    if (this.menuHT != null && this.menuHT.Contains(subNode.MenuWithUrl.ModuleCode))
                    {
                        continue;
                    }
                    if (this.htUnVisibilityMenu != null && this.htUnVisibilityMenu.Contains(subNode.MenuWithUrl.MenuCode))
                    {
                        continue;
                    }
                    item.Items.Add(BuildUltraMenuItemRPTNew(subNode, languageComponent, reportViewMenuCode, reportViewMenuItem));
                }
            }

            if (string.Compare(node.MenuWithUrl.MenuCode, reportViewMenuCode, true) == 0 && reportViewMenuItem != null)
            {
                foreach (DataMenuItem reportViewitem in reportViewMenuItem.Items)
                {
                    item.Items.Add(reportViewitem);
                }
            }

            return(item);
        }
Example #3
0
        private Infragistics.WebUI.UltraWebNavigator.Item BuildUltraMenuItemRPT(MenuTreeNode node, ControlLibrary.Web.Language.LanguageComponent languageComponent)
        {
            Infragistics.WebUI.UltraWebNavigator.Item item = new Infragistics.WebUI.UltraWebNavigator.Item();

            //item.Style.Width = new Unit(180);
            item.TargetFrame = "frmWorkSpace";

            string menuName = languageComponent.GetString(Menu_Prefix + node.MenuWithUrl.MenuCode);

            if (menuName == string.Empty)
            {
                menuName = languageComponent.GetString(Module_Prefix + node.MenuWithUrl.ModuleCode);

                if (menuName == string.Empty)
                {
                    menuName = node.MenuWithUrl.MenuCode;
                }
            }

            item.Text = menuName;

            item.TargetUrl = node.MenuWithUrl.FormUrl;

            TreeObjectNodeSet set = node.GetSubLevelChildrenNodes();

            foreach (MenuTreeNode subNode in set)
            {
                if (subNode.MenuWithUrl.MenuType.ToUpper() == MenuType.MenuType_RPT.ToUpper())
                {
                    if (this.menuHT != null && this.menuHT.Contains(subNode.MenuWithUrl.ModuleCode))
                    {
                        continue;
                    }
                    if (this.htUnVisibilityMenu != null && this.htUnVisibilityMenu.Contains(subNode.MenuWithUrl.MenuCode))
                    {
                        continue;
                    }
                    item.Items.Add(BuildUltraMenuItemRPT(subNode, languageComponent));
                }
            }

            return(item);
        }