public bool ValiddatePermission(AccountModel account, string controller, string action, string filePath)
        {
            bool   bResult    = false;
            string actionName = string.IsNullOrEmpty(ActionName) ? action : ActionName;

            if (account != null)
            {
                List <string> perm = null;
                //测试当前controller是否已赋权限值,如果没有从
                //如果存在区域,Seesion保存(区域+控制器)
                //if (!string.IsNullOrEmpty(Area))
                //{
                //    controller = Area + "/" + controller;
                //}
                perm = (List <string>)HttpContext.Current.Session[filePath];
                if (perm == null || perm.Count == 0)
                {
                    using (SysPermissionBLL permissionBLL = new SysPermissionBLL()
                    {
                        permissionRepository = new SysPermissionRepository()
                    })
                    {
                        perm = permissionBLL.GetPermissionListByconn(account.Id, controller); //获取当前用户的权限列表
                        HttpContext.Current.Session[filePath] = perm;                         //获取的劝降放入会话由Controller调用
                    }
                }
                ////当用户访问index时,只要权限>0就可以访问
                //if (actionName.ToLower() == "index")
                //{
                //    if (perm.Count > 0)
                //    {
                //        return true;
                //    }
                //}
                //查询当前Action 是否有操作权限,大于0表示有,否则没有
                int count = perm.Where(a => a.ToLower() == actionName.ToLower()).Count();
                if (count > 0)
                {
                    bResult = true;
                }
                else
                {
                    bResult = false;
                    HttpContext.Current.Response.Write("你没有操作权限,请联系管理员!");
                }
            }
            return(bResult);
        }