Ejemplo n.º 1
0
    private void RenderMenu(string parentID, SystemMenuList menuList, TreeNode item, List <string> selected_list)
    {
        SystemMenuList subMenuList = menuList.Filter(parentID);

        subMenuList.SortByDisplayOrder();

        foreach (IMenuItem menu in subMenuList)
        {
            TreeNode subItem = new TreeNode(menu.MenuName, menu.Url);
            subItem.CssClass     = "SubMenu";
            subItem.MouseOverCss = "SubMenuOver";
            subItem.SelectedCss  = "SubMenuOver";
            BasePage base_page = this.Page as BasePage;
            subItem.Selected = selected_list.Contains(menu.MenuId);
            item.Nodes.Add(subItem);
            RenderMenu(menu.MenuId, menuList, subItem, selected_list);
        }
    }
Ejemplo n.º 2
0
    private void RenderMenu(string parentID, SystemMenuList menuList, TreeView menuLeft, List <string> selected_list)
    {
        SystemMenuList subMenuList = menuList.Filter(parentID);

        subMenuList.SortByDisplayOrder();
        foreach (IMenuItem menu in subMenuList)
        {
            TreeNode item = new TreeNode(menu.MenuName, menu.Url);
            item.CssClass     = "MenuLeftCss";
            item.MouseOverCss = "MenuLeftMouseOverCss";
            item.SelectedCss  = "MenuLeftMouseOverCss";
            item.Selected     = selected_list.Contains(menu.MenuId);
            if (string.IsNullOrEmpty(menu.Url))
            {
                item.NodeType = NodeType.Text;
            }
            menuLeft.Nodes.Add(item);
            RenderMenu(menu.MenuId, menuList, item, selected_list);
        }
    }