Example #1
0
 private void LoadParams()
 {
     pagenum  = WebUtils.ParseInt32FromQueryString("page", pagenum);
     authorID = WebUtils.ParseInt32FromQueryString("id", authorID);
     //xong
     if (authorID > -1)
     {
         book = KLBook.GetPageByAuthorid(pagenum, pageSize, out totalPage, authorID, "").ToList();
     }
 }
Example #2
0
        private void Btnsearch_Click(object sender, EventArgs e)
        {
            grid.PagerStyle.EnableSEOPaging = false;
            bool isApplied     = gridPersister.IsAppliedSortFilterOrGroup;
            int  iCount        = KLBook.GetCount();
            int  startRowIndex = isApplied ? 1 : grid.CurrentPageIndex + 1;
            int  maximumRows   = isApplied ? iCount : grid.PageSize;

            grid.VirtualItemCount  = iCount;
            grid.AllowCustomPaging = !isApplied;
            grid.DataSource        = KLBook.GetPageByAuthorid(startRowIndex, maximumRows, out iCount, author.AuthorID, txtsearch.Text);
        }