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

            _nodeId      = TranslateUtils.ToInt(Request.QueryString["NodeID"]);
            _idArrayList = TranslateUtils.StringCollectionToIntList(Request.QueryString["IDCollection"]);

            if (!IsPostBack)
            {
                var nodeInfoList = GovInteractManager.GetNodeInfoList(PublishmentSystemInfo);
                foreach (var nodeInfo in nodeInfoList)
                {
                    if (nodeInfo.NodeId != _nodeId)
                    {
                        var listItem = new ListItem(nodeInfo.NodeName, nodeInfo.NodeId.ToString());
                        ddlNodeID.Items.Add(listItem);
                    }
                }

                ltlDepartmentName.Text = DepartmentManager.GetDepartmentName(Body.AdministratorInfo.DepartmentId);
                ltlUserName.Text       = Body.AdministratorInfo.DisplayName;
            }
        }
コード例 #2
0
        public void Page_Load(object sender, EventArgs e)
        {
            PageUtils.CheckRequestParameter("siteId");

            if (!IsPostBack)
            {
                BreadCrumb(AppManager.Wcm.LeftMenu.IdGovInteract, AppManager.Wcm.LeftMenu.GovInteract.IdGovInteractAnalysis, "互动交流统计", AppManager.Wcm.Permission.WebSite.GovInteractAnalysis);

                StartDate.Text = string.Empty;
                EndDate.Now    = true;

                var nodeInfoList = GovInteractManager.GetNodeInfoList(PublishmentSystemInfo);

                var listItem = new ListItem("<<全部>>", "0");
                ddlNodeID.Items.Add(listItem);
                foreach (var nodeInfo in nodeInfoList)
                {
                    listItem = new ListItem(nodeInfo.NodeName, nodeInfo.NodeId.ToString());
                    ddlNodeID.Items.Add(listItem);
                }

                ClientScriptRegisterClientScriptBlock("TreeScript", DepartmentTreeItem.GetScript(EDepartmentLoadingType.List, null));
                BindGrid();
            }
        }
コード例 #3
0
ファイル: PageTagStyleLeft.cs プロジェクト: yankaics/cms-1
        public void BindGrid()
        {
            if (tableStyle == ETableStyle.GovInteractContent)
            {
                var nodeInfoList = GovInteractManager.GetNodeInfoList(PublishmentSystemInfo);
                dgContents.DataSource = nodeInfoList;
            }

            dgContents.ItemDataBound += dgContents_ItemDataBound;
            dgContents.DataBind();
        }
