コード例 #1
0
ファイル: PostTree.ascx.cs プロジェクト: itymofieiev/Kentico9
    /// <summary>
    /// Reload data.
    /// </summary>
    public override void ReloadData()
    {
        if (StopProcessing)
        {
            return;
        }

        mForumPostTreeProvider = null;

        RegularLoad = true;

        // Some post should be preselected => load all posts leading to it in one query
        if (SelectedPost != null)
        {
            MapProvider.SelectPostPath = SelectedPost.PostIDPath;
        }

        if (MapProvider.RootNode != null)
        {
            TreeNode rootNode = CreateNode((ForumPostTreeNode)MapProvider.RootNode, 0);
            // Localize root node
            if (rootNode != null)
            {
                rootNode.Text = ResHelper.LocalizeString(rootNode.Text);
                // Add root node
                treeElem.Nodes.Add(rootNode);
            }
            treeElem.EnableViewState = false;
        }
    }
コード例 #2
0
    /// <summary>
    /// Reload data.
    /// </summary>
    public override void ReloadData()
    {
        if (StopProcessing)
        {
            return;
        }

        mForumPostTreeProvider = null;

        this.RegularLoad = true;

        // Some post should be preselected => load all posts leading to it in one query
        if (this.SelectedPost != null)
        {
            MapProvider.SelectPostPath = this.SelectedPost.PostIDPath;
        }

        if (MapProvider.RootNode != null)
        {
            TreeNode rootNode = CreateNode((ForumPostTreeNode)MapProvider.RootNode, 0);
            // Add root node
            treeElem.Nodes.Add(rootNode);
            treeElem.EnableViewState = false;
        }
    }