Beispiel #1
0
        void BindList()
        {
            PagedDataSource objPage = new PagedDataSource();

            try
            {
                objPage.DataSource       = aBUS.SPSale().DefaultView;
                objPage.AllowPaging      = true;
                objPage.PageSize         = 20;
                objPage.CurrentPageIndex = CurrentPage;
                btnSau.Enabled           = !objPage.IsLastPage;
                btnTruoc.Enabled         = !objPage.IsFirstPage;
                DataList1.DataSource     = objPage;
                DataList1.DataBind();
                // TotalRecord = dts.Tables[0].Rows.Count;
            }
            catch (Exception)
            {
            }
            finally
            {
                objPage = null;
            }
        }