DarkAngelRev Posted August 5, 2012 at 07:11 PM Report Share #471547 Posted August 5, 2012 at 07:11 PM (edited) Boa tarde, no código que deixo em seguida dá me o erro descrito no titulo, mas como podem ver já tentei fazer um cast e mesmo assim continua a dar erro alguém que já tenha tido situação semelhante me pode dar uma ajuda se faz favor. Dim servico As New WebServiceLoja.WebService Dim resultado As Boolean For Each row As GridViewRow In gvPrimavera.Rows Dim cb As CheckBox = row.FindControl("checkSelection") If cb.Checked = True Then Dim id As Guid = CType(row.Cells(1).Text, Guid) resultado = SincronizarEncomendas(id) End If Next For Each row As GridViewRow In gvCliente.Rows Dim cb As CheckBox = row.FindControl("checkSelection2") If cb.Checked = True Then Dim id As Guid = row.Cells(1).Text resultado = SincronizarEncomendas(id) End If Next If resultado = True Then MsgBox("Sincronização Completa!", MsgBoxStyle.Information, "Sucesso") UncheckAll(gvPrimavera, "checkSelection", "checkAll") UncheckAll(gvCliente, "checkSelection2", "checkAll2") Else MsgBox("Sincronização não efectuada!", MsgBoxStyle.Critical, "Erro") End If Edited August 6, 2012 at 08:06 AM by Caça GeSHi Link to comment Share on other sites More sharing options...
renafi Posted August 5, 2012 at 08:31 PM Report Share #471549 Posted August 5, 2012 at 08:31 PM Guid não consegues converter directamente... Experimenta assim: Dim id As Guid = new Guid(row.Cells(1).Text) Oracle Certified Professional - AdministraçãoOracle Certified Professional - Pl/sqlMCPD - Microsoft Certified Professional DeveloperMCTS - Microsoft Certified Technology Specialist Link to comment Share on other sites More sharing options...
DarkAngelRev Posted August 6, 2012 at 12:23 AM Author Report Share #471557 Posted August 6, 2012 at 12:23 AM Assim deu... Obrigado. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now