62 lines
2.5 KiB
VB.net
62 lines
2.5 KiB
VB.net
|
|
Imports ULA.Davivienda.WCFServiciosCobisGenerales.DAL.Conector
|
|||
|
|
|
|||
|
|
|
|||
|
|
Public Class outConector
|
|||
|
|
|
|||
|
|
Public Sub outConector()
|
|||
|
|
End Sub
|
|||
|
|
|
|||
|
|
Shared Function EjecutarComandoSQLXML(ByVal Proceso As String, ByVal strXML As String, ByVal Modo As Integer) As String
|
|||
|
|
Dim strResultado As String = ""
|
|||
|
|
Dim objConector As Conector.Conector = Nothing
|
|||
|
|
|
|||
|
|
Try
|
|||
|
|
objConector = New Conector.Conector()
|
|||
|
|
objConector.Url = System.Configuration.ConfigurationManager.AppSettings("wsConector")
|
|||
|
|
objConector.Credentials = System.Net.CredentialCache.DefaultCredentials
|
|||
|
|
|
|||
|
|
strResultado = objConector.EjecutarComandoSQLXML(Proceso, strXML, Modo, True)
|
|||
|
|
Catch ex As Exception
|
|||
|
|
Throw ex
|
|||
|
|
Finally
|
|||
|
|
objConector = Nothing
|
|||
|
|
End Try
|
|||
|
|
Return strResultado
|
|||
|
|
End Function
|
|||
|
|
|
|||
|
|
Shared Function EjecutarComandoSQLArreglo(ByVal Proceso As String, ByVal FuenteDatos As String, ByVal ComandoSQL As String, ByVal aNombreParametro() As String, ByVal aValorParametro() As String, ByVal Modo As Integer) As String
|
|||
|
|
Dim strResultado As String = ""
|
|||
|
|
Dim objConector As Conector.Conector = Nothing
|
|||
|
|
Try
|
|||
|
|
objConector = New Conector.Conector()
|
|||
|
|
objConector.Url = System.Configuration.ConfigurationManager.AppSettings("wsConector")
|
|||
|
|
objConector.Credentials = System.Net.CredentialCache.DefaultCredentials
|
|||
|
|
|
|||
|
|
strResultado = objConector.EjecutarComandoSQLArreglo(Proceso, FuenteDatos, ComandoSQL, aNombreParametro, aValorParametro, Modo, True)
|
|||
|
|
Catch ex As Exception
|
|||
|
|
Throw ex
|
|||
|
|
Finally
|
|||
|
|
objConector = Nothing
|
|||
|
|
End Try
|
|||
|
|
Return strResultado
|
|||
|
|
End Function
|
|||
|
|
|
|||
|
|
Shared Function EjecutarComandoSQLXMLDataSet(ByVal strProceso As String, ByVal strFuenteDatos As String, ByVal strSQL As String) As System.Data.DataSet
|
|||
|
|
Dim dsResultado As DataSet = Nothing
|
|||
|
|
Dim objConector As Conector.Conector = Nothing
|
|||
|
|
Try
|
|||
|
|
objConector = New Conector.Conector()
|
|||
|
|
objConector.Url = System.Configuration.ConfigurationManager.AppSettings("wsConector")
|
|||
|
|
objConector.Credentials = System.Net.CredentialCache.DefaultCredentials
|
|||
|
|
|
|||
|
|
dsResultado = objConector.EjecutarComandoSQLXMLDataSet(strProceso, strFuenteDatos, strSQL)
|
|||
|
|
Catch ex As Exception
|
|||
|
|
Throw ex
|
|||
|
|
Finally
|
|||
|
|
objConector = Nothing
|
|||
|
|
End Try
|
|||
|
|
Return dsResultado
|
|||
|
|
End Function
|
|||
|
|
|
|||
|
|
End Class
|