Exemplo n.º 1
0
        private void BindGrid()
        {
            using (IDataReader reader = subscriptions.GetPage(letterInfoGuid, pageNumber, pageSize, out totalPages))
            {
                grdSubscribers.DataSource = reader;
                grdSubscribers.PageIndex  = pageNumber;
                grdSubscribers.PageSize   = pageSize;
                grdSubscribers.DataBind();

                string pageUrl = SiteRoot + "/eletter/LetterSubscribers.aspx?l="
                                 + letterInfoGuid.ToString() + "&pagenumber={0}";

                pgrLetterSubscriber.PageURLFormat = pageUrl;
                pgrLetterSubscriber.ShowFirstLast = true;
                pgrLetterSubscriber.CurrentIndex  = pageNumber;
                pgrLetterSubscriber.PageSize      = pageSize;
                pgrLetterSubscriber.PageCount     = totalPages;
                pgrLetterSubscriber.Visible       = (totalPages > 1);
            }
        }