/// <summary> /// The on update history navigate. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The <see cref="nStuff.UpdateControls.HistoryEventArgs"/> instance containing the event data. /// </param> protected void OnUpdateHistoryNavigate([NotNull] object sender, [NotNull] HistoryEventArgs e) { int pageNumber, pageSize; var pagerData = e.EntryName.Split('|'); if (pagerData.Length < 2 || !int.TryParse(pagerData[0], out pageNumber) || !int.TryParse(pagerData[1], out pageSize) || this.Get <IYafSession>().SearchData == null) { return; } // use existing page... this.Pager.CurrentPageIndex = pageNumber; // and existing page size... this.Pager.PageSize = pageSize; // count... this.Pager.Count = this.Get <IYafSession>().SearchData.AsEnumerable().Count(); // bind existing search this.SearchBindData(false); // use existing search data... this.SearchUpdatePanel.Update(); }
/// <summary> /// The on update history navigate. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The e. /// </param> protected void OnUpdateHistoryNavigate(object sender, HistoryEventArgs e) { int pageNumber, pageSize; string[] pagerData = e.EntryName.Split('|'); if (pagerData.Length >= 2 && int.TryParse(pagerData[0], out pageNumber) && int.TryParse(pagerData[1], out pageSize) && YafContext.Current.Get <YafSession>().SearchData != null) { // use existing page... this.Pager.CurrentPageIndex = pageNumber; // and existing page size... this.Pager.PageSize = pageSize; // count... this.Pager.Count = YafContext.Current.Get <YafSession>().SearchData.AsEnumerable().Count(); // bind existing search this.SearchBindData(false); // use existing search data... this.SearchUpdatePanel.Update(); } }
protected void OnUpdateHistoryNavigate(object sender, HistoryEventArgs e) { int pageNumber, pageSize; string[] pagerData = e.EntryName.Split('|'); if (pagerData.Length >= 2 && int.TryParse(pagerData[0], out pageNumber) && int.TryParse(pagerData[1], out pageSize) && Mession.SearchData != null) { // use existing page... Pager.CurrentPageIndex = pageNumber; // and existing page size... Pager.PageSize = pageSize; // count... Pager.Count = Mession.SearchData.DefaultView.Count; // bind existing search SearchBindData(false); // use existing search data... SearchUpdatePanel.Update(); } }
protected void OnUpdateHistoryNavigate( object sender, HistoryEventArgs e ) { int pageNumber, pageSize; string[] pagerData = e.EntryName.Split( '|' ); if ( pagerData.Length >= 2 && int.TryParse( pagerData[0], out pageNumber ) && int.TryParse( pagerData[1], out pageSize ) && Mession.SearchData != null ) { // use existing page... Pager.CurrentPageIndex = pageNumber; // and existing page size... Pager.PageSize = pageSize; // count... Pager.Count = Mession.SearchData.DefaultView.Count; // bind existing search SearchBindData( false ); // use existing search data... SearchUpdatePanel.Update(); } }