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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
| Imports Microsoft.Office.InfoPath
Imports System
Imports System.Xml
Imports System.Xml.XPath
Imports demande_de_congé2
Namespace demande_de_congé
Public Class FormCode
' Les variables membres ne sont pas prises en charge dans les formulaires activés pour le navigateur.
' À la place, écrire et lire ces valeurs à partir de FormState
' dictionnaire utilisant du code tel que le suivant*:
'
' Private Property _memberVariable() As Object
' Get
' _memberVariable = FormState("_memberVariable")
' End Get
' Set
' FormState("_memberVariable") = value
' End Set
' End Property
' REMARQUE*: la procédure suivante est requise par Microsoft Office InfoPath.
' Elle peut être modifiée à l'aide de Microsoft Office InfoPath.
Private Sub InternalStartup(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Startup
AddHandler EventManager.FormEvents.Loading, AddressOf FormEvents_Loading
AddHandler EventManager.XmlEvents("/my:mesChamps/my:Employe_Nom").Validating, AddressOf Employe_Nom_Validating
AddHandler EventManager.FormEvents.ViewSwitched, AddressOf FormEvents_ViewSwitched
AddHandler DirectCast(EventManager.ControlEvents("CTRL38_5"), ButtonEvent).Clicked, AddressOf CTRL38_5_Clicked
End Sub
'--- Chargement initial du formulaire
Private Sub Form_Load()
RefreshForm()
End Sub
'--- Modification du nom dans la liste déroulante
Private Sub Ctrl_Employe_Nom_Click()
Dim Requery As String
Requery()
RefreshForm()
End Sub
'--- Click sur le bouton ajouter
Private Sub Cmd_Add_Click()
Dim Employe_Nom As String
Employe_Nom.Value = Ctrl_Employe_Nom.Value
Cmd_Update_Click()
Ctrl_Employe_NOM.Requery()
End Sub
'--- Click sur le bouton modifier
Private Sub Cmd_Update_Click()
Dim Refresh As String
Refresh()
End Sub
'--- Mise à jour de l'affichage
Private Sub RefreshForm()
Dim x As Boolean
If Recordset.RecordCount = 1 Then x = True
Cmd_Add.Visible = Not x
Cmd_Update.Visible = x
End Sub
Public Sub FormEvents_Loading(ByVal sender As Object, ByVal e As LoadingEventArgs)
' Tapez votre code ici.
End Sub
Public Sub Employe_Nom_Validating(ByVal sender As Object, ByVal e As XmlValidatingEventArgs)
' Tapez votre code ici.
End Sub
Public Sub FormEvents_ViewSwitched(ByVal sender As Object, ByVal e As ViewSwitchedEventArgs)
' Tapez votre code ici.
End Sub
Public Sub CTRL38_5_Clicked(ByVal sender As Object, ByVal e As ClickedEventArgs)
End Sub
End Class
End Namespace |
Partager