コード例 #1
0
ファイル: List_PV.aspx.cs プロジェクト: tungdang130991/MyGit
        private void LoadData_Baidaxuly()
        {
            sOrder = " ORDER BY NgayTao DESC";
            Pager7.PageSize = Global.MembersPerPage;

            DataSet _ds;
            _ds = _daltinbai.Bind_PhienBanDynamic(Pager7.PageIndex, Pager7.PageSize, BuildSQL_Phienban(sOrder));
            int TotalRecords = Convert.ToInt32(_ds.Tables[1].Rows[0].ItemArray[0].ToString());
            int TotalRecord = Convert.ToInt32(_ds.Tables[0].Rows.Count);
            if (TotalRecord == 0)
                _ds = _daltinbai.Bind_PhienBanDynamic(Pager7.PageIndex - 1, Pager7.PageSize, BuildSQL_Phienban(sOrder));
            DataGrid_TinDaXuLy.DataSource = _ds;
            DataGrid_TinDaXuLy.DataBind();

            Pager7.TotalRecords = CurrentPage7.TotalRecords = TotalRecords;
            CurrentPage7.TotalPages = Pager7.CalculateTotalPages();
            CurrentPage7.PageIndex = Pager7.PageIndex;

            Session["PageIndex"] = Pager7.PageIndex;


        }
コード例 #2
0
        private void LoadData_Baidaxuly()
        {
            string sOrder = GetOrderString() == "" ? "" : " ORDER BY " + GetOrderString();

            pages.PageSize = Global.MembersPerPage;
            HPCBusinessLogic.DAL.TinBaiDAL _T_newsDAL = new HPCBusinessLogic.DAL.TinBaiDAL();
            DataSet _ds;

            _ds = _T_newsDAL.Bind_PhienBanDynamic(pages.PageIndex, pages.PageSize, BuildSQL_Phienban(sOrder));
            int TotalRecords = Convert.ToInt32(_ds.Tables[1].Rows[0].ItemArray[0].ToString());
            int TotalRecord  = Convert.ToInt32(_ds.Tables[0].Rows.Count);

            if (TotalRecord == 0)
            {
                _ds = _T_newsDAL.Bind_PhienBanDynamic(pages.PageIndex - 1, pages.PageSize, BuildSQL_Phienban(sOrder));
            }
            DataGrid_Daxuly.DataSource = _ds;
            DataGrid_Daxuly.DataBind();

            pages.TotalRecords     = CurrentPage.TotalRecords = TotalRecords;
            CurrentPage.TotalPages = pages.CalculateTotalPages();
            CurrentPage.PageIndex  = pages.PageIndex;
            GetTotalRecordTinBai();
        }