security.cs

来自「BugNET is an issue tracking and project 」· CS 代码 · 共 31 行

CS
31
字号
using System;
using System.Web;
using System.Collections;

namespace BugNET.BusinessLogicLayer
{
	/// <summary>
	/// Summary description for Security.
	/// </summary>
	public class Security
	{
        /// <summary>
        /// Gets the name of the logged on user.
        /// </summary>
        /// <returns></returns>
        public static string GetUserName()
        {
            return HttpContext.Current.User.Identity.Name;
        }

        /// <summary>
        /// Gets the display name.
        /// </summary>
        /// <returns></returns>
        public static string GetDisplayName()
        {
            return ITUser.GetUserDisplayName(HttpContext.Current.User.Identity.Name);
        }
	}
}

⌨️ 快捷键说明

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