public static Permissions GetPermissionsByUserID(int id)
 {
     if (id > -1)
     {
         Permissions perms = new Permissions();
         int errorCode;
         IList<UserControlPermission> controlPermissions = DAL.DAL.ExecuteDataReader("S_User_ControlPermissions", FillUserControlPermission, out errorCode,
                 DAL.DAL.Parameter("UserID", id));
         //Executable actions
         IList<UserPermission> permissions = DAL.DAL.ExecuteDataReader("S_User_Permissions", FillUserPermission, out errorCode,
             DAL.DAL.Parameter("UserID", id));
         if (permissions.Count > 0)
         {
             //Permission heeft altijd een control, zonder permissie geen access en geen notie
             //getpermissions true = allow false = deny
             foreach (UserControlPermission perm in controlPermissions)
                 perms.addPermission(perm.Control, perm.AccessValue);
             foreach (UserPermission perm in permissions)
                 perms.addPermission(perm.Control, perm.AccessValue, perm.Permission);
         }
         return perms;
     }
     else
     {
         throw new Exception("User ID nog niet ingesteld");
     }
 }