Exemplo n.º 1
0
        /// <summary>
        /// 绑定列表
        /// </summary>
        private void BindGridView(int pageIndex)
        {
            T_EFile_BLL bll = new T_EFile_BLL();

            string    strWhere = " FileListID = " + ID + " and FileType = 1 ";
            DataTable dt       = bll.GetListPaging(strWhere, pageSize, pageIndex, out itemCount);;

            AspNetPager.AlwaysShow = true;
            AspNetPager.PageSize   = pageSize;

            AspNetPager.RecordCount = itemCount;

            gvData.DataSource = dt;
            gvData.DataBind();
        }
Exemplo n.º 2
0
        /// <summary>
        /// 绑定列表
        /// </summary>
        private void BindGridView(int pageIndex)
        {
            if (ViewState["CurrentPageIndex"] == null && Common.ConvertEx.ToInt(DNTRequest.GetQueryString("PageIndex")) > 0)
            {
                pageIndex = Common.ConvertEx.ToInt(DNTRequest.GetQueryString("PageIndex"));
                ViewState["CurrentPageIndex"] = pageIndex;
            }
            else
            {
                pageIndex = ConvertEx.ToInt(ViewState["CurrentPageIndex"]);
            }

            string    strWhere = " FileListID = " + FileListID + " and FileType = 0 ";
            DataTable dt       = eFileBLL.GetListPaging(strWhere, pageSize, pageIndex, out itemCount);;

            AspNetPager.AlwaysShow = true;
            AspNetPager.PageSize   = pageSize;

            AspNetPager.RecordCount      = itemCount;
            AspNetPager.CurrentPageIndex = pageIndex;

            rpData.DataSource = dt;
            rpData.DataBind();
        }