示例#1
0
    private void RptBind()
    {
        TPortalClass.JpArticle JpArticle = new TPortalClass.JpArticle();
        DataTable dt = JpArticle.SearchDC(this.txtkssj.Value, this.txtjssj.Value, txtKeywords.Text);

        //this.totalCount = dt.Rows.Count;
        //DataTable tempTable = dt.Clone();
        //for (int i = (this.page - 1) * this.pageSize; i < this.page * this.pageSize; i++)
        //{
        //    if (i > dt.Rows.Count - 1)
        //        break;

        //    DataRow dr = tempTable.NewRow();
        //    for (int j = 0; j < dt.Columns.Count; j++)
        //    {
        //        dr[dt.Columns[j].ColumnName] = dt.Rows[i][j];
        //    }
        //    tempTable.Rows.Add(dr);
        //}
        rptList.DataSource = dt;
        rptList.DataBind();
    }