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 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
| Public Class operation 'declaration de de la classe opération
Private dateO, type, desc, debit, credit, solde As String
' parametre du constructeur
Public Sub New(ByVal dateC As String, ByVal typeC As String, ByVal descC As String, ByVal debitC As String, ByVal creditC As String, ByVal soldeC As String)
dateO = dateC
type = typeC
desc = descC
debit = debitC
credit = creditC
solde = soldeC
End Sub
Property dateC() As String '
Get
Return dateO
End Get
Set(ByVal Value As String)
dateO = Value
End Set
End Property
Property typeC() As String '
Get
Return type
End Get
Set(ByVal Value As String)
type = Value
End Set
End Property
Property descC() As String '
Get
Return desc
End Get
Set(ByVal Value As String)
desc = Value
End Set
End Property
Property debitC() As String '
Get
Return debit
End Get
Set(ByVal Value As String)
debit = Value
End Set
End Property
Property creditC() As String '
Get
Return credit
End Get
Set(ByVal Value As String)
credit = Value
End Set
End Property
Property soldeC() As String '
Get
Return solde
End Get
Set(ByVal Value As String)
solde = Value
End Set
End Property
ReadOnly Property affiche() As String()
Get
Dim row As String() = {dateC(), typeC(), descC(), debitC(), creditC(), soldeC()}
Return row
End Get
End Property
End Class
Private Sub PrintOPE()
Dim i As Integer
Dim c0 As String
Dim c1 As String
Dim c2 As String
Dim c3 As String
Dim c4 As String
Dim c5 As String
Dim Tligne(nbOPE) As operation
For i = 1 To nbOPE
courant = courant.FirstChild
c0 = courant.InnerText
courant = courant.NextSibling
c1 = courant.InnerText
courant = courant.NextSibling
c2 = courant.InnerText
courant = courant.NextSibling
c3 = courant.InnerText
courant = courant.NextSibling
c4 = courant.InnerText
courant = courant.NextSibling
c5 = courant.InnerText
Tligne(i) = New operation(c0, c1, c2, c3, c4, c5)
With Me.tope.Rows
.Add(Tligne(i).affiche())
End With
courant = courant.ParentNode
courant = courant.NextSibling
Next
End Sub |
Partager