Private Sub OpenActiveFile As Boolean
If File.Exists(PathPhone,ActiveFile) = False Then
Serveur.Download(ActiveFile)
Return False
End If
If SQLactif.IsInitialized = False Then
SQLactif.Initialize(PathPhone, ActiveFile, False)
End If
For i=0 To CommandeSQL.NbLigne(SQLactif)-1
Dim l As LigneSQL = CommandeSQL.ExtractLigne(SQLactif,i+1)
Dim iv As itemValue
iv.Initialize
CLV.Add(CreateItemLigneCompte(Fonction.DateNumToStr(l.date),NomUtilisateur,l.nature,l.prix,l.sended,iv),60dip,iv)
DateOnIndex.Put(i,l.date)
If l.sended = 0 Then
SQLneedUpload = True
End If
Next
Log($"
La liste : ${ActiveFile} à bien été ajoutée
"$)
Return True
End Sub
Public Sub DateNumToStr(date As Date) As String
Dim moisStr As String
Select date.mois
Case 1
moisStr="Janv."
Case 2
moisStr="Fev."
Case 3
moisStr="Mars"
Case 4
moisStr="Avril"
Case 5
moisStr="Mai"
Case 6
moisStr="Juin"
Case 7
moisStr="Juil."
Case 8
moisStr="Août"
Case 9
moisStr="Sept."
Case 10
moisStr="Oct."
Case 11
moisStr="Nov."
Case 12
moisStr="Dec."
End Select
Dim r As String = date.jour & " " & moisStr & " " & date.annee
Return r
End Sub