public void BuildRPT(WebDataMenu 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)); } } DataMenuItem item = new DataMenuItem(); item.Text = ""; item.NavigateUrl = "#"; ultraMenu.Items.Add(item); if (_domainDataProvider != null) { ((SQLDomainDataProvider)_domainDataProvider).PersistBroker.CloseConnection(); } }
public void BuildRPTNew(WebDataMenu 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 添加报表平台菜单入口 //原:获得系统参数里面的报表平台菜单入口,现报表平台中的报表平台菜单入口:RPT_REPORTMENU string reportViewMenuCode = "RPT_REPORTMENU"; //Domain.BaseSetting.Parameter parameter = (Domain.BaseSetting.Parameter)facade.GetParameter("REPORTMENU", "REPORTMENU"); //if (parameter != null) //{ // reportViewMenuCode = FormatHelper.PKCapitalFormat(FormatHelper.CleanString(parameter.ParameterAlias)); //} //获得报表平台菜单Item DataMenuItem reportViewMenuItem = GetReportViewMenuRoot(reportViewMenuCode, languageComponent, _domainDataProvider); #endregion 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(BuildUltraMenuItemRPTNew(node, languageComponent, reportViewMenuCode, reportViewMenuItem)); } } DataMenuItem item = new DataMenuItem(); item.Text = ""; item.NavigateUrl = "#"; ultraMenu.Items.Add(item); if (_domainDataProvider != null) { ((SQLDomainDataProvider)_domainDataProvider).PersistBroker.CloseConnection(); } }