Beispiel #1
0
        public void GetInfo(int PageSize)
        {
            string Param = Context.Request.Params.Get("page");

            PageIndex = string.IsNullOrEmpty(Param) ? 1 : Convert.ToInt32(Param);

            DataSet ds = new DataSet();

            //页大小

            //分页请求数据
            ds = newsBll.GetList(PageSize, PageIndex, null);
            this.NewsRepeater1.DataSource = ds.Tables[0];
            this.NewsRepeater1.DataBind();
            //总数赋值
            Total = Convert.ToInt32(ds.Tables[1].Rows[0][0].ToString());
            //总页数
            pagecount = (Total / PageSize) < 1 ? 1 : (Total % PageSize == 0? Total / PageSize: (Total / PageSize) + 1);

            //GetList(int PageSize, int PageIndex, string strWhere)
        }