Example #1
0
        private void calcData()
        {
            endPage   = (int)(Math.Ceiling(cri.getPage() / (double)displayPageNum) * displayPageNum);
            startPage = (endPage - displayPageNum) + 1;
            int tendPage = (int)(Math.Ceiling(totalCount / (double)cri.getPerPageNum()));

            if (endPage > tendPage)
            {
                endPage = tendPage;
            }
            prev = startPage == 1 ? false : true;
            next = endPage * cri.getPerPageNum() >= totalCount ? false : true;
        }
        protected void List2(string strSql)
        {
            Connection connection = new Connection();
            DataTable  listTable  = connection.DBConnection_Select(strSql);

            GridView.DataSource = listTable;
            GridView.DataBind();

            시작페이지.Value = startPage;
            종료페이지.Value = endPage;
            현재페이지.Value = Convert.ToString(cri.getPage());
            이전.Value    = prev;
            다음.Value    = next;
        }