Example #1
0
 public static void ChangeParent(string idChild, string idParent)
 {
     PSCPortal.CMS.Menu child  = (PSCPortal.CMS.Menu)MenuList.Search(t => ((PSCPortal.CMS.Menu)t).Id == new Guid(idChild));
     PSCPortal.CMS.Menu parent = (PSCPortal.CMS.Menu)MenuList.Search(t => ((PSCPortal.CMS.Menu)t).Id == new Guid(idParent));
     child.Parent = parent;
     child.Update();
     MenuList.UpdatePostionChilds(parent);
 }
Example #2
0
        protected SiteMapNode GetSiteNodeFromMenu(PSCPortal.CMS.Menu menu)
        {
            SiteMapNode siteNode = new SiteMapNode();

            siteNode.Id            = menu.Id;
            siteNode.Name          = menu.Name;
            siteNode.NavigationUrl = menu.NavigationURL;
            siteNode.Children      = new List <SiteMapNode>();
            if (menu.HasChildren)
            {
                var children = menu.GetChildren();
                foreach (PSCPortal.Framework.Core.BusinessObjectHierarchical mc in children)
                {
                    siteNode.Children.Add(GetSiteNodeFromMenu((PSCPortal.CMS.Menu)mc.Item));
                }
            }
            return(siteNode);
        }
Example #3
0
 public static void MenuNew()
 {
     PSCPortal.CMS.Menu item = new PSCPortal.CMS.Menu();
     item.Id             = Guid.NewGuid();
     PSCDialog.DataShare = new MenuArgs(item, false);
 }