Example #1
0
 /// <summary>
 /// 根据用户Id和控制器获取用户操作权限
 /// </summary>
 /// <param name="accountId">accountId</param>
 /// <param name="controller">controller</param>
 /// <returns></returns>
 public List <PermModel> GetPermission(string accountId, string controller)
 {
     using (DBContainer db = new DBContainer())
     {
         var rights = db.P_Sys_GetRightOperate2(accountId, controller);
         List <PermModel> permList = (from r in rights
                                      select new PermModel
         {
             KeyCode = r.KeyCode,
             IsValid = r.IsValid
         }).ToList();
         return(permList);
     }
 }