private void BindData() { Envelops envelops = new Envelops(); envelops.LoadAll(); PagedDataSource pds = new PagedDataSource(); pds.DataSource = envelops.DefaultView; pds.AllowPaging = true; pds.PageSize = 12; pds.CurrentPageIndex = currentPage; uiRepeaterEnvelops.DataSource = pds; uiRepeaterEnvelops.DataBind(); uiLinkButtonPrev.Enabled = true; uiLinkButtonNext.Enabled = true; if (currentPage == 0) { uiLinkButtonPrev.Enabled = false; } if (currentPage == (pds.PageCount - 1)) { uiLinkButtonNext.Enabled = false; } }
private void BindCats() { Envelops env = new Envelops(); env.LoadAll(); uiGridViewEnvelops.DataSource = env.DefaultView; uiGridViewEnvelops.DataBind(); }