using System;
using System.Data;
using System.Collections;
using System.Web;
using System.Web.UI;
using BoyunBase;
using SiteCore;

public partial class Part_CommentList : System.Web.UI.UserControl
{
    private string ArticleId = "";

    protected void Page_Load( object sender, EventArgs e )
    {
        try {
            ArticleId = Todo.Get( "aid", Request );
            if( ArticleId == "" ) return;

            ContentAccess ca = new ContentAccess( this, "TableName" );
            DataTable dt = ca.Read( "[@ArticleId=" + ArticleId + "]", "name" );
            if( dt == null || dt.Rows.Count < 1 ) {
                lbMassage.Visible = true; Todo.DebugOut( "Part_CommentList 没有读取到数据" );
                return;
            }
            lbMassage.Visible = false;

            rptComList.DataSource = dt;
            rptComList.DataBind();

        } catch( Exception ex ) {
            Todo.DebugOut( "加载 Part_CommentList 出现异常：" + ex.Message );
        }
    }
}
