Code
/// <summary>
/// 权限类型
/// </summary>
public enum PopedomType
{
/// <summary>
/// 列表/查看
/// </summary>
List = 2,
/// <summary>
/// 新增
/// </summary>
New = 4,
/// <summary>
/// 修改
/// </summary>
Edit = 8,
/// <summary>
/// 删除
/// </summary>
Delete = 16,
/// <summary>
/// 排序
/// </summary>
Orderby = 32,
/// <summary>
/// 打印
/// </summary>
Print = 64,
/// <summary>
/// 备用A
/// </summary>
A = 128,
/// <summary>
/// 备用B
/// </summary>
B = 256
}
/// <summary>
/// 根据CMD检测权限
/// </summary>
/// <param name="CMD">CMD值</param>
public static void CheckPagePermission(string CMD)
{
switch (CMD)
{
case "List":
CheckPermissionVoid(PopedomType.List);
break;
case "New":
CheckPermissionVoid(PopedomType.New);
break;
case "Edit":
CheckPermissionVoid(PopedomType.Edit);
break;
case "OrderBy":
CheckPermissionVoid(PopedomType.Edit);
break;
case "Move":
CheckPermissionVoid(PopedomType.Delete);
break;
case "Delete":
CheckPermissionVoid(PopedomType.Delete);
break;
}
}