1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
| ' Classe définissant les champs autorisés
Public Class Champ_Autori
Private _TblName As String
Private _FldName As String
Private _Visible As Boolean
Private _CanUpdate As Boolean
' Nom de la table
Public Property TblName As String
Get
Return _TblName
End Get
Set(ByVal value As String)
_TblName = value
End Set
End Property
' Nom du champ dans la table
Public Property FldName As String
Get
Return _FldName
End Get
Set(ByVal value As String)
_FldName = value
End Set
End Property
' Le champ peut-il être affiché ?
Public Property Visible As Boolean
Get
Return _Visible
End Get
Set(ByVal value As Boolean)
_Visible = value
End Set
End Property
' Le champ peut-il être mis à jour ?
Public Property CanUpdate As Boolean
Get
Return _CanUpdate
End Get
Set(ByVal value As Boolean)
_CanUpdate = value
End Set
End Property
' Récupération d'un poste champ autorisé dans la liste
Public Function get_Champ_Autori(tbl As String, fld As String) As Champ_Autori
' trouve le couple Table / Champ dans la liste
Dim found_Value As Champ_Autori = champs_Autorisations.Find(Function(c) c.TblName = tbl And c.FldName = fld)
Return found_Value
End Function
End Class |