Esempio n. 1
0
        protected override void Render(HtmlTextWriter writer)
        {
            bool canView = Permissions.HasPerm(ViewRoles, UserRoles);
            bool canRead = Permissions.HasPerm(ReadRoles, UserRoles);

            if (Content != null)
            {
                hypForumName         = (Link)(Content.FindControl("hypForumName" + ForumId));
                hypForumName.Enabled = canView;

                plhLastPost = (PlaceHolder)(Content.FindControl("plhLastPost" + ForumId));
                if (plhLastPost != null)
                {
                    plhLastPost.Visible = canView;
                }

                hypLastPostSubject = (Link)(Content.FindControl("hypLastPostSubject" + ForumId));
                if (hypLastPostSubject != null)
                {
                    hypLastPostSubject.Enabled = canView;
                }
            }
            if (canView)
            {
                Content.RenderControl(writer);
            }
            else if (Hidden == false)
            {
                Content.RenderControl(writer);
            }
        }
Esempio n. 2
0
        protected override void Render(HtmlTextWriter writer)
        {
            bool canView = Permissions.HasPerm(ViewRoles, UserRoles);
            bool canRead = Permissions.HasPerm(ReadRoles, UserRoles);

            if (Content != null)
            {
                hypForumName = (Link)(Content.FindControl("hypForumName" + ForumId));
                hypForumName.Enabled = canView;

                plhLastPost = (PlaceHolder)(Content.FindControl("plhLastPost" + ForumId));
                if (plhLastPost != null)
                {
                    plhLastPost.Visible = canView;
                }

                hypLastPostSubject = (Link)(Content.FindControl("hypLastPostSubject" + ForumId));
                if (hypLastPostSubject != null)
                {
                    hypLastPostSubject.Enabled = canView;
                }

            }
            if (canView)
            {
                Content.RenderControl(writer);
            }
            else if (Hidden == false)
            {
                Content.RenderControl(writer);
            }

        }