コード例 #4
0
ファイル: NodeNaviTabManager.cs プロジェクト: yankaics/cms-1
        public static TabCollection GetTabCollection(Tab parent, int publishmentSystemId)
        {
            TabCollection tabCollection;

            if (StringUtils.EqualsIgnoreCase(parent.Id, AppManager.Cms.LeftMenu.Function.IdResume))
            {
                tabCollection = new TabCollection(parent.Children);
            }
            else if (StringUtils.EqualsIgnoreCase(parent.Id, AppManager.Wcm.LeftMenu.IdGovInteract))
            {
                Tab[] tabs;
                var   publishmentSystemInfo = PublishmentSystemManager.GetPublishmentSystemInfo(publishmentSystemId);
                var   nodeInfoList          = GovInteractManager.GetNodeInfoList(publishmentSystemInfo);
                if (nodeInfoList.Count > 0 && ProductPermissionsManager.Current.GovInteractPermissionDict.ContainsKey(publishmentSystemId))
                {
                    var govInteractPermissionListOfPublishmentSystemId = ProductPermissionsManager.Current.GovInteractPermissionDict[publishmentSystemId];
                    var govInteractPermissionList = govInteractPermissionListOfPublishmentSystemId;
                    var tabList = new List <Tab>();
                    foreach (var nodeInfo in nodeInfoList)
                    {
                        if (govInteractPermissionListOfPublishmentSystemId == null || govInteractPermissionListOfPublishmentSystemId.Count == 0)
                        {
                            if (ProductPermissionsManager.Current.GovInteractPermissionDict.ContainsKey(nodeInfo.NodeId))
                            {
                                govInteractPermissionList = ProductPermissionsManager.Current.GovInteractPermissionDict[nodeInfo.NodeId];
                            }
                        }

                        if (govInteractPermissionList != null && govInteractPermissionList.Count > 0)
                        {
                            var tab = new Tab
                            {
                                Text = nodeInfo.NodeName,
                                Id   = AppManager.Wcm.LeftMenu.IdGovInteract + "_" + nodeInfo.NodeId
                            };

                            var childList = new List <Tab>();

                            if (govInteractPermissionList.Contains(AppManager.Wcm.Permission.GovInteract.GovInteractAccept))
                            {
                                childList.Add(new Tab
                                {
                                    Text            = "待受理办件",
                                    Href            = PageGovInteractListAccept.GetRedirectUrl(nodeInfo.PublishmentSystemId, nodeInfo.NodeId),
                                    KeepQueryString = false,
                                    Target          = "right"
                                });
                            }
                            if (govInteractPermissionList.Contains(AppManager.Wcm.Permission.GovInteract.GovInteractReply))
                            {
                                childList.Add(new Tab
                                {
                                    Text            = "待办理办件",
                                    Href            = PageGovInteractListReply.GetRedirectUrl(nodeInfo.PublishmentSystemId, nodeInfo.NodeId),
                                    KeepQueryString = false,
                                    Target          = "right"
                                });
                            }
                            if (govInteractPermissionList.Contains(AppManager.Wcm.Permission.GovInteract.GovInteractCheck))
                            {
                                childList.Add(new Tab
                                {
                                    Text            = "待审核办件",
                                    Href            = PageGovInteractListCheck.GetRedirectUrl(nodeInfo.PublishmentSystemId, nodeInfo.NodeId),
                                    KeepQueryString = false,
                                    Target          = "right"
                                });
                            }
                            if (govInteractPermissionList.Contains(AppManager.Wcm.Permission.GovInteract.GovInteractView) || govInteractPermissionList.Contains(AppManager.Wcm.Permission.GovInteract.GovInteractDelete))
                            {
                                childList.Add(new Tab
                                {
                                    Text            = "所有办件",
                                    Href            = PageGovInteractListAll.GetRedirectUrl(nodeInfo.PublishmentSystemId, nodeInfo.NodeId),
                                    KeepQueryString = false,
                                    Target          = "right"
                                });
                            }
                            if (govInteractPermissionList.Contains(AppManager.Wcm.Permission.GovInteract.GovInteractAdd))
                            {
                                var redirectUrl = PageGovInteractListAccept.GetRedirectUrl(nodeInfo.PublishmentSystemId, nodeInfo.NodeId);
                                var child       = new Tab
                                {
                                    Text            = "新增办件",
                                    Href            = WebUtils.GetContentAddAddUrl(publishmentSystemId, nodeInfo, redirectUrl),
                                    KeepQueryString = false,
                                    Target          = "right"
                                };
                                childList.Add(child);
                            }

                            tab.Children = new Tab[childList.Count];
                            for (var i = 0; i < childList.Count; i++)
                            {
                                tab.Children[i] = childList[i];
                            }

                            tabList.Add(tab);
                        }
                    }

                    var k = 0;
                    tabs = new Tab[parent.Children.Length + tabList.Count];
                    for (; k < tabList.Count; k++)
                    {
                        tabs[k] = tabList[k];
                    }

                    for (var j = 0; j < parent.Children.Length; j++)
                    {
                        tabs[j + k] = parent.Children[j];
                    }
                }
                else
                {
                    tabs = parent.Children;
                }

                tabCollection = new TabCollection(tabs);
            }
            else
            {
                tabCollection = new TabCollection(parent.Children);
            }
            return(tabCollection);
        }
