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)); } }