Example #1
0
 /// <summary>
 /// 输出页码块
 /// </summary>
 /// <param name="no">页码</param>
 /// <param name="writer">writer</param>
 private void RenderPageNoBlock(int no, HtmlTextWriter writer)
 {
     PagerItem item = new PagerItem();
     item.Text = no.ToString();
     if (no == this.CurrentPageIndex)
     {
         item.ClassName = "linknow";
     }
     else
     {
         item.Href = GetHref(no, UrlRewritePattern);
     }
     item.AppendTo(writer);
 }
Example #2
0
 private void RenderPrevPageBlock(HtmlTextWriter writer)
 {
     bool gltOne = CurrentPageIndex > 1;
     PagerItem item = new PagerItem();
     if (gltOne) item.Href = GetHref(CurrentPageIndex - 1, UrlRewritePattern);
     item.ClassName = gltOne ? "preview_on" : "preview_off";
     item.Tag = gltOne ? HtmlTextWriterTag.A : HtmlTextWriterTag.Span;
     item.Text = "上一页";
     item.AppendTo(writer);
 }
Example #3
0
 private void RenderNextPageBlock(HtmlTextWriter writer)
 {
     bool isEnd = this.CurrentPageIndex >= this.PageCount;
     PagerItem item = new PagerItem();
     item.Text = "下一页";
     if (isEnd)
     {
         item.ClassName = "next_off";
         item.Tag = HtmlTextWriterTag.Span;
     }
     else
     {
         item.ClassName = "next_on";
         item.Tag = HtmlTextWriterTag.A;
         item.Href = GetHref(CurrentPageIndex + 1, UrlRewritePattern);
     }
     item.AppendTo(writer);
 }