protected void OnPageSwitch(object sender, PageSwitchEventArgs e) { if (this.PageSwitch != null) { this.PageSwitch(sender, e); } }
void link_Click(object sender, EventArgs e) { PageSwitchEventArgs e1 = new PageSwitchEventArgs(); string[] numbers = this.PageNoList.Split(new char[] { ',' }); LinkButton link = (LinkButton)sender; if (link.ID == "first") { e1.GotoPageNo = 0; } else if (link.ID == "prev") { e1.GotoPageNo = Math.Max(Convert.ToInt32(numbers[0]), 0); } else if (link.ID == "next") { e1.GotoPageNo = Math.Max(Convert.ToInt32(numbers[1]), 0); } else { int index = Convert.ToInt32(link.Text); // 这是CreateChildControls时的数字,从0计数 if (index >= numbers.Length) { } e1.GotoPageNo = Convert.ToInt32(numbers[index + 2]); } e1.TotalCount = this.TotalCount; OnPageSwitch(this, e1); }
void pager_PageSwitch(object sender, PageSwitchEventArgs e) { this.StartIndex = this.PageMaxLines * e.GotoPageNo; if (this.StartIndex >= this.ResultCount) { lastpage_Click(sender, e); } this.ClearAllChecked(); }
void pager_PageSwitch(object sender, PageSwitchEventArgs e) { /* if (String.IsNullOrEmpty(this.EditLineNumbers) == false) { // TODO: 需要先结束这个 this.EditLineNumbers = ""; this.EditAction = ""; this.ClearEdit(); }*/ this.ClearEdit(); this.FocusRecPath = ""; this.StartIndex = this.PageMaxLines * e.GotoPageNo; if (this.StartIndex >= this.ResultCount) { lastpage_Click(sender, e); } }
void link_Click(object sender, EventArgs e) { PageSwitchEventArgs e1 = new PageSwitchEventArgs(); string[] numbers = this.PageNoList.Split(new char[] { ',' }); LinkButton link = (LinkButton)sender; if (link.ID == "first") e1.GotoPageNo = 0; else if (link.ID == "prev") e1.GotoPageNo = Math.Max(Convert.ToInt32(numbers[0]), 0); else if (link.ID == "next") e1.GotoPageNo = Math.Max(Convert.ToInt32(numbers[1]), 0); else { int index = Convert.ToInt32(link.Text); // 这是CreateChildControls时的数字,从0计数 if (index >= numbers.Length) { } e1.GotoPageNo = Convert.ToInt32(numbers[index + 2]); } e1.TotalCount = this.TotalCount; OnPageSwitch(this, e1); }
void pager_PageSwitch(object sender, PageSwitchEventArgs e) { this.StartIndex = this.PageMaxLines * e.GotoPageNo; if (this.StartIndex >= this.ResultCount) { lastpage_Click(sender, e); } SelectAll(false); ResetAllItemsControlPager(); }
void pager_PageSwitch(object sender, PageSwitchEventArgs e) { this.StartIndex = this.PageMaxLines * e.GotoPageNo; if (this.StartIndex >= this.ResultCount) { lastpage_Click(sender, e); } }