Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _zoneCurrent = ZoneUtility.GetZoneCurrent();

            //lnkZone.Text = ZoneDB.GetZoneNameByID(zoneCurrent);
            //lnkZone.NavigateUrl = ZoneUtility.BuildUrlByZoneCurrent(zoneCurrent);

            DataTable dtSpecial = DistributionDB.GetContentByZoneIDAndRank(_zoneCurrent, 1, (int)AppEnv.CMSContentRank.Special);

            if (dtSpecial.Rows.Count > 0)
            {
                int contentID = Convert.ToInt32(dtSpecial.Rows[0]["Content_ID"]);
                //litName.Text = dtSpecial.Rows[0]["Content_Name"].ToString();
                litContent.Text = ContentDB.GetInfo(contentID).Content_Body;
            }
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            const string boxtname = "homebottomright";
            var          zoneid   = ConvertUtility.ToInt32(ZoneDB.GetIDByFriendlyUrl(boxtname));

            if (zoneid <= 0)
            {
                return;
            }
            var info = ZoneDB.GetInfo(zoneid);

            if (info == null)
            {
                return;
            }

            var realUrl = (info.Zone_RealUrl);

            if (realUrl.Length > 0)
            {
                lnkOther.NavigateUrl = realUrl;
            }
            else
            {
                lnkOther.NavigateUrl = UrlFilter.BuildUrlByZoneID(info.Zone_ParentID);
            }

            var dtSpecial = DistributionDB.GetContentByZoneIDAndRank(zoneid, 1, (int)AppEnv.CMSContentRank.Special);

            if (dtSpecial.Rows.Count > 0)
            {
                rptSpecial.DataSource = dtSpecial;
                rptSpecial.DataBind();
            }

            var dtData = DistributionDB.GetContentByZoneIDAndRank(zoneid, 3, (int)AppEnv.CMSContentRank.Default);

            if (dtData.Rows.Count <= 0)
            {
                return;
            }

            rptData.DataSource = dtData;
            rptData.DataBind();
        }