예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BOLGalleries BOLGalleries = new BOLGalleries();

            rptGalleries.DataSource = BOLGalleries.GetGalleries(5);
            rptGalleries.DataBind();
        }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string strPageNo = Request["PageNo"];

            Int32.TryParse(strPageNo, out PageNo);
            if (PageNo == 0)
            {
                PageNo = 1;
            }

            if (!Page.IsPostBack)
            {
                BOLGalleries GalleriesBOL = new BOLGalleries();
                rptGalleries.DataSource = GalleriesBOL.GetGalleries(PageNo, PageSize);
                rptGalleries.DataBind();

                int ResultCount = GalleriesBOL.GetGalleriesCount();
                int PageCount   = (int)ResultCount / PageSize;
                if (ResultCount % PageSize > 0)
                {
                    PageCount++;
                }

                ConcatUrl           += "";
                pgrToolbar.PageNo    = PageNo;
                pgrToolbar.PageCount = PageCount;
                pgrToolbar.ConcatUrl = ConcatUrl;
                pgrToolbar.PageBind();
            }
        }