C/S系统开发框架权限系统 - 功能按钮权限值 - ButtonAuthority类详解

  C/S系统开发框架权限系统 - 功能按钮权限值 - ButtonAuthority类详解

C/S系统开发框架权限系统 - 功能按钮权限值 - ButtonAuthority类详解



ButtonAuthority类详解



ButtonAuthority类定义每个功能按钮的权限值,权限值为2^n次方(n>0) ,如:1,2,4,8,16,32......   

开发框架默认提供26个功能按钮(权限按钮)的权限值, 2^26次方。

基于32位的PC机,所有权限值相加必须<=Int32,最大值<=2147483647




C# Code:

public class ButtonAuthority
{
  
/// <summary>
  
/// 未定义权限
  
/// </summary>
  
public const int NONE = 0;
  
  
/// <summary>
  
/// 1-新增
  
/// </summary>
  
public const int ADD = 1;
  
  
/// <summary>
  
/// 2-删除
  
/// </summary>
  
public const int DELETE = 2;
  
  
/// <summary>
  
/// 3-修改
  
/// </summary>
  
public const int EDIT = 4;
  
  
/// <summary>
  
/// 4-查看
  
/// </summary>
  
public const int VIEW = 8;
  
  
/// <summary>
  
/// 5-批准(审核)
  
/// </summary>
  
public const int APPROVAL = 16;
  
  
/// <summary>
  
/// 6-打印
  
/// </summary>
  
public const int PRINT = 32;
  
  
/// <summary>
  
/// 7-打印预览
  
/// </summary>
  
public const int PREVIEW = 64;
  
  
/// <summary>
  
/// 8-作废单据
  
/// </summary>
  
public const int VOID = 128;
  
  
/// <summary>
  
/// 9-生成单据
  
/// </summary>
  
public const int GENERATE = 256;
  
  
/// <summary>
  
/// 10-复制单据
  
/// </summary>
  
public const int CLONE = 512;
  
  
/// <summary>
  
/// 11-导出数据,如:Excel,PDF文件
  
/// </summary>
  
public const int EXPORT = 1024;
  
  
/// <summary>
  
/// 12-锁定
  
/// </summary>
  
public const int LOCK = 2048;
  
  
/// <summary>
  
/// 13-单据反向操作(如反锁定,反审核)
  
/// </summary>
  
public const int UNDO = 4096;
  
  
/// <summary>
  
/// 14-预留权限1
  
/// </summary>
  
public const int RESERVED1 = 8192;
  
  
/// <summary>
  
/// 15-预留权限2
  
/// </summary>
  
public const int RESERVED2 = 16384;
  
  
/// <summary>
  
/// 16-查看数据修改历史记录
  
/// </summary>
  
public const int SHOW_MOD_HISTORY = 32768;
  
  
/// <summary>
  
/// 17-扩展权限EX_01:65536
  
/// </summary>
  
public const int EX_01 = 65536;
  
  
/// <summary>
  
/// 18-扩展权限EX_02:131072
  
/// </summary>
  
public const int EX_02 = 131072;
  
  
/// <summary>
  
/// 19-扩展权限EX_03:262144
  
/// </summary>
  
public const int EX_03 = 262144;
  
  
/// <summary>
  
/// 20-扩展权限EX_04:524288
  
/// </summary>
  
public const int EX_04 = 524288;
  
  
/// <summary>
  
/// 21-扩展权限EX_05:1048576
  
/// </summary>
  
public const int EX_05 = 1048576;
  
  
/// <summary>
  
/// 22-扩展权限EX_06:2097152
  
/// </summary>
  
public const int EX_06 = 2097152;
  
  
/// <summary>
  
/// 23-扩展权限EX_07:4194304
  
/// </summary>
  
public const int EX_07 = 4194304;
  
  
/// <summary>
  
/// 24-扩展权限EX_08:8388608
  
/// </summary>
  
public const int EX_08 = 8388608;
  
  
/// <summary>
  
/// 25-扩展权限EX_09:16777216
  
/// </summary>
  
public const int EX_09 = 16777216;
  
  
/// <summary>
  
/// 26-扩展权限EX_10:33554432
  
/// </summary>
  
public const int EX_10 = 33554432;
  
}

//来源:C/S框架网 | www.csframework.com | QQ:23404761



参考文档:


Winform快速开发框架之权限系统设计(3) - 功能按钮权限控制基本原理





C/S框架网|原创精神.创造价值.打造精品


扫一扫加作者微信
C/S框架网作者微信 C/S框架网|原创作品.质量保障.竭诚为您服务

版权声明:本文为开发框架文库发布内容,转载请附上原文出处连接
C/S框架网
发表评论

评论内容
昵称:
关联文章

C/S系统开发框架权限系统 - 功能按钮权限 - ButtonAuthority详解
C/S系统开发框架权限系统 - 数据窗体权限 - AuthorityCategory详解
Winform快速开发框架权限系统设计(3) - 功能按钮权限控制基本原理
关于扩展权限、扩展功能按钮及自定义功能点的命名|C/S框架
C/S开发框架权限扩展与定制按钮功能详细设计
Winform界面的功能按钮同等权限控制|C/S框架
Winform开发框架 - 特殊权限控制(扩展权限和自定义按钮功能)
窗体的自定义按钮权限控制-扩展权限按钮详解
如何进行菜单管理、扩展权限、更改自定义按钮名称|C/S框架
扩展按钮功能 - 扩展一个【复制单据】按钮操作详解
C#权限管理框架介绍|商业开源C/S系统快速开发框架权限系统设计
C/S框架创建Ribbon样式的模块功能按钮展示区(RibbonModuleLoader)
C/S开发框架权限是控制到按钮级别的吗?
企业级数据权限框架 - 集团组织架构数据权限开发框架(C/S+Winform+DevExpress)
数据窗体权限:修正AuthorityCategory.ALL_ACTION_VALUE常量定义|C/S框架
Winform通用框架(C#.NET)之权限管理系统详细设计|C/S框架
Winform快速开发框架权限系统设计(2) - 功能模块介绍
开发框架支持三级菜单及权限控制,有图详解
C/S软件系统开发框架代码生成器功能升级V5.1
C/S系统快速开发框架数据操作窗体(单表、主从表窗体)按钮事件