public void InitData(int page = 1) { dataPager1.PageIndex = page; PagingInfo pi = new PagingInfo() { PageIndex = page, PageSize = dataPager1.PageSize, Conditions = " r.house_id = " + MainWindow.HouseId }; truckList = x_tService.GetByPage(pi); dataPager1.TotalCount = pi.RecordCount; this.dataGrid1.ItemsSource = truckList; }