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
| Imports Microsoft.VisualBasic
Imports System.Collections.Generic
Public Class Destinataires
Public Shared Function Liste()
Dim ListeEmails As New List(Of Email)
If System.Web.HttpContext.Current.Session.Item("emails") <> "" Then
ListeEmails = CType(System.Web.HttpContext.Current.Session.Item("emails"), List(Of Email))
End If
Return ListeEmails
End Function
Public Shared Sub Ajout(ByVal s As String)
Dim ListeEmails As New List(Of Email)
If System.Web.HttpContext.Current.Session.Item("emails") <> "" Then
ListeEmails = System.Web.HttpContext.Current.Session.Item("emails")
ListeEmails.Add(New Email(ListeEmails.Count, s))
End If
End Sub
Public Class Email
Sub New(ByVal _id As Integer, ByVal _email As String)
Me.id = _id
Me.email = _email
End Sub
Private _email As String
Public Property email() As String
Get
Return _email
End Get
Set(ByVal value As String)
_email = value
End Set
End Property
Private _id As String
Public Property id() As String
Get
Return _id
End Get
Set(ByVal value As String)
_id = value
End Set
End Property
End Class
End Class |
Partager