Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _zoneCurrent    = ZoneUtility.GetZoneCurrent();
            _excludeSpecial = ConvertUtility.ToInt32(SessionUtility.GetValue("excludeid"));

            var source = DistributionDB.GetNewContentByZoneIDNoPage(_zoneCurrent, true, _excludeSpecial);

            if (source.Rows.Count > 0)
            {
                CollectionPager1.DataSource    = source.DefaultView;
                CollectionPager1.BindToControl = rptData;

                if (AppEnv.GetLanguageFrontEnd() == "vi-VN")
                {
                    CollectionPager1.LabelText = "Trang: ";
                }
                else
                {
                    CollectionPager1.LabelText = "Page: ";
                }

                CollectionPager1.BackText              = "<<";
                CollectionPager1.PageNumbersSeparator  = "&nbsp;&nbsp;&nbsp;";
                CollectionPager1.BackNextLinkSeparator = "&nbsp;&nbsp;&nbsp;";

                rptData.DataSource = CollectionPager1.DataSourcePaged;
                rptData.DataBind();
            }
            else
            {
                rptData.Visible = false;
            }
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _zoneCurrent = ZoneUtility.GetZoneCurrent();

            lnkZone.Text        = ZoneDB.GetZoneNameByID(_zoneCurrent);
            lnkZone.NavigateUrl = UrlFilter.BuildUrlByZoneID(_zoneCurrent);

            var source = DistributionDB.GetNewContentByZoneIDNoPage(_zoneCurrent, true, _excludeSpecial);

            if (source.Rows.Count > 0)
            {
                CollectionPager1.DataSource    = source.DefaultView;
                CollectionPager1.BindToControl = rptData;

                if (AppEnv.GetLanguageFrontEnd() == "vi-VN")
                {
                    CollectionPager1.LabelText = "Trang:&nbsp;";
                }
                else
                {
                    CollectionPager1.LabelText = "Page:&nbsp;";
                }

                CollectionPager1.BackText              = "<<";
                CollectionPager1.PageNumbersSeparator  = "&nbsp;&nbsp;&nbsp;";
                CollectionPager1.BackNextLinkSeparator = "&nbsp;&nbsp;&nbsp;";

                rptData.DataSource = CollectionPager1.DataSourcePaged;
                rptData.DataBind();
            }
            else
            {
                rptData.Visible = false;
            }
        }
Exemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _zoneCurrent = ZoneUtility.GetZoneCurrent();

            var source = DistributionDB.GetNewContentByZoneIDNoPage(_zoneCurrent, true, _excludeSpecial);

            if (source.Rows.Count > 0)
            {
                rptData.DataSource = source;
                rptData.DataBind();
            }
            else
            {
                rptData.Visible = false;
            }
        }