public override void Submit_OnClick(object sender, EventArgs e)
        {
            var isSuccess = false;

            try
            {
                _channelInfo.Additional.TransType         = ECrossSiteTransTypeUtils.GetEnumType(DdlTransType.SelectedValue);
                _channelInfo.Additional.TransSiteId       = _channelInfo.Additional.TransType == ECrossSiteTransType.SpecifiedSite ? TranslateUtils.ToInt(DdlSiteId.SelectedValue) : 0;
                _channelInfo.Additional.TransChannelIds   = ControlUtils.GetSelectedListControlValueCollection(LbChannelId);
                _channelInfo.Additional.TransChannelNames = TbNodeNames.Text;

                _channelInfo.Additional.TransIsAutomatic = TranslateUtils.ToBool(DdlIsAutomatic.SelectedValue);

                var translateDoneType = ETranslateContentTypeUtils.GetEnumType(DdlTranslateDoneType.SelectedValue);
                _channelInfo.Additional.TransDoneType = translateDoneType;

                DataProvider.ChannelDao.Update(_channelInfo);

                Body.AddSiteLog(SiteId, "修改跨站转发设置");

                isSuccess = true;
            }
            catch (Exception ex)
            {
                FailMessage(ex, ex.Message);
            }

            if (isSuccess)
            {
                LayerUtils.CloseAndRedirect(Page, PageConfigurationCrossSiteTrans.GetRedirectUrl(SiteId, _channelInfo.Id));
            }
        }
        public override void Submit_OnClick(object sender, EventArgs e)
        {
            var isSuccess = false;

            try
            {
                nodeInfo.Additional.TransType = ECrossSiteTransTypeUtils.GetEnumType(TransType.SelectedValue);
                if (nodeInfo.Additional.TransType == ECrossSiteTransType.SpecifiedSite)
                {
                    nodeInfo.Additional.TransPublishmentSystemID = TranslateUtils.ToInt(PublishmentSystemIDCollection.SelectedValue);
                }
                else
                {
                    nodeInfo.Additional.TransPublishmentSystemID = 0;
                }
                nodeInfo.Additional.TransNodeIDs   = ControlUtils.GetSelectedListControlValueCollection(NodeIDCollection);
                nodeInfo.Additional.TransNodeNames = NodeNames.Text;

                nodeInfo.Additional.TransIsAutomatic = TranslateUtils.ToBool(IsAutomatic.SelectedValue);


                var translateDoneType = ETranslateContentTypeUtils.GetEnumType(ddlTranslateDoneType.SelectedValue);
                nodeInfo.Additional.TransDoneType = translateDoneType;

                DataProvider.NodeDao.UpdateNodeInfo(nodeInfo);

                Body.AddSiteLog(PublishmentSystemId, "修改跨站转发设置");

                isSuccess = true;
            }
            catch (Exception ex)
            {
                FailMessage(ex, ex.Message);
            }

            if (isSuccess)
            {
                PageUtils.CloseModalPageAndRedirect(Page, PageConfigurationCrossSiteTrans.GetRedirectUrl(PublishmentSystemId, nodeInfo.NodeId));
            }
        }
        protected void DdlTransType_OnSelectedIndexChanged(object sender, EventArgs e)
        {
            DdlSiteId.Items.Clear();
            DdlSiteId.Enabled = true;

            PhIsAutomatic.Visible = false;

            var contributeType = ECrossSiteTransTypeUtils.GetEnumType(DdlTransType.SelectedValue);

            if (contributeType == ECrossSiteTransType.None)
            {
                PhSite.Visible = PhNodeNames.Visible = false;
            }
            else if (contributeType == ECrossSiteTransType.SelfSite || contributeType == ECrossSiteTransType.SpecifiedSite)
            {
                PhSite.Visible      = true;
                PhNodeNames.Visible = false;

                PhIsAutomatic.Visible = true;
            }
            else if (contributeType == ECrossSiteTransType.ParentSite)
            {
                PhSite.Visible      = true;
                PhNodeNames.Visible = false;
                DdlSiteId.Enabled   = false;

                PhIsAutomatic.Visible = true;
            }
            else if (contributeType == ECrossSiteTransType.AllParentSite || contributeType == ECrossSiteTransType.AllSite)
            {
                PhSite.Visible      = false;
                PhNodeNames.Visible = true;
            }

            if (PhSite.Visible)
            {
                var siteIdList = SiteManager.GetSiteIdList();

                var allParentSiteIdList = new List <int>();
                if (contributeType == ECrossSiteTransType.AllParentSite)
                {
                    SiteManager.GetAllParentSiteIdList(allParentSiteIdList, siteIdList, SiteId);
                }
                else if (contributeType == ECrossSiteTransType.SelfSite)
                {
                    siteIdList = new List <int>
                    {
                        SiteId
                    };
                }

                foreach (var psId in siteIdList)
                {
                    var psInfo = SiteManager.GetSiteInfo(psId);
                    var show   = false;
                    if (contributeType == ECrossSiteTransType.SpecifiedSite)
                    {
                        show = true;
                    }
                    else if (contributeType == ECrossSiteTransType.SelfSite)
                    {
                        if (psId == SiteId)
                        {
                            show = true;
                        }
                    }
                    else if (contributeType == ECrossSiteTransType.ParentSite)
                    {
                        if (psInfo.Id == SiteInfo.ParentId || (SiteInfo.ParentId == 0 && psInfo.IsRoot))
                        {
                            show = true;
                        }
                    }
                    if (!show)
                    {
                        continue;
                    }

                    var listitem = new ListItem(psInfo.SiteName, psId.ToString());
                    if (psInfo.IsRoot)
                    {
                        listitem.Selected = true;
                    }
                    DdlSiteId.Items.Add(listitem);
                }
            }
            DdlSiteId_OnSelectedIndexChanged(sender, e);
        }
        protected void TransType_OnSelectedIndexChanged(object sender, EventArgs e)
        {
            PublishmentSystemIDCollection.Items.Clear();
            PublishmentSystemIDCollection.Enabled = true;

            PlaceHolder_IsAutomatic.Visible = false;

            var contributeType = ECrossSiteTransTypeUtils.GetEnumType(TransType.SelectedValue);

            if (contributeType == ECrossSiteTransType.None)
            {
                PlaceHolder_PublishmentSystem.Visible = PlaceHolder_NodeNames.Visible = false;
            }
            else if (contributeType == ECrossSiteTransType.SelfSite || contributeType == ECrossSiteTransType.SpecifiedSite)
            {
                PlaceHolder_PublishmentSystem.Visible = true;
                PlaceHolder_NodeNames.Visible         = false;

                PlaceHolder_IsAutomatic.Visible = true;
            }
            else if (contributeType == ECrossSiteTransType.ParentSite)
            {
                PlaceHolder_PublishmentSystem.Visible = true;
                PlaceHolder_NodeNames.Visible         = false;
                PublishmentSystemIDCollection.Enabled = false;

                PlaceHolder_IsAutomatic.Visible = true;
            }
            else if (contributeType == ECrossSiteTransType.AllParentSite || contributeType == ECrossSiteTransType.AllSite)
            {
                PlaceHolder_PublishmentSystem.Visible = false;
                PlaceHolder_NodeNames.Visible         = true;
            }

            if (PlaceHolder_PublishmentSystem.Visible)
            {
                var publishmentSystemIDArrayList = PublishmentSystemManager.GetPublishmentSystemIdList();

                var allParentPublishmentSystemIDArrayList = new List <int>();
                if (contributeType == ECrossSiteTransType.AllParentSite)
                {
                    PublishmentSystemManager.GetAllParentPublishmentSystemIdList(allParentPublishmentSystemIDArrayList, publishmentSystemIDArrayList, PublishmentSystemId);
                }
                else if (contributeType == ECrossSiteTransType.SelfSite)
                {
                    publishmentSystemIDArrayList = new List <int>();
                    publishmentSystemIDArrayList.Add(PublishmentSystemId);
                }

                foreach (int psID in publishmentSystemIDArrayList)
                {
                    var psInfo = PublishmentSystemManager.GetPublishmentSystemInfo(psID);
                    var show   = false;
                    if (contributeType == ECrossSiteTransType.SpecifiedSite)
                    {
                        show = true;
                    }
                    else if (contributeType == ECrossSiteTransType.SelfSite)
                    {
                        if (psID == PublishmentSystemId)
                        {
                            show = true;
                        }
                    }
                    else if (contributeType == ECrossSiteTransType.ParentSite)
                    {
                        if (psInfo.PublishmentSystemId == PublishmentSystemInfo.ParentPublishmentSystemId || (PublishmentSystemInfo.ParentPublishmentSystemId == 0 && psInfo.IsHeadquarters))
                        {
                            show = true;
                        }
                    }
                    if (show)
                    {
                        var listitem = new ListItem(psInfo.PublishmentSystemName, psID.ToString());
                        if (psInfo.IsHeadquarters)
                        {
                            listitem.Selected = true;
                        }
                        PublishmentSystemIDCollection.Items.Add(listitem);
                    }
                }
            }
            PublishmentSystemIDCollection_OnSelectedIndexChanged(sender, e);
        }