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
| Function Rafraichissement_LSI()
Dim fileR As StreamReader
Dim fileW As StreamWriter
Dim ts As FileStream
Dim i, j As Integer
Dim tbl_string() As String
Dim cellule As String = listder_cellule.Text
Dim Date_debut As String = Date_deb.Text
Dim Date_final As String = Date_fin.Text
Dim logiciel As String = listder_lib_logi_micro.Text
Dim type_incident As String = listder_type_incident.Text
Dim domaine As String = listder_domaine_info.Text
MsgBox(Date_debut)
MsgBox(Date_final)
MsgBox(cellule)
MsgBox(logiciel)
MsgBox(type_incident)
MsgBox(domaine)
'modification de la date de traitement dans le fichier de paramètres Parambo.txt pour le prochain rafraichissement des requetes LSI
Dim file As New System.IO.StreamReader("\\beaqae\HDC_ESPACE_COMMUN\Statistiques\Applications\Developpements\Suivi_TR_NIV2\Parambo.txt")
i = 1
Do
ReDim Preserve tbl_string(i)
tbl_string(i) = file.ReadToEnd
If tbl_string(i) = "END" Then
Exit Do
End If
If tbl_string(i) Like "N,Cell = %" = True Then
tbl_string(i) = "N,Cell = " & cellule
End If
If tbl_string(i) Like "D,Date_deb = %" = True Then
tbl_string(i) = "D,Date_deb = " & Date_debut
End If
If tbl_string(i) Like "D,Date_fin = %" = True Then
tbl_string(i) = "D,Date_fin = " & Date_final
End If
If tbl_string(i) Like "N,Logiciel = %" = True Then
tbl_string(i) = "N,Logiciel = " & logiciel
End If
If tbl_string(i) Like "N,Type = %" = True Then
tbl_string(i) = "N,Type = " & type_incident
End If
If tbl_string(i) Like "N,Domaine = %" = True Then
tbl_string(i) = "N,Domaine = " & domaine
End If
i = i + 1
Loop
file.Close()
file = Nothing
Dim file1 As New System.IO.StreamWriter("\\beaqae\HDC_ESPACE_COMMUN\Statistiques\Applications\Developpements\Suivi_TR_NIV2\Parambo.txt")
For j = 1 To i
file1.WriteLine(tbl_string(j))
Next
file1.Close()
file1 = Nothing
End Function |
Partager