C/S系统开发框架权限系统 - 数据窗体权限值 - AuthorityCategory类详解
作者:作者不详  发布日期:2021-06-28 20:40:36
  C/S系统开发框架权限系统 - 数据窗体权限值 - AuthorityCategory类详解

C/S系统开发框架权限系统 - 数据窗体权限值 - AuthorityCategory类详解



AuthorityCategory类详解


AuthorityCategory类定义数据窗体的权限值(多个功能按钮的权限值相加)。




C# Code:


/// <summary>
/// 数据窗体的权限值(多个功能按钮的权限值相加)
/// </summary>
public class AuthorityCategory
{
  
/// <summary>
  
/// 无权限
  
/// </summary>
  
public const int NONE = 0;
  
  
/// <summary>
  
/// 数据操作基类窗体:拥有的基本功能(增、删、改、查)
  
/// </summary>
  
public const int DATA_ACTION_VALUE = ButtonAuthority.ADD + ButtonAuthority.EDIT + ButtonAuthority.DELETE + ButtonAuthority.VIEW;
  
  
/// <summary>
  
/// 报表窗体:拥有的功能(打印、预览)
  
/// </summary>
  
public const int REPORT_ACTION_VALUE = ButtonAuthority.PREVIEW + ButtonAuthority.PRINT;
  
  
/// <summary>
  
/// 业务单据窗体:拥有的功能(增、删、改、查、打印、预览、审核、修改历史记录查询)
  
/// </summary>
  
public const int BUSINESS_ACTION_VALUE = DATA_ACTION_VALUE + REPORT_ACTION_VALUE +
  ButtonAuthority.APPROVAL +
  ButtonAuthority.SHOW_MOD_HISTORY;
  
  
/// <summary>
  
/// 数据字典窗体:拥有的功能(增、删、改、查、打印、预览)
  
/// </summary>
  
public const int MASTER_ACTION = DATA_ACTION_VALUE + REPORT_ACTION_VALUE;
  
  
/// <summary>
  
/// 所有功能权限(对应ButtonAuthority类所有成员的值相加)
  
/// 慎用!
  
/// </summary>
  
public const int ALL_ACTION_VALUE =
  DATA_ACTION_VALUE +
  REPORT_ACTION_VALUE +
  ButtonAuthority.APPROVAL +
  ButtonAuthority.SHOW_MOD_HISTORY +
  ButtonAuthority.CLONE +
  ButtonAuthority.EXPORT +
  ButtonAuthority.GENERATE +
  ButtonAuthority.LOCK +
  ButtonAuthority.UNDO +
  ButtonAuthority.VOID +
  ButtonAuthority.RESERVED1 +
  ButtonAuthority.RESERVED2 +
  ButtonAuthority.EX_01 +
  ButtonAuthority.EX_02 +
  ButtonAuthority.EX_03 +
  ButtonAuthority.EX_04 +
  ButtonAuthority.EX_05 +
  ButtonAuthority.EX_06 +
  ButtonAuthority.EX_07 +
  ButtonAuthority.EX_08 +
  ButtonAuthority.EX_09 +
  ButtonAuthority.EX_10;
}


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




参考文档:


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







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


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



上一篇 下一篇