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

📄 permission.cs

📁 BugNET is an issue tracking and project issue management solution built using the ASP.NET web applic
💻 CS
字号:
using System;
using System.Collections;
using System.Collections.Generic;
using BugNET.DataAccessLayer;

namespace BugNET.BusinessLogicLayer
{
	/// <summary>
	/// Summary description for Permission.
	/// </summary>
	public class Permission
	{
		private int _Id;
		private string _Name;
		private string _Key;

       

        /// <summary>
        /// Initializes a new instance of the <see cref="Permission"/> class.
        /// </summary>
        /// <param name="id">The id.</param>
        /// <param name="name">The name.</param>
        /// <param name="key">The key.</param>
		public Permission(int id,string name, string key)
		{
			_Id = id;
			_Name = name;
			_Key = key;
		}

		#region Properties
            /// <summary>
            /// Gets the id.
            /// </summary>
            /// <value>The id.</value>
			public int Id
			{
				get{return _Id;}
			}
            /// <summary>
            /// Gets the name.
            /// </summary>
            /// <value>The name.</value>
			public string Name
			{
				get{return _Name;}
			}
            /// <summary>
            /// Gets the key.
            /// </summary>
            /// <value>The key.</value>
			public string Key
			{
				get{return _Key;}
			}
		#endregion

		#region Static Methods
//		public static Permission GetPermissionById(int permissionId)
//		{
//			if (permissionId <= Globals.NewID )
//				throw (new ArgumentOutOfRangeException("permissionId"));
//
//			
//			return DataProviderManager.Provider.GetPermissionById(permissionId);
//		}

        /// <summary>
        /// Gets all permissions.
        /// </summary>
        /// <returns></returns>
		public static List<RolePermission> GetAllPermissions()
		{		
			return DataProviderManager.Provider.GetAllPermissions();
		}
		#endregion
	}
}

⌨️ 快捷键说明

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