private void BindData() { YMC.BLL.Persons persons = new YMC.BLL.Persons (); persons.LoadAll(); persons.Filter = "IsNationalCommitte <> 1 Or IsNationalCommitte is Null"; PagedDataSource pds = new PagedDataSource(); pds.DataSource = persons.DefaultView; pds.AllowPaging = true; pds.PageSize = 10; pds.CurrentPageIndex = currentPage; uiDataListPersons.DataSource = pds; uiDataListPersons.DataBind(); uiLinkButtonPrev.Enabled = true; uiLinkButtonNext.Enabled = true; if (currentPage == 0) { uiLinkButtonPrev.Enabled = false; } if (currentPage == (pds.PageCount - 1)) { uiLinkButtonNext.Enabled = false; } }
private void BindData() { YMC.BLL.Persons objData = new YMC.BLL.Persons(); objData.LoadAll(); objData.Filter = "IsNationalCommitte <> 1 Or IsNationalCommitte is Null"; uiGridViewPersons.DataSource = objData.DefaultView; uiGridViewPersons.DataBind(); }