public void AddPageLink(ref Panel div, string aPageUrl, Dictionary <object, object> dicUrlElement) { dicUrlElement.Add("page", 1); if (this._iPageIndex != _FirstPage) { dicUrlElement.Remove("page"); dicUrlElement.Add("page", 1); div.Controls.Add(Add("首页", aPageUrl, dicUrlElement)); dicUrlElement.Remove("page"); dicUrlElement.Add("page", this.iPageIndex - 1); div.Controls.Add(Add("上一页", aPageUrl, dicUrlElement)); } if (this._iPageIndex != this.sPageNum) { dicUrlElement.Remove("page"); dicUrlElement.Add("page", this.iPageIndex + 1); div.Controls.Add(Add("下一页", aPageUrl, dicUrlElement)); dicUrlElement.Remove("page"); dicUrlElement.Add("page", this.sPageNum); div.Controls.Add(Add("末页", aPageUrl, dicUrlElement)); } div.Controls.Add(BaseControls.GetLabelValue(string.Concat("总记录:", this.sRecNum))); div.Controls.Add(BaseControls.GetLabelValue(string.Concat("共", this.sPageNum, "页"))); }
private Label Add(string aPageName, string aPageUrl, Dictionary <object, object> dicUrlElement) { Label oLabel = BaseControls.GetLabelValue("", 50, 20); HyperLink oTmp = BaseControls.GetHyperLink(aPageName, aPageUrl, dicUrlElement); oLabel.Controls.Add(oTmp); return(oLabel); }