Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BOLMultiMedias MultiMediasBOL = new BOLMultiMedias();

            rptPics.DataSource = MultiMediasBOL.GetLatestByType(1, 5, 3);
            rptPics.DataBind();
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                switch (_hCPicTypeCode)
                {
                case 1:
                    ltrHeader.Text = "چهره روز";
                    break;

                case 2:
                    ltrHeader.Text = "کاریکاتور";
                    break;

                default:
                    break;
                }

                BOLMultiMedias MultiMediasBOL = new BOLMultiMedias();
                MultiMedias    LatestPic      = MultiMediasBOL.GetLatestByType(_hCPicTypeCode);
                if (LatestPic != null)
                {
                    lblPicTitle.Text        = LatestPic.Description;
                    imgPic.ImageUrl         = "~/" + LatestPic.PicFile;
                    hplLargePic.NavigateUrl = LatestPic.LargePicFile;
                }
            }
            catch (Exception err)
            {
            }
        }
Пример #3
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)
            {
                BOLMultiMedias MultiMediasBOL = new BOLMultiMedias();
                rptItems.DataSource = MultiMediasBOL.GetLatestByType(PageNo, PageSize, 4);
                rptItems.DataBind();

                int ResultCount = MultiMediasBOL.GetLatestByTypeCount(4);
                int PageCount   = (int)ResultCount / PageSize;
                if (ResultCount % PageSize > 0)
                {
                    PageCount++;
                }

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