Пример #1
0
        private void LoadData_Bitralai()
        {
            sOrder = GetOrderString() == "" ? "" : " ORDER BY " + GetOrderString();
            Pager7.PageSize = Global.MembersPerPage;

            DataSet _ds;
            _ds = _daltinbai.BindGridT_NewsEditor(Pager7.PageIndex, Pager7.PageSize, BuildSQL(3, 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.BindGridT_NewsEditor(Pager7.PageIndex - 1, Pager7.PageSize, BuildSQL(3, sOrder));
            DataGrid_TinTraLai.DataSource = _ds;
            DataGrid_TinTraLai.DataBind();

            Pager7.TotalRecords = CurrentPage7.TotalRecords = TotalRecords;
            CurrentPage7.TotalPages = Pager7.CalculateTotalPages();
            CurrentPage7.PageIndex = Pager7.PageIndex;
            Session["PageIndex"] = Pager7.PageIndex;


        }
Пример #2
0
        private void LoadData_DangXuly()
        {
            sOrder = GetOrderString() == "" ? "" : " ORDER BY " + GetOrderString();
            Pager7.PageSize = Global.MembersPerPage;
            HPCBusinessLogic.DAL.TinBaiDAL _T_newsDAL = new HPCBusinessLogic.DAL.TinBaiDAL();
            DataSet _ds;
            _ds = _T_newsDAL.BindGridT_NewsEditor(Pager7.PageIndex, Pager7.PageSize, BuildSQL(2, 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.BindGridT_NewsEditor(Pager7.PageIndex - 1, Pager7.PageSize, BuildSQL(2, sOrder));
            DataGrid_Dangxuly.DataSource = _ds;
            DataGrid_Dangxuly.DataBind();


            Pager7.TotalRecords = CurrentPage7.TotalRecords = TotalRecords;
            CurrentPage7.TotalPages = Pager7.CalculateTotalPages();
            CurrentPage7.PageIndex = Pager7.PageIndex;
            Session["PageIndex"] = Pager7.PageIndex;

        }
Пример #3
0
        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;


        }