///*************************************************************************/ ///* ///* 文件名 :ButtonAuthority.cs ///* 程序说明 : 系统权限功能点定义 ///* 原创作者 :孙中吕 ///* ///* Copyright 2006-2021 C/S框架网 www.csframework.com ///**************************************************************************/ namespace CSFrameworkV5.Core { /// ///定义每个功能按钮的权限值,权限值为2^n次方(n>0), 对应系统数据库的tb_MyActions表 ///开发框架默认提供26个功能按钮(权限按钮)的权限值。 ///基于32位的PC机,所有权限值相加必须<=Int32最大值<=2147483647 /// public class ButtonAuthority { /// /// 未定义权限 /// public const int NONE = 0; /// /// 1-新增 /// public const int ADD = 1; /// /// 2-删除 /// public const int DELETE = 2; /// /// 3-修改 /// public const int EDIT = 4; /// /// 4-查看 /// public const int VIEW = 8; /// /// 5-批准(审核) /// public const int APPROVAL = 16; /// /// 6-打印 /// public const int PRINT = 32; /// /// 7-打印预览 /// public const int PREVIEW = 64; /// /// 8-作废单据 /// public const int VOID = 128; /// /// 9-生成单据 /// public const int GENERATE = 256; /// /// 10-复制单据 /// public const int CLONE = 512; /// /// 11-导出数据,如:Excel,PDF文件 /// public const int EXPORT = 1024; /// /// 12-锁定 /// public const int LOCK = 2048; /// /// 13-修改日志(单据修改历史记录) /// public const int SHOW_MOD_HISTORY = 4096; /// /// 14-预留权限1 /// public const int RESERVED1 = 8192; /// /// 15-预留权限2 /// public const int RESERVED2 = 16384; /// /// 16-预留权限3 /// public const int RESERVED3 = 32768; /// /// 17-扩展权限EX_01:65536 /// public const int EX_01 = 65536; /// /// 18-扩展权限EX_02:131072 /// public const int EX_02 = 131072; /// /// 19-扩展权限EX_03:262144 /// public const int EX_03 = 262144; /// /// 20-扩展权限EX_04:524288 /// public const int EX_04 = 524288; /// /// 21-扩展权限EX_05:1048576 /// public const int EX_05 = 1048576; /// /// 22-扩展权限EX_06:2097152 /// public const int EX_06 = 2097152; /// /// 23-扩展权限EX_07:4194304 /// public const int EX_07 = 4194304; /// /// 24-扩展权限EX_08:8388608 /// public const int EX_08 = 8388608; /// /// 25-扩展权限EX_09:16777216 /// public const int EX_09 = 16777216; /// /// 26-扩展权限EX_10:33554432 /// public const int EX_10 = 33554432; } /// /// 数据窗体的权限值(多个功能按钮的权限值相加) /// public class AuthorityCategory { /// /// 无权限 /// public const int NONE = 0; /// /// 数据操作基类窗体:拥有的基本功能(增、删、改、查) /// public const int DATA_ACTION_VALUE = ButtonAuthority.ADD + ButtonAuthority.EDIT + ButtonAuthority.DELETE + ButtonAuthority.VIEW + ButtonAuthority.EXPORT; /// /// 报表窗体:拥有的功能(打印、预览) /// public const int REPORT_ACTION_VALUE = ButtonAuthority.PREVIEW + ButtonAuthority.PRINT; /// /// 业务单据窗体:拥有的功能(增、删、改、查、打印、预览、审核、修改历史记录查询) /// public const int BUSINESS_ACTION_VALUE = DATA_ACTION_VALUE + REPORT_ACTION_VALUE + ButtonAuthority.APPROVAL + ButtonAuthority.SHOW_MOD_HISTORY; /// /// 数据字典窗体:拥有的功能(增、删、改、查、导出、打印、预览) /// public const int MASTER_ACTION = DATA_ACTION_VALUE + REPORT_ACTION_VALUE; /// /// 所有功能权限(对应ButtonAuthority类所有成员的值相加) /// 慎用! /// public const int ALL_ACTION_VALUE = DATA_ACTION_VALUE + REPORT_ACTION_VALUE + ButtonAuthority.APPROVAL + ButtonAuthority.SHOW_MOD_HISTORY + ButtonAuthority.CLONE + ButtonAuthority.GENERATE + ButtonAuthority.LOCK + ButtonAuthority.VOID + ButtonAuthority.RESERVED1 + ButtonAuthority.RESERVED2 + ButtonAuthority.RESERVED3 + 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; } }