⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 moderationhomeadmin.cs

📁 本系统是在asp版《在线文件管理器》的基础上设计制作
💻 CS
字号:
//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System;using System.Collections;using System.Web;using System.Web.UI.WebControls;using CommunityServer.Components;using CommunityServer.Controls;
using CommunityServer.Discussions.Components;

namespace CommunityServer.Discussions.Controls 
{
	
    /// <summary>
    /// This control displays the admin section's moderation home content.
    /// </summary>
    public class ModerationHomeAdmin : TemplatedWebControl 
    {

        #region Child Controls

        protected Label	UserWaiting;
        protected Label	PostWaiting;

        #endregion

        protected override String ExternalSkinFileName
        {
            get
            {
                return CreateExternalSkinFileName("Moderation");
            }
        }


        protected override void OnLoad(EventArgs e) 
        {
            if ( !Page.IsPostBack ) 
            {
                this.DataBind();
            }
            base.OnLoad (e);
        }

        protected override void AttachChildControls() 
        {
            UserWaiting = FindControl( "UserWaiting" ) as Label;
            PostWaiting = FindControl( "PostWaiting" ) as Label;
        }

        public override void DataBind() 
        {
            base.DataBind();

            // this function simple binds the basic site stats label controls on the page.
            string[] postWaiting = new string[2];

			
            // Check how many posts are awaiting moderation approval,
            // by looping through and totalling the forums to moderate.
            //
            ArrayList forumsToModerate = Moderate.GetForumsToModerate();

            int totalPosts = 0;
            foreach (Forum f in forumsToModerate) 
            {
                totalPosts += f.PostsToModerate;
            }

            postWaiting[0] = totalPosts.ToString();
            postWaiting[1] = ResourceManager.GetString("Moderation");


            // finally we format language text, and format
            // the data elements.
            //
            PostWaiting.Text = String.Format( ResourceManager.GetString("Admin_Home_PostWaiting"), postWaiting);

        }

    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -