Exemplo n.º 1
0
    /// <summary>
    /// 加载文章 的所有评论,并绑定到Repeater_Comment控件上
    /// </summary>
    /// <param name="articleID"></param>
    private void LoadComment(int articleID)
    {
        DBHelper mdb = new DBHelper();

        mdb.Connect();
        Repeater_Comment.DataSource = CommentData.GetAllCommentByArticleID(articleID, mdb.GetConn);
        Repeater_Comment.DataBind();
        int Floor = CommentData.GetFloorByArticleId(articleID, mdb.GetConn);

        if (Floor > 0 && !IsPostBack)
        {
            LoadFloorList(Floor); // 加载可回复的楼层
            LMsg2.Visible = false;
        }
        else
        {
            LMsg2.Visible = true;
        }
        mdb.Disconnect();
    }