private void LoadTopicsForSelectedGroup(long groupId) { try { EZDiscuss.Classes.Topic topic = new Classes.Topic(); DataTable dt = topic.TopicsRetrieveByGroupId(groupId); if (dt.Rows.Count > 0) { rTopics.DataSource = dt; rTopics.DataBind(); lTopics.Text = "List of Topics for selected Group:"; ActivateControls(true); } else { rTopics.DataSource = null; rTopics.DataBind(); lTopics.Text = "There is no Topic for this Group yet."; ActivateCreateTopicControls(true); } } catch (Exception ex) { if (Session["memberId"] != null) { EZDiscuss.Classes.Helper.LogError("DiscussionBoard.aspx", "LoadTopicsForSelectedGroup", ex.Message, (long)Session["memberId"]); } else { EZDiscuss.Classes.Helper.LogError("DiscussionBoard.aspx", "LoadTopicsForSelectedGroup", ex.Message, 0); } } }
private void CheckTopics(long groupId) { try { if (groupId > 0) { EZDiscuss.Classes.Topic topics = new Classes.Topic(); DataTable dt = new DataTable(); dt = topics.TopicsRetrieveByGroupId(groupId); if (dt.Rows.Count > 0) { rTopics.DataSource = dt; rTopics.DataBind(); } } } catch (Exception ex) { if (Session["memberId"] != null) { EZDiscuss.Classes.Helper.LogError("DiscussionBoard.aspx", "CheckTopics", ex.Message, (long)Session["memberId"]); } else { EZDiscuss.Classes.Helper.LogError("DiscussionBoard.aspx", "CheckTopics", ex.Message, 0); } } }