示例#1
0
    private void ExploreMessages(IEnumerable <Message> messages, string filterParent, int level)
    {
        foreach (Message msg in messages)
        {
            if (string.Equals(msg.IdParentMessage, filterParent, StringComparison.InvariantCultureIgnoreCase))
            {
                Communication_ViewMessage ctlMessage = (Communication_ViewMessage)LoadControl("~/Communication/Forum/ViewMessage.ascx");
                ctlMessage.SetMessage(msg);
                ctlMessage.SetIndentLevel(level);

                Controls.Add(ctlMessage);

                ExploreMessages(messages, msg.Id, level + 1);
            }
        }
    }
示例#2
0
    private void ExploreMessages(BusiBlocks.CommsBlock.Forums.Category forum, BusiBlocks.CommsBlock.Forums.Topic topic,
                                 IList <BusiBlocks.CommsBlock.Forums.Message> messages, string filterParent, int level)
    {
        foreach (BusiBlocks.CommsBlock.Forums.Message msg in messages)
        {
            if (string.Equals(msg.IdParentMessage, filterParent, StringComparison.InvariantCultureIgnoreCase))
            {
                Communication_ViewMessage ctlMessage = (Communication_ViewMessage)LoadControl("~/Communication/Forum/ViewMessage.ascx");
                ctlMessage.SetMessage(msg);
                ctlMessage.SetIndentLevel(level);

                Controls.Add(ctlMessage);

                ExploreMessages(forum, topic, messages, msg.Id, level + 1);
            }
        }
    }