Example #1
0
 /// <summary>
 ///  是否有某行为权限
 /// </summary>
 /// <param name="code">行为权限代码</param>
 /// <returns></returns>
 public bool HasActionRight(string code)
 {
     if (ActionRightList != null)
     {
         return(ActionRightList.FindIndex(o =>
         {
             return o.Code == code && o.ExpiryTime > SysInfo.Env.ServerTime;
         }) >= 0);
     }
     return(false);
 }
Example #2
0
        /// <summary>
        ///  获取授权人员标识
        /// </summary>
        /// <param name="code">行为权限代码</param>
        /// <returns></returns>
        public int?GetActionRightEmpId(string code)
        {
            ActionRight ar = ActionRightList.Find(o => { return(o.Code == code); });

            if (ar == null)
            {
                return(null);
            }
            else
            {
                return(ar.GrantEmpId);
            }
        }