コード例 #1
0
        public void Page_Load(object sender, EventArgs e)
        {
            if (IsForbidden)
            {
                return;
            }

            PageUtils.CheckRequestParameter("siteId", "channelId");
            var channelId = int.Parse(Body.GetQueryString("channelId"));

            _channelInfo = ChannelManager.GetChannelInfo(SiteId, channelId);

            if (IsPostBack)
            {
                return;
            }

            ECrossSiteTransTypeUtils.AddAllListItems(DdlTransType, SiteInfo.ParentId > 0);

            ControlUtils.SelectSingleItem(DdlTransType, ECrossSiteTransTypeUtils.GetValue(_channelInfo.Additional.TransType));

            DdlTransType_OnSelectedIndexChanged(null, EventArgs.Empty);
            ControlUtils.SelectSingleItem(DdlSiteId, _channelInfo.Additional.TransSiteId.ToString());


            DdlSiteId_OnSelectedIndexChanged(null, EventArgs.Empty);
            ControlUtils.SelectMultiItems(LbChannelId, TranslateUtils.StringCollectionToStringList(_channelInfo.Additional.TransChannelIds));
            TbNodeNames.Text = _channelInfo.Additional.TransChannelNames;

            EBooleanUtils.AddListItems(DdlIsAutomatic, "自动", "提示");
            ControlUtils.SelectSingleItemIgnoreCase(DdlIsAutomatic, _channelInfo.Additional.TransIsAutomatic.ToString());

            ETranslateContentTypeUtils.AddListItems(DdlTranslateDoneType, false);
            ControlUtils.SelectSingleItem(DdlTranslateDoneType, ETranslateContentTypeUtils.GetValue(_channelInfo.Additional.TransDoneType));
        }
コード例 #2
0
        public void Page_Load(object sender, EventArgs e)
        {
            if (IsForbidden)
            {
                return;
            }

            PageUtils.CheckRequestParameter("PublishmentSystemID", "NodeID");
            var nodeID = int.Parse(Body.GetQueryString("NodeID"));

            nodeInfo = NodeManager.GetNodeInfo(PublishmentSystemId, nodeID);

            if (!IsPostBack)
            {
                ECrossSiteTransTypeUtils.AddAllListItems(TransType);

                ControlUtils.SelectListItems(TransType, ECrossSiteTransTypeUtils.GetValue(nodeInfo.Additional.TransType));

                TransType_OnSelectedIndexChanged(null, EventArgs.Empty);
                ControlUtils.SelectListItems(PublishmentSystemIDCollection, nodeInfo.Additional.TransPublishmentSystemID.ToString());


                PublishmentSystemIDCollection_OnSelectedIndexChanged(null, EventArgs.Empty);
                ControlUtils.SelectListItems(NodeIDCollection, TranslateUtils.StringCollectionToStringList(nodeInfo.Additional.TransNodeIDs));
                NodeNames.Text = nodeInfo.Additional.TransNodeNames;

                EBooleanUtils.AddListItems(IsAutomatic, "自动", "提示");
                ControlUtils.SelectListItemsIgnoreCase(IsAutomatic, nodeInfo.Additional.TransIsAutomatic.ToString());

                ETranslateContentTypeUtils.AddListItems(ddlTranslateDoneType, false);
                ControlUtils.SelectListItems(ddlTranslateDoneType, ETranslateContentTypeUtils.GetValue(nodeInfo.Additional.TransDoneType));
            }
        }