Ejemplo n.º 1
0
        /// <summary>
        /// 创建分页信息
        /// </summary>
        /// <param name="pageSize"></param>
        /// <param name="currentPageIndex"></param>
        /// <param name="recordCount"></param>
        /// <param name="pageCount"></param>
        /// <returns></returns>
        public static string BuildPagerInfo(string format, ref int currentPageIndex, int recordCount, int pageCount)
        {
            StringBuilder sb = new StringBuilder();

            if (currentPageIndex < 1)
            {
                currentPageIndex = 1;
            }
            if (currentPageIndex > pageCount)
            {
                currentPageIndex = pageCount;
            }
            PagedLinkBuilder p = new PagedLinkBuilder(currentPageIndex, pageCount);

            // p.PreviousPageText = "<<";
            // p.NextPageText = ">>";
            p.Style               = PageLinkStyle.Custom;
            p.PreviousPageText    = "&lt;&lt;上一页";
            p.NextPageText        = "&gt;&gt;下一页";
            p.EnableInput         = true;
            p.InputButtonText     = "跳页";
            p.FirstPageLinkFormat = format;
            p.DisplayInfo         = true;
            p.RecordCount         = recordCount;

            p.LinkFormat = format;

            return(p.ToString());
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 创建分页信息
 /// </summary>
 public static string BuildPagerInfo(PagedLinkBuilder builder, string format, int currentPageIndex, int recordCount, int pageCount)
 {
     builder.FirstPageLinkFormat = format;
     builder.LinkFormat          = format;
     builder.CurrentPageIndex    = currentPageIndex;
     builder.RecordCount         = recordCount;
     builder.PageCount           = pageCount;
     return(builder.ToString());
 }
Ejemplo n.º 3
0
        /// <summary>
        /// 创建分页信息
        /// </summary>
        public static string BuildPagerInfo(string format, int currentPageIndex, int recordCount, int pageCount)
        {
            StringBuilder sb = new StringBuilder();

            PagedLinkBuilder p = new PagedLinkBuilder(currentPageIndex, pageCount);

            p.RecordCount = recordCount;
            p.Style       = PageLinkStyle.Default;

            p.PreviousPageText = "&lt;&lt;上一页";
            p.NextPageText     = "&gt;&gt;下一页";
            p.InputButtonText  = "跳页";

            p.FirstPageLinkFormat = format;
            p.LinkFormat          = format;
            p.EnableInput         = true;
            p.DisplayInfo         = true;

            return(p.ToString());
        }
Ejemplo n.º 4
0
 /// <summary>
 /// 创建分页信息
 /// </summary>
 public static string BuildPagerInfo(PagedLinkBuilder builder,string format,int currentPageIndex, int recordCount, int pageCount)
 {
     builder.FirstPageLinkFormat = format;
     builder.LinkFormat = format;
     builder.CurrentPageIndex = currentPageIndex;
     builder.RecordCount = recordCount;
     builder.PageCount = pageCount;
     return builder.ToString();
 }
Ejemplo n.º 5
0
        /// <summary>
        /// 创建分页信息
        /// </summary>
        public static string BuildPagerInfo(string format, int currentPageIndex, int recordCount, int pageCount)
        {
            StringBuilder sb = new StringBuilder();

            PagedLinkBuilder p = new PagedLinkBuilder(currentPageIndex, pageCount);
            p.RecordCount = recordCount;
            p.Style = PageLinkStyle.Default;

            p.PreviousPageText = "&lt;&lt;上一页";
            p.NextPageText = "&gt;&gt;下一页";
            p.InputButtonText = "跳页";

            p.FirstPageLinkFormat =format;
            p.LinkFormat = format;
            p.EnableInput = true;
            p.DisplayInfo = true;

            return p.ToString();
        }