Exemple #1
0
        public void Page_Load(object sender, EventArgs e)
        {
            if (IsForbidden)
            {
                return;
            }

            PageUtils.CheckRequestParameter("PublishmentSystemID");

            _relatedIdentities = RelatedIdentities.GetRelatedIdentities(ETableStyle.Site, PublishmentSystemId, PublishmentSystemId);

            if (!IsPostBack)
            {
                BreadCrumb(AppManager.Cms.LeftMenu.IdConfigration, "站点属性设置", AppManager.Cms.Permission.WebSite.Configration);

                TbPublishmentSystemName.Text = PublishmentSystemInfo.PublishmentSystemName;

                LtlSettings.Text =
                    $@"<a class=""btn btn-success"" href=""{PageTableStyle.GetRedirectUrl(PublishmentSystemId,
                        ETableStyle.Site, DataProvider.PublishmentSystemDao.TableName, PublishmentSystemId)}"">设置站点属性</a>";

                AcAttributes.SetParameters(PublishmentSystemInfo.Additional.Attributes, PublishmentSystemInfo, 0, _relatedIdentities, ETableStyle.Site, DataProvider.PublishmentSystemDao.TableName, true, IsPostBack);

                BtnSubmit.Attributes.Add("onclick", InputParserUtils.GetValidateSubmitOnClickScript("myForm"));
            }
            else
            {
                AcAttributes.SetParameters(Request.Form, PublishmentSystemInfo, 0, _relatedIdentities, ETableStyle.Site, DataProvider.PublishmentSystemDao.TableName, true, IsPostBack);
            }
        }
Exemple #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>";
                    }
                }
            }
        }
Exemple #3
0
        void dgContents_ItemDataBound(object sender, DataGridItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                var inputID   = SqlUtils.EvalInt(e.Item.DataItem, "InputID");
                var inputName = SqlUtils.EvalString(e.Item.DataItem, "InputName");

                var LtlTitle   = (Literal)e.Item.FindControl("LtlTitle");
                var upLink     = (Literal)e.Item.FindControl("UpLink");
                var downLink   = (Literal)e.Item.FindControl("DownLink");
                var styleUrl   = (Literal)e.Item.FindControl("StyleUrl");
                var previewUrl = (Literal)e.Item.FindControl("PreviewUrl");
                var editUrl    = (Literal)e.Item.FindControl("EditUrl");
                var exportUrl  = (Literal)e.Item.FindControl("ExportUrl");

                LtlTitle.Text = $@"<a href=""{PageInputContent.GetRedirectUrl(PublishmentSystemId, inputName)}"">{inputName}</a>";

                var urlUp = PageUtils.GetCmsUrl(nameof(PageInput), new NameValueCollection
                {
                    { "PublishmentSystemID", PublishmentSystemId.ToString() },
                    { "InputID", inputID.ToString() },
                    { "Up", true.ToString() }
                });
                upLink.Text = $@"<a href=""{urlUp}""><img src=""../Pic/icon/up.gif"" border=""0"" alt=""上升"" /></a>";

                var urlDown = PageUtils.GetCmsUrl(nameof(PageInput), new NameValueCollection
                {
                    { "PublishmentSystemID", PublishmentSystemId.ToString() },
                    { "InputID", inputID.ToString() },
                    { "Down", true.ToString() }
                });
                downLink.Text =
                    $@"<a href=""{urlDown}""><img src=""../Pic/icon/down.gif"" border=""0"" alt=""下降"" /></a>";

                styleUrl.Text =
                    $@"<a href=""{PageTableStyle.GetRedirectUrl(PublishmentSystemId, ETableStyle.InputContent,
                        DataProvider.InputContentDao.TableName, inputID)}"">表单字段</a>";

                previewUrl.Text = $@"<a href=""{PageInputPreview.GetRedirectUrl(PublishmentSystemId, inputID, string.Empty)}"">预览</a>";

                editUrl.Text =
                    $@"<a href=""javascript:;"" onclick=""{ModalInputAdd.GetOpenWindowStringToEdit(
                        PublishmentSystemId, inputID, false)}"">编辑</a>";

                exportUrl.Text =
                    $@"<a href=""javascript:;"" onclick=""{ModalExportMessage.GetOpenWindowStringToInput(
                        PublishmentSystemId, inputID)}"">导出</a>";
            }
        }
