예제 #1
0
        public string GetTemplateUrl()
        {
            var urlTemplate = PageTagStyleTemplate.GetRedirectUrl(PublishmentSystemId, _styleInfo.StyleID,
                                                                  Body.GetQueryString("ReturnUrl"));

            return($"location.href='{urlTemplate}';return false;");
        }
예제 #2
0
        void dgContents_ItemDataBound(object sender, DataGridItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                var ltlName    = e.Item.FindControl("ltlName") as Literal;
                var ltlEditUrl = e.Item.FindControl("ltlEditUrl") as Literal;

                if (tableStyle == ETableStyle.GovInteractContent)
                {
                    var nodeInfo = e.Item.DataItem as NodeInfo;
                    ltlName.Text = nodeInfo.NodeName;
                    if (StringUtils.EqualsIgnoreCase(type, "DepartmentSelect"))
                    {
                        ltlEditUrl.Text =
                            $@"<a target='management' href=""{PageGovInteractDepartmentSelect.GetRedirectUrl(
                                PublishmentSystemId, nodeInfo.NodeId)}"">负责部门设置</a>";
                    }
                    else if (StringUtils.EqualsIgnoreCase(type, "AdministratorSelect"))
                    {
                        ltlEditUrl.Text =
                            $@"<a target='management' href=""{PageGovInteractPermissions.GetRedirectUrl(
                                PublishmentSystemId, nodeInfo.NodeId)}"">负责人员设置</a>";
                    }
                    else if (StringUtils.EqualsIgnoreCase(type, "Attributes"))
                    {
                        ltlEditUrl.Text =
                            $@"<a target='management' href=""{PageTableStyle.GetRedirectUrl(PublishmentSystemId,
                                ETableStyle.GovInteractContent,
                                PublishmentSystemInfo.AuxiliaryTableForGovInteract, nodeInfo.NodeId)}"">自定义字段</a>";
                    }
                    else if (StringUtils.EqualsIgnoreCase(type, "Apply"))
                    {
                        var applyStyleId = DataProvider.GovInteractChannelDao.GetApplyStyleId(nodeInfo.PublishmentSystemId, nodeInfo.NodeId);
                        ltlEditUrl.Text = $@"<a target='management' href=""{PageTagStyleTemplate.GetRedirectUrl(PublishmentSystemId, applyStyleId, string.Empty)}"">自定义提交模板</a>&nbsp;&nbsp;&nbsp;&nbsp;<a target='management' href=""{PageTagStylePreview.GetRedirectUrl(PublishmentSystemId, applyStyleId, string.Empty)}"">预览 </a>";
                    }
                    else if (StringUtils.EqualsIgnoreCase(type, "Query"))
                    {
                        var queryStyleId = DataProvider.GovInteractChannelDao.GetQueryStyleId(nodeInfo.PublishmentSystemId, nodeInfo.NodeId);
                        ltlEditUrl.Text = $@"<a target='management' href=""{PageTagStyleTemplate.GetRedirectUrl(PublishmentSystemId, queryStyleId, string.Empty)}"">自定义查询模板</a>&nbsp;&nbsp;&nbsp;&nbsp;<a target='management' href=""{PageTagStylePreview.GetRedirectUrl(PublishmentSystemId, queryStyleId, string.Empty)}"">预览 </a>";
                    }
                    else if (StringUtils.EqualsIgnoreCase(type, "MailSMS"))
                    {
                        var styleID = DataProvider.GovInteractChannelDao.GetApplyStyleId(nodeInfo.PublishmentSystemId, nodeInfo.NodeId);
                        ltlEditUrl.Text =
                            $@"<a target='management' href=""{PageTagStyleMailSMS.GetRedirectUrl(
                                PublishmentSystemId, styleID, tableStyle, nodeInfo.NodeId)}"">邮件/短信发送</a>";
                    }
                    else if (StringUtils.EqualsIgnoreCase(type, "InteractType"))
                    {
                        ltlEditUrl.Text = $@"<a target='management' href=""{PageGovInteractType.GetRedirectUrl(PublishmentSystemId, nodeInfo.NodeId)}"">办件类型管理</a>";
                    }
                }
            }
        }
예제 #3
0
        void dgContents_ItemDataBound(object sender, DataGridItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                var styleID     = SqlUtils.EvalInt(e.Item.DataItem, "StyleID");
                var styleName   = SqlUtils.EvalString(e.Item.DataItem, "StyleName");
                var settingsXML = SqlUtils.EvalString(e.Item.DataItem, "SettingsXML");

                var ltlStyleName   = (Literal)e.Item.FindControl("ltlStyleName");
                var ltlTemplateUrl = (Literal)e.Item.FindControl("ltlTemplateUrl");
                var ltlPreviewUrl  = (Literal)e.Item.FindControl("ltlPreviewUrl");
                var ltlEditUrl     = (Literal)e.Item.FindControl("ltlEditUrl");
                var ltlExportUrl   = (Literal)e.Item.FindControl("ltlExportUrl");
                var ltlDeleteUrl   = (Literal)e.Item.FindControl("ltlDeleteUrl");

                ltlStyleName.Text = styleName;

                var returnUrl = GetRedirectUrl(PublishmentSystemId, _elementName);

                ltlTemplateUrl.Text = $@"<a href=""{PageTagStyleTemplate.GetRedirectUrl(PublishmentSystemId, styleID, returnUrl)}"">自定义模板</a>";

                ltlPreviewUrl.Text = $@"<a href=""{PageTagStylePreview.GetRedirectUrl(PublishmentSystemId, styleID, returnUrl)}"">预览</a>";

                ltlEditUrl.Text =
                    $@"<a href=""javascript:;"" onclick=""{TextUtility.GetTagStyleOpenWindowStringToEdit(_elementName,
                        PublishmentSystemId, styleID)}"">编辑</a>";

                ltlExportUrl.Text =
                    $@"<a href=""javascript:;"" onclick=""{ModalExportMessage.GetOpenWindowStringToTagStyle(
                        PublishmentSystemId, styleID)}"">导出</a>";

                var deleteUrl = PageUtils.GetCmsUrl(nameof(PageTagStyle), new NameValueCollection
                {
                    { "PublishmentSystemID", PublishmentSystemId.ToString() },
                    { "elementName", _elementName },
                    { "Delete", true.ToString() },
                    { "StyleID", styleID.ToString() }
                });
                ltlDeleteUrl.Text =
                    $@"<a href=""{deleteUrl}"" onClick=""javascript:return confirm('此操作将删除样式“{styleName}”,确认吗?');"">删除</a>";
            }
        }