Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                strPageNo = Request["PageNo"];

                PageNo = Convert.ToInt32(strPageNo);

                if (PageNo == 0)
                {
                    PageNo = 1;
                }

                if (!Page.IsPostBack)
                {
                    //tnMostVisited.ShowLatestTextNews(100);
                }


                Page.Title = " تصاویر خبری  " + " صفحه " + PageNo;
                BOLNews NewsBOL     = new BOLNews();
                int     ResultCount = NewsBOL.GetLatestPicNewsCount();
                rptNewsList.DataSource = NewsBOL.GetLatestPicNews(PageSize, PageNo);
                rptNewsList.DataBind();

                int PageCount = ResultCount / PageSize;
                if (ResultCount % PageSize > 0)
                {
                    PageCount++;
                }
                pgrToolbar.PageNo    = PageNo;
                pgrToolbar.PageCount = PageCount;
                pgrToolbar.ConcatUrl = ConcatUrl;
                pgrToolbar.PageBind();
            }
            catch (Exception err)
            {
                BOLErrorLogs ErrorLogsBOL = new BOLErrorLogs();
                ErrorLogsBOL.Insert(err.Message, DateTime.Now, Request.Url.AbsolutePath, "PicNews::Load");
            }
        }