コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                DataSet ds = TintucController.GetTruyenOnlineHomeCache();
                if (ds != null)
                {
                    DataTable dtMoiNhat = ds.Tables[0];
                    DataTable dtHot     = ds.Tables[1];

                    rptTruyenMoi.DataSource = dtMoiNhat;
                    rptTruyenMoi.DataBind();

                    rptTruyenHot.DataSource = dtHot;
                    rptTruyenHot.DataBind();
                }
            }
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                DataSet ds = TintucController.GetTruyenOnlineHomeCache();
                if (ds != null)
                {
                    DataTable dtMoiNhat = ds.Tables[0];

                    IList <DataRow> contentTop    = dtMoiNhat.Select().Skip(0).Take(1).ToList();
                    IList <DataRow> contentBottom = dtMoiNhat.Select().Skip(1).Take(4).ToList();

                    rptTop.DataSource = contentTop.CopyToDataTable();
                    rptTop.DataBind();

                    rptBottom.DataSource = contentBottom.CopyToDataTable();
                    rptBottom.DataBind();
                }
            }
        }