Beispiel #1
0
 private void LoadChildStaticPages(TreeNode node)
 {
     foreach (var page in StaticPageService.GetChildStaticPages(SQLDataHelper.GetInt(node.Value), false))
     {
         var newNode = new ButtonTreeNodeStaticPage
         {
             Text         = page.PageName,
             MessageToDel =
                 Server.HtmlEncode(string.Format(
                                       Resource.Admin_MasterPageAdminCatalog_Confirmation, page.PageName)),
             Value    = page.StaticPageId.ToString(CultureInfo.InvariantCulture),
             TreeView = tree
         };
         if (page.HasChildren)
         {
             newNode.Expanded         = false;
             newNode.PopulateOnDemand = true;
             newNode.NavigateUrl      = "StaticPages.aspx?ParentID=" + page.StaticPageId;
         }
         else
         {
             newNode.Expanded         = true;
             newNode.PopulateOnDemand = false;
             newNode.NavigateUrl      = "StaticPage.aspx?PageID=" + page.StaticPageId;
         }
         node.ChildNodes.Add(newNode);
     }
 }
 private void LoadChildStaticPages(TreeNode node)
 {
     foreach (var childNode in
              from page in StaticPageService.GetChildStaticPages(SQLDataHelper.GetInt(node.Value), false)
              where page.StaticPageId != ExceptId && !AnotherExceptIds.Contains(page.StaticPageId)
              select new TreeNode {
         Text = page.PageName, Value = page.StaticPageId.ToString(), PopulateOnDemand = page.HasChildren
     })
     {
         node.ChildNodes.Add(childNode);
     }
 }
Beispiel #3
0
 private void LoadChildStaticPages(TreeNode node)
 {
     foreach (var page in StaticPageService.GetChildStaticPages(Convert.ToInt32(node.Value), false))
     {
         node.ChildNodes.Add(new ButtonTreeNodeStaticPage
         {
             Text         = page.PageName,
             MessageToDel =
                 Server.HtmlEncode(string.Format(
                                       Resource.Admin_MasterPageAdminCatalog_Confirmation, page.PageName)),
             Value            = page.StaticPageId.ToString(),
             TreeView         = tree,
             ShowButtons      = TreeButtonStatus.None,
             Expanded         = !page.HasChildren,
             PopulateOnDemand = page.HasChildren,
             NavigateUrl      = "~/Admin/StaticPage.aspx?PageID=" + page.StaticPageId
         });
     }
 }
Beispiel #4
0
        protected void Page_PreRender(object sender, EventArgs e)
        {
            var pages = StaticPageService.GetChildStaticPages(page.ID, true);

            if (!pages.Any())
            {
                pages = StaticPageService.GetChildStaticPages(page.ParentId, true);
            }

            if (pages.Any())
            {
                lvSubPages.DataSource = pages;
                lvSubPages.DataBind();
                hasSubPages = rightBlock.Visible = true;
            }
            else
            {
                hasSubPages = rightBlock.Visible = false;
            }
        }
Beispiel #5
0
 protected void Page_PreRender(object sender, EventArgs e)
 {
     lvSubPages.DataSource = StaticPageService.GetChildStaticPages(page.ID, true);
     lvSubPages.DataBind();
     hasSubPages = rightBlock.Visible = lvSubPages.Items.Any();
 }