Esempio n. 1
0
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);

            if (!IsPostBack)
            {
                string    zoneDeployed   = "|";
                DataTable dtZoneDeployed = DistributionDB.GetZoneDeployed(contentInfo.Content_ID);
                foreach (DataRow row in dtZoneDeployed.Rows)
                {
                    zoneDeployed += row["Distribution_ZoneID"] + "|";
                }

                foreach (ListItem item in lstZones.Items)
                {
                    if (zoneDeployed.IndexOf("|" + item.Value + "|") >= 0)
                    {
                        item.Selected = true;
                    }
                    else
                    {
                        item.Selected = false;
                    }
                }
            }
        }
Esempio n. 2
0
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);

            if (!IsPostBack)
            {
                var isTemp = contentInfo.Content_IsTemp;

                if (!isTemp)
                {
                    trRank.Visible            = false;
                    spanDisableHeader.Visible = false;
                    chkVisible.Checked        = contentInfo.Content_Visible;
                }
                else
                {
                    chkVisible.Checked = true;
                }

                txtName.Text       = contentInfo.Content_Name;
                txtTeaser.Text     = contentInfo.Content_Teaser;
                Editor1.HtmlValue  = contentInfo.Content_Body;
                txtCreateDate.Text = contentInfo.Content_CreateDate.ToString();
                MiscUtility.SetSelected(dropZones.Items, contentInfo.Content_OriginalZoneID.ToString());
                txtAuthor.Text               = contentInfo.Content_Author;
                txtEventDate.Text            = contentInfo.Content_EventDate.ToShortDateString();
                Calendar1.SelectedDate       = ConvertUtility.ToDateTime(contentInfo.Content_EventDate.ToShortDateString());
                txtFriendlyUrl.Text          = contentInfo.Content_FriendlyUrl;
                chkExcludeFromSearch.Checked = contentInfo.Content_ExcludeFromSearch;
                chkIsPhoto.Checked           = contentInfo.Content_IsPhoto;
                chkIsDownload.Checked        = contentInfo.Content_IsDownload;
                chkIsVideo.Checked           = contentInfo.Content_IsVideo;
                chkIsPoll.Checked            = contentInfo.Content_IsPoll;
                chkIsProduct.Checked         = contentInfo.Content_IsProduct;

                string    zoneDeployed   = "|";
                DataTable dtZoneDeployed = DistributionDB.GetZoneDeployed(contentInfo.Content_ID);
                foreach (DataRow row in dtZoneDeployed.Rows)
                {
                    zoneDeployed += row["Distribution_ZoneID"] + "|";
                }

                foreach (ListItem item in lstZones.Items)
                {
                    if (zoneDeployed.IndexOf("|" + item.Value + "|") >= 0)
                    {
                        item.Selected = true;
                    }
                    else
                    {
                        item.Selected = false;
                    }
                }
            }
        }