Пример #1
0
        private Infragistics.WebUI.UltraWebNavigator.Item BuildUltraMenuItem(MenuTreeNode node, ControlLibrary.Web.Language.LanguageComponent languageComponent, string reportViewMenuCode, Item reportViewMenuItem)
        {
            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_BS.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(BuildUltraMenuItem(subNode, languageComponent, reportViewMenuCode, reportViewMenuItem));
                }
            }

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

            return(item);
        }
Пример #2
0
        public void BuildRPT(UltraWebMenu ultraMenu, ControlLibrary.Web.Language.LanguageComponent languageComponent, IDomainDataProvider _domainDataProvider)
        {
            this.GetXMLMenu();  //获取不要显示的模块
            this.GetUnVisibilityMenu(_domainDataProvider);

            if (ultraMenu == null)
            {
                return;
            }

            ultraMenu.Items.Clear();

            //BenQGuru.eMES.Common.Domain.IDomainDataProvider _domainDataProvider = BenQGuru.eMES.Common.DomainDataProvider.DomainDataProviderManager.DomainDataProvider();
            SystemSettingFacade facade   = new SystemSettingFacade(_domainDataProvider);
            ITreeObjectNode     rootNode = facade.BuildMenuTreeRPT();

            TreeObjectNodeSet set = rootNode.GetSubLevelChildrenNodes();

            foreach (MenuTreeNode node in set)
            {
                if (node.MenuWithUrl.MenuType.ToUpper() == MenuType.MenuType_RPT.ToUpper())
                {
                    if (this.menuHT != null && this.menuHT.Contains(node.MenuWithUrl.ModuleCode))
                    {
                        continue;
                    }
                    if (this.htUnVisibilityMenu != null && this.htUnVisibilityMenu.Contains(node.MenuWithUrl.MenuCode))
                    {
                        continue;
                    }

                    ultraMenu.Items.Add(BuildUltraMenuItemRPT(node, languageComponent));
                }
            }

            Infragistics.WebUI.UltraWebNavigator.Item item = new Infragistics.WebUI.UltraWebNavigator.Item();

            item.Text      = "";
            item.TargetUrl = "#";

            ultraMenu.Items.Add(item);

            if (_domainDataProvider != null)
            {
                ((SQLDomainDataProvider)_domainDataProvider).PersistBroker.CloseConnection();
            }
        }
Пример #3
0
 private static void AddItem(ref UltraWebMenu webMenu, string parentMenuId, string menuId, string menuName, string toolTip, string menuAction, string icon, string width)
 {
     Infragistics.WebUI.UltraWebNavigator.Item n, p = FindParent(ref webMenu, parentMenuId);
     n         = new Infragistics.WebUI.UltraWebNavigator.Item();
     n.DataKey = menuId;
     n.Text    = menuName;
     if (parentMenuId != "0")
     {
         n.ImageUrl = icon;
     }
     n.TargetUrl = menuAction;
     if (p == null)
     {
         webMenu.Items.Add(n);
         webMenu.Width = Unit.Pixel(Convert.ToInt32(webMenu.Width.Value) + Convert.ToInt32(width));
     }
     else
     {
         p.Items.Add(n);
     }
 }
Пример #4
0
        public void Build(UltraWebMenu ultraMenu, ControlLibrary.Web.Language.LanguageComponent languageComponent, IDomainDataProvider _domainDataProvider)
        {
            this.GetXMLMenu();  //获取不要显示的模块
            this.GetUnVisibilityMenu(_domainDataProvider);

            if (ultraMenu == null)
            {
                return;
            }

            ultraMenu.Items.Clear();

            //BenQGuru.eMES.Common.Domain.IDomainDataProvider _domainDataProvider = BenQGuru.eMES.Common.DomainDataProvider.DomainDataProviderManager.DomainDataProvider();
            SystemSettingFacade facade = new SystemSettingFacade(_domainDataProvider);

            #region 添加报表平台菜单入口

            //获得系统参数里面的报表平台菜单入口
            string reportViewMenuCode = string.Empty;
            Domain.BaseSetting.Parameter parameter = (Domain.BaseSetting.Parameter)facade.GetParameter("REPORTMENU", "REPORTMENU");
            if (parameter != null)
            {
                reportViewMenuCode = FormatHelper.PKCapitalFormat(FormatHelper.CleanString(parameter.ParameterAlias));
            }

            //获得系统参数里面的报表平台菜单Item
            Item reportViewMenuItem = GetReportViewMenuRoot(reportViewMenuCode, languageComponent, _domainDataProvider);

            #endregion

            ITreeObjectNode rootNode = facade.BuildMenuTree();

            TreeObjectNodeSet set = rootNode.GetSubLevelChildrenNodes();
            foreach (MenuTreeNode node in set)
            {
                if (node.MenuWithUrl.MenuType.ToUpper() == MenuType.MenuType_BS.ToUpper())
                {
                    if (this.menuHT != null && this.menuHT.Contains(node.MenuWithUrl.ModuleCode))
                    {
                        continue;
                    }
                    if (this.htUnVisibilityMenu != null && this.htUnVisibilityMenu.Contains(node.MenuWithUrl.MenuCode))
                    {
                        continue;
                    }
                    ultraMenu.Items.Add(BuildUltraMenuItem(node, languageComponent, reportViewMenuCode, reportViewMenuItem));
                }
            }

            Infragistics.WebUI.UltraWebNavigator.Item item = new Infragistics.WebUI.UltraWebNavigator.Item();

            item.Text      = "";
            item.TargetUrl = "#";

            ultraMenu.Items.Add(item);

            if (_domainDataProvider != null)
            {
                ((SQLDomainDataProvider)_domainDataProvider).PersistBroker.CloseConnection();
            }
        }