Scusate sono di nuovo a chiedervi aiuto.
Con questo codice invio il dettaglio delle prestazioni erogate ma se c'e una sola prestazione funziona mentre se ce ne sono piu di una praticamente invia solo l'ultima.
non so..credo sia una cretinata ma non ci arrivo...
questo il codice.
Dim RichiInv(Xe) As WsInvioErogato.dettaglioPrescrizioneInvioErogatoType
While lrd3.Read()
RichiInv(Xe) = New WsInvioErogato.dettaglioPrescrizioneInvioErogatoType()
With RichiInv(Xe)
' codice
.codProdPrest = RTrim(lrd3(0).ToString)
If Len(RTrim(lrd3(9).ToString)) > 0 Then
.descrTestoLiberoNote = RTrim(lrd3(9).ToString)
End If
.codProdPrestErog = RTrim(lrd3(0).ToString)
If Len(Trim(lrd3(8))) = 0 Then
.descrProdPrestErog = lrd3(2)
Else
.descrProdPrestErog = lrd3(8)
End If
.codBranca = RTrim(LTrim(lrd3(3))) 'row(3)
.prezzo = lrd3(4).ToString() 'row(4)
.ticketConfezione = "0"
.diffGenerico = "0"
.quantitaErogata = lrd3(5) '
.dataIniErog = CDate(lrd3(6)).ToString("yyyy-MM-dd hh:mm:ss") '"2016-06-22 12:12:12"
.dataFineErog = CDate(lrd3(7)).ToString("yyyy-MM-dd hh:mm:ss") '"2016-06-22 12:12:12"' va preso da fatambline
.prezzoRimborso = "0"'row(7)
.onereProd = "0"
.scontoSSN = "0"
.extraScontoIndustria = "0"
.extraScontoPayback = "0"
.extraScontoDL31052010 = "0"
'codice
.codCatalogoPrescr = RTrim(lrd3(1).ToString)
If lrd3(10) > 0 Then
.garanziaTempiMax = lrd3(10)
.dataPrenotazione = CDate(lrd3(11)).ToString("yyyy-MM-dd hh:mm:ss")
End If
Xe2 = Xe2 + 1
End With
End While
er2.ElencoDettagliPrescrInviiErogato = RichiInv
Dove e' l errore?
grazie.