阅读笔记(一)

  1.  通过Common.sink()来获取post和get提交值;
    int S_ID = (int)Common.sink("S_ID", MethodType.Get, 255, 0, DataType.Int);
    string CMD = (string)Common.sink("CMD", MethodType.Get, 50, 0, DataType.Str);
  2. 通过FrameWorkPermission.CheckPagePermission()来检查是否有权限操作
    Code
    ///
    /// 权限类型
    ///

    public enum PopedomType
    {
    ///
    /// 列表/查看
    ///

    List = 2,
    ///
    /// 新增
    ///

    New = 4,
    ///
    /// 修改
    ///

    Edit = 8,
    ///
    /// 删除
    ///

    Delete = 16,
    ///
    /// 排序
    ///

    Orderby = 32,
    ///
    /// 打印
    ///

    Print = 64,
    ///
    /// 备用A
    ///

    A = 128,
    ///
    /// 备用B
    ///

    B = 256
    }

            /// 
    /// 根据CMD检测权限
    ///

    /// CMD值
    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;
    }
    }

     

转载于:https://www.cnblogs.com/petali/archive/2008/12/02/1346200.html

你可能感兴趣的:(阅读笔记(一))