示例#1
0
文件: UrlPager.cs 项目: lyfb/cms-1
 static DefaultPagingGetter()
 {
     Getter = new CustomPagingGetter(
         "",
         "?page=%d",
         "上一页",
         "下一页"
         );
 }
示例#2
0
文件: UrlPager.cs 项目: lyfb/cms-1
        /// <summary>
        /// 创建分页信息
        /// </summary>
        /// <param name="format"></param>
        /// <param name="currentPageIndex"></param>
        /// <param name="recordCount"></param>
        /// <param name="pageCount"></param>
        /// <param name="firstFormat"></param>
        /// <returns></returns>
        public static string PagerHtml(string firstFormat, string format,
                                       int currentPageIndex, int recordCount, int pageCount)
        {
            IPagingGetter pg = new CustomPagingGetter(
                firstFormat,
                format,
                "&lt;&lt;上一页",
                "&gt;&gt;下一页"
                );


            UrlPager p = NewPager(currentPageIndex, pageCount, pg);

            // p.PreviousPageText = "<<";
            // p.NextPageText = ">>";
            p.EnableInput    = true;
            p.SelectPageText = "跳页";
            p.PagerTotal     = String.Empty;
            p.RecordCount    = recordCount;
            p.PagerTotal     = String.Empty;
            return(p.Pager());
        }