Ejemplo n.º 1
0
 /// <summary>
 /// 取角色模块的操作权限,用于权限控制
 /// </summary>
 /// <param name="accountid">acount Id</param>
 /// <param name="controller">url</param>
 /// <returns></returns>
 public List <PermModel> GetPermission(int accountid, string controller)
 {
     using (OriginEntities db = new OriginEntities())
     {
         List <PermModel> rights = (from r in db.P_Sys_GetRightOperate(accountid, controller)
                                    select new PermModel
         {
             KeyCode = r.KeyCode,
             IsValid = r.IsValid
         }).ToList();
         return(rights);
     }
 }