Exemple #4
0
        private void DgContents_ItemDataBound(object sender, DataGridItemEventArgs e)
        {
            if (e.Item.ItemType != ListItemType.Item && e.Item.ItemType != ListItemType.AlternatingItem)
            {
                return;
            }

            var inputId   = SqlUtils.EvalInt(e.Item.DataItem, "InputID");
            var inputName = SqlUtils.EvalString(e.Item.DataItem, "InputName");
            var isChecked = SqlUtils.EvalBool(e.Item.DataItem, "IsChecked");
            var isIsReply = SqlUtils.EvalBool(e.Item.DataItem, "IsReply");

            var ltlTitle      = (Literal)e.Item.FindControl("ltlTitle");
            var ltlIsCheck    = (Literal)e.Item.FindControl("ltlIsCheck");
            var ltlIsReply    = (Literal)e.Item.FindControl("ltlIsReply");
            var ltlUpLink     = (Literal)e.Item.FindControl("ltlUpLink");
            var ltlDownLink   = (Literal)e.Item.FindControl("ltlDownLink");
            var ltlStyleUrl   = (Literal)e.Item.FindControl("ltlStyleUrl");
            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");

            ltlTitle.Text   = $@"<a href=""{PageInputContent.GetRedirectUrl(PublishmentSystemId, inputName)}"">{inputName}</a>";
            ltlIsCheck.Text = StringUtils.GetTrueImageHtml(!isChecked);
            ltlIsReply.Text = StringUtils.GetTrueImageHtml(isIsReply);

            var urlUp = PageUtils.GetCmsUrl(nameof(PageInput), new NameValueCollection
            {
                { "PublishmentSystemID", PublishmentSystemId.ToString() },
                { "InputID", inputId.ToString() },
                { "Up", true.ToString() }
            });

            ltlUpLink.Text = $@"<a href=""{urlUp}""><img src=""../Pic/icon/up.gif"" border=""0"" alt=""上升"" /></a>";

            var urlDown = PageUtils.GetCmsUrl(nameof(PageInput), new NameValueCollection
            {
                { "PublishmentSystemID", PublishmentSystemId.ToString() },
                { "InputID", inputId.ToString() },
                { "Down", true.ToString() }
            });

            ltlDownLink.Text =
                $@"<a href=""{urlDown}""><img src=""../Pic/icon/down.gif"" border=""0"" alt=""下降"" /></a>";

            ltlStyleUrl.Text =
                $@"<a href=""{PageTableStyle.GetRedirectUrl(PublishmentSystemId, ETableStyle.InputContent,
                    DataProvider.InputContentDao.TableName, inputId)}"">表单字段</a>";

            ltlPreviewUrl.Text = $@"<a href=""{PageInputPreview.GetRedirectUrl(PublishmentSystemId, inputId, string.Empty)}"">预览</a>";

            ltlEditUrl.Text =
                $@"<a href=""javascript:;"" onclick=""{ModalInputAdd.GetOpenWindowStringToEdit(
                    PublishmentSystemId, inputId, false)}"">编辑</a>";

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

            var urlDelete = PageUtils.GetCmsUrl(nameof(PageInput), new NameValueCollection
            {
                { "PublishmentSystemID", PublishmentSystemId.ToString() },
                { "InputID", inputId.ToString() },
                { "Delete", true.ToString() }
            });

            ltlDeleteUrl.Text = $@"<a href=""{urlDelete}"" onClick=""javascript:return confirm('此操作将删除提交表单“{inputName}”及相关数据,确认吗?');"">删除</a> </ItemTemplate>";
        }