87 lines
2.6 KiB
VB.net
87 lines
2.6 KiB
VB.net
Imports EgwProxy.LiMan
|
|
|
|
Public Class Form1
|
|
|
|
|
|
#If DEBUG Then
|
|
|
|
' Indirizzo server (DEBUG)
|
|
'Private servAddr As String = "localhost:5003"
|
|
Private servAddr As String = "liman.egalware.com/ELM.API"
|
|
|
|
#Else
|
|
|
|
' Indirizzo server (DEBUG)
|
|
Private servAddr As String = "liman.egalware.com/ELM.API"
|
|
|
|
#End If
|
|
|
|
|
|
Private commLib As DataSyncro
|
|
|
|
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
|
' esegue test comunicazione server (ping, alive)
|
|
commLib = New DataSyncro(servAddr)
|
|
Dim servOk As Boolean
|
|
servOk = commLib.CheckRemote()
|
|
Dim esito As String = ""
|
|
If (servOk) Then
|
|
esito = "Test Ping: OK"
|
|
Else
|
|
esito = "Test Ping: KO"
|
|
End If
|
|
txtOut.Text = esito
|
|
End Sub
|
|
|
|
Private Async Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
|
' recupera e mostra dati elenco materiali
|
|
commLib = New DataSyncro(servAddr)
|
|
|
|
Dim result As String = ""
|
|
|
|
Dim matList = Await commLib.ReleaseGetAllAsync(txtCodApp.Text)
|
|
If matList IsNot Nothing Then
|
|
|
|
For Each item In matList
|
|
result += $"{item.CodApp} | {item.VersNum} | {item.VersText} | {item.ReleaseDate:yyyy-MM-dd} | upd: {item.IsPermitted}{Environment.NewLine}"
|
|
Next
|
|
End If
|
|
|
|
txtOut.Text = result
|
|
End Sub
|
|
|
|
Private Async Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
|
|
' recupera e mostra dati elenco materiali
|
|
commLib = New DataSyncro(servAddr)
|
|
|
|
Dim result As String = ""
|
|
|
|
Dim matList = Await commLib.ReleaseGetFiltAsync(txtCodApp.Text, txtMinVers.Text)
|
|
If matList IsNot Nothing Then
|
|
|
|
For Each item In matList
|
|
result += $"{item.CodApp} | {item.VersNum} | {item.VersText} | {item.ReleaseDate:yyyy-MM-dd} | upd: {item.IsPermitted}{Environment.NewLine}"
|
|
Next
|
|
End If
|
|
|
|
txtOut.Text = result
|
|
End Sub
|
|
|
|
Private Async Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
|
|
' recupera e mostra dati elenco materiali
|
|
commLib = New DataSyncro(servAddr)
|
|
|
|
Dim result As String = ""
|
|
|
|
Dim matList = Await commLib.ReleaseGetFiltLimitAsync(txtCodApp.Text, txtMinVers.Text, txtMaxVers.Text)
|
|
If matList IsNot Nothing Then
|
|
|
|
For Each item In matList
|
|
result += $"{item.CodApp} | {item.VersNum} | {item.VersText} | {item.ReleaseDate:yyyy-MM-dd} | upd: {item.IsPermitted}{Environment.NewLine}"
|
|
Next
|
|
End If
|
|
|
|
txtOut.Text = result
|
|
End Sub
|
|
End Class
|