object GetData(int toSkip, int toTake) { switch (_data) { case "BrunvollView": { var temp = new NavigationRepository(db); object ab = temp.GetBrunvollViewData(c1Filter.filterString, toSkip, toTake); _recordCount = temp.RecordCount; return(ab); } case "Projekt": { var temp = new NavigationRepository(db); object ab = temp.GetProjektData(c1Filter.filterString, toSkip, toTake); _recordCount = temp.RecordCount; return(ab); } case "ProjektAnlagentyp": { var temp = new NavigationRepository(db); object ab = temp.GetProjektAnlagentypData(c1Filter.filterString, toSkip, toTake); _recordCount = temp.RecordCount; return(ab); } default: return(null); } }
void MyPager_eventPageChanged(object sender, PageControl.PageChangedEventArgs e) { var temp = new NavigationRepository(db); var ab = temp.GetBrunvollViewData(c1Filter.filterString, e.toSkip, e.toTake); ProjekteViewSource.Source = ab; ProjekteView = (ListCollectionView)ProjekteViewSource.View; }
private void btnFilter_Click(object sender, RoutedEventArgs e) { int rpp; c1Filter.ResetFilter(this.testListView, (bool)this.chkIncludePlatzhalter.IsChecked); var temp = new NavigationRepository(db); if (cboRecordsPerPage.Text == "alle") { rpp = temp.RecordCount; } else { rpp = int.Parse(cboRecordsPerPage.Text); } var ab = temp.GetBrunvollViewData(c1Filter.filterString, 0, rpp); ProjekteViewSource.Source = ab; ProjekteView = (ListCollectionView)ProjekteViewSource.View; this.MyPager.Reset(1, rpp, temp.RecordCount); }