/// <summary> /// Resets this instance. /// </summary> public override void Reset() { IsLoaded = false; SelectedDataSet = DataSetsCollectionView.FirstOrDefault(); SelectedProperty = PropertyFilters.FirstOrDefault(); PropertyFilterText = string.Empty; IsLoaded = true; GetPage(); if (CollectionItems.Count > 0) { CollectionItems.MoveCurrentToFirst(); } }
/// <summary> /// Executes the load. /// </summary> /// <param name="session">The session.</param> protected override void ExecLoad(ISession session) { TotalCount = 0; CurrentPage = 0; PageSize = INITIAL_LOAD_COUNT; var statesList = ConfigurationService.HospitalRegion.DefaultStates.OfType <string>().ToList(); ListExtensions.ForEach(statesList, x => TotalCount += session.Query <db.Physician>().Count(GetWhereClause(x))); Fetch(session, statesList); CollectionItems.MoveCurrentToFirst(); IsLastItemFetched = PageSize * CurrentPage >= TotalCount - INITIAL_LOAD_COUNT; PageSize = 5; }
protected override void ExecLoad(ISession session) { Fetch(session); CollectionItems.MoveCurrentToFirst(); }