コード例 #5
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            PageUtils.CheckRequestParameter("ContentID", "ReturnUrl");

            contentInfo = DataProvider.GovInteractContentDao.GetContentInfo(PublishmentSystemInfo, TranslateUtils.ToInt(Request.QueryString["ContentID"]));
            returnUrl   = StringUtils.ValueFromUrl(Request.QueryString["ReturnUrl"]);

            if (!IsPostBack)
            {
                if (phBtnAccept != null)
                {
                    phBtnAccept.Visible = GovInteractManager.IsPermission(PublishmentSystemId, contentInfo.NodeId, AppManager.Wcm.Permission.GovInteract.GovInteractAccept);
                }
                if (phBtnSwitchToTranslate != null)
                {
                    phBtnSwitchToTranslate.Visible = GovInteractManager.IsPermission(PublishmentSystemId, contentInfo.NodeId, AppManager.Wcm.Permission.GovInteract.GovInteractSwitchToTranslate);
                }
                if (phBtnReply != null)
                {
                    phBtnReply.Visible = GovInteractManager.IsPermission(PublishmentSystemId, contentInfo.NodeId, AppManager.Wcm.Permission.GovInteract.GovInteractReply);
                }
                if (phBtnCheck != null)
                {
                    if (contentInfo.State == EGovInteractState.Checked)
                    {
                        phBtnCheck.Visible = false;
                    }
                    else
                    {
                        phBtnCheck.Visible = GovInteractManager.IsPermission(PublishmentSystemId, contentInfo.NodeId, AppManager.Wcm.Permission.GovInteract.GovInteractCheck);
                    }
                }
                if (phBtnComment != null)
                {
                    if (contentInfo.State == EGovInteractState.Checked)
                    {
                        phBtnComment.Visible = false;
                    }
                    else
                    {
                        phBtnComment.Visible = GovInteractManager.IsPermission(PublishmentSystemId, contentInfo.NodeId, AppManager.Wcm.Permission.GovInteract.GovInteractComment);
                    }
                }
                if (phBtnReturn != null)
                {
                    phBtnReturn.Visible = !PublishmentSystemInfo.Additional.GovInteractApplyIsOpenWindow;
                }

                var builder       = new StringBuilder();
                var styleInfoList = TableStyleManager.GetTableStyleInfoList(ETableStyle.GovInteractContent, PublishmentSystemInfo.AuxiliaryTableForGovInteract, RelatedIdentities.GetChannelRelatedIdentities(PublishmentSystemId, contentInfo.NodeId));

                var isPreviousSingleLine = true;
                var isPreviousLeftColumn = false;
                foreach (var styleInfo in styleInfoList)
                {
                    if (styleInfo.IsVisible && !StringUtils.EqualsIgnoreCase(styleInfo.AttributeName, GovInteractContentAttribute.DepartmentId))
                    {
                        var value = contentInfo.GetExtendedAttribute(styleInfo.AttributeName);
                        if (StringUtils.EqualsIgnoreCase(styleInfo.AttributeName, GovInteractContentAttribute.TypeId))
                        {
                            value = GovInteractManager.GetTypeName(TranslateUtils.ToInt(value));
                        }
                        else if (StringUtils.EqualsIgnoreCase(styleInfo.AttributeName, GovInteractContentAttribute.IsPublic))
                        {
                            value = TranslateUtils.ToBool(value) ? "公开" : "不公开";
                        }
                        else if (StringUtils.EqualsIgnoreCase(styleInfo.AttributeName, GovInteractContentAttribute.FileUrl))
                        {
                            if (!string.IsNullOrEmpty(value))
                            {
                                value =
                                    $@"<a href=""{PageUtility.ParseNavigationUrl(PublishmentSystemInfo, value)}"" target=""_blank"">{value}</a>";
                            }
                        }

                        if (builder.Length > 0)
                        {
                            if (isPreviousSingleLine)
                            {
                                builder.Append("</tr>");
                            }
                            else
                            {
                                if (!isPreviousLeftColumn)
                                {
                                    builder.Append("</tr>");
                                }
                                else if (styleInfo.IsSingleLine)
                                {
                                    builder.Append(@"<td bgcolor=""#f0f6fc"" class=""attribute""></td><td></td></tr>");
                                }
                            }
                        }

                        //this line

                        if (styleInfo.IsSingleLine || isPreviousSingleLine || !isPreviousLeftColumn)
                        {
                            builder.Append("<tr>");
                        }

                        builder.Append(
                            $@"<td bgcolor=""#f0f6fc"" class=""attribute"">{styleInfo.DisplayName}</td><td {(styleInfo
                                .IsSingleLine
                                ? @"colspan=""3"""
                                : string.Empty)} class=""tdBorder"">{value}</td>");


                        if (styleInfo.IsSingleLine)
                        {
                            isPreviousSingleLine = true;
                            isPreviousLeftColumn = false;
                        }
                        else
                        {
                            isPreviousSingleLine = false;
                            isPreviousLeftColumn = !isPreviousLeftColumn;
                        }
                    }
                }

                if (builder.Length > 0)
                {
                    if (isPreviousSingleLine || !isPreviousLeftColumn)
                    {
                        builder.Append("</tr>");
                    }
                    else
                    {
                        builder.Append(@"<td bgcolor=""#f0f6fc"" class=""attribute""></td><td></td></tr>");
                    }
                }
                ltlTitle.Text           = contentInfo.Title;
                ltlApplyAttributes.Text = builder.ToString();
                ltlAddDate.Text         = DateUtils.GetDateAndTimeString(contentInfo.AddDate);
                ltlQueryCode.Text       = contentInfo.QueryCode;
                ltlState.Text           = EGovInteractStateUtils.GetText(contentInfo.State);
                ltlDepartmentName.Text  = contentInfo.DepartmentName;

                if (phReply != null)
                {
                    if (contentInfo.State == EGovInteractState.Denied || contentInfo.State == EGovInteractState.Replied || contentInfo.State == EGovInteractState.Redo || contentInfo.State == EGovInteractState.Checked)
                    {
                        var replyInfo = DataProvider.GovInteractReplyDao.GetReplyInfoByContentId(PublishmentSystemId, contentInfo.Id);
                        if (replyInfo != null)
                        {
                            phReply.Visible = true;
                            ltlDepartmentAndUserName.Text =
                                $"{DepartmentManager.GetDepartmentName(replyInfo.DepartmentID)}({replyInfo.UserName})";
                            ltlReplyAddDate.Text = DateUtils.GetDateAndTimeString(replyInfo.AddDate);
                            ltlReply.Text        = replyInfo.Reply;
                            if (!string.IsNullOrEmpty(replyInfo.FileUrl))
                            {
                                ltlReplyFileUrl.Text =
                                    $@"<a href=""{PageUtility.ParseNavigationUrl(PublishmentSystemInfo,
                                        replyInfo.FileUrl)}"" target=""_blank"">{replyInfo.FileUrl}</a>";
                            }
                        }
                    }
                }

                if (divAddDepartment != null)
                {
                    divAddDepartment.Attributes.Add("onclick", ModalGovInteractDepartmentSelect.GetOpenWindowString(PublishmentSystemId, contentInfo.NodeId));
                    var scriptBuilder = new StringBuilder();
                    if (contentInfo.DepartmentId > 0)
                    {
                        var departmentName = DepartmentManager.GetDepartmentName(contentInfo.DepartmentId);
                        scriptBuilder.Append(
                            $@"<script>showCategoryDepartment('{departmentName}', '{contentInfo.DepartmentId}');</script>");
                    }
                    ltlScript.Text = scriptBuilder.ToString();
                }

                if (ddlTranslateNodeID != null)
                {
                    var nodeInfoList = GovInteractManager.GetNodeInfoList(PublishmentSystemInfo);
                    foreach (var nodeInfo in nodeInfoList)
                    {
                        if (nodeInfo.NodeId != contentInfo.NodeId)
                        {
                            var listItem = new ListItem(nodeInfo.NodeName, nodeInfo.NodeId.ToString());
                            ddlTranslateNodeID.Items.Add(listItem);
                        }
                    }
                }

                rptRemarks.DataSource     = DataProvider.GovInteractRemarkDao.GetDataSourceByContentId(PublishmentSystemId, contentInfo.Id);
                rptRemarks.ItemDataBound += rptRemarks_ItemDataBound;
                rptRemarks.DataBind();

                if (rptLogs != null)
                {
                    rptLogs.DataSource     = DataProvider.GovInteractLogDao.GetDataSourceByContentId(PublishmentSystemId, contentInfo.Id);
                    rptLogs.ItemDataBound += rptLogs_ItemDataBound;
                    rptLogs.DataBind();
                }
            }
        }