Advertisement
Guest User

Algo así

a guest
Nov 8th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 2.19 KB | None | 0 0
  1. Imports System.Web.Services
  2. Imports System.Threading
  3. Imports CLC.CUENTASCORRIENTES.COMUN
  4. Imports System.Configuration.ConfigurationManager
  5. Public Class BLMain
  6.     Inherits ZCL.ZCLClass
  7.  
  8.     Public Sub New(User As Usuario)
  9.         MyBase.New(User)
  10.     End Sub
  11.  
  12.  
  13.     Public Function Registra_Respuesta(Codigo_transaccion As String, Nro_Identificador As String, _
  14.                                        Nro_Siniestro As String, Codigo_Respuesta As String, _
  15.                                        Mensaje_Respuesta As String) As Main.WSRespuesta
  16.  
  17.         Dim Respuesta As Main.WSRespuesta = Nothing
  18.         Dim Glosa As String
  19.         Dim Conexion As New ZCL.ZCLConnection(_ConnectionStringGSGARW)
  20.         Conexion.Open()
  21.         Conexion.BeginTransaction()
  22.  
  23.         Glosa = Format(Val(Codigo_Respuesta), "00") & " - " & Mensaje_Respuesta.ToString
  24.  
  25.         Conexion.CommandText = " Update valpo.Transacciones_Workflow " & _
  26.               "Set Fec_Respuesta = GetDate() , " & "Cod_Estado = 3 , " & _
  27.               " Glosa = '" & Glosa.ToString & _
  28.               "' Where Tip_Transaccion = '" & Codigo_transaccion.ToUpper & "' And Nro_Llamada = " & Nro_Identificador.ToString
  29.         Try
  30.             If Conexion.ExecuteNonQuery Then
  31.                 Dim Filas_Actualizadas As Integer = Conexion.numberRowsAffected
  32.  
  33.                 Conexion.Commit()
  34.                 If Filas_Actualizadas = 0 Then
  35.                     Respuesta.Men_Retorno = "No se pudo Registrar Id. de Llamada."
  36.                 Else
  37.                     Respuesta.Men_Retorno = _ConnectionStringGSGARW
  38.  
  39.                     ' Aquí agregar llamado SQL para deolver más datos si se requiere
  40.                     Conexion.CommandText = " SELECT * FROM valpo.Transacciones_Workflow Where Tip_Transaccion = '" & Codigo_transaccion.ToUpper & "' And Nro_Llamada = " & Nro_Identificador.ToString
  41.  
  42.                     ' ALGO ASI?
  43.                 End If
  44.  
  45.             Else
  46.                 Conexion.Rollback()
  47.                 Respuesta.Men_Retorno = "No se pudo Registrar Id. de Llamada."
  48.             End If
  49.         Catch ex As Exception
  50.             Respuesta.Men_Retorno = ex.Message
  51.         End Try
  52.  
  53.         Conexion.Close()
  54.  
  55.         Return Respuesta
  56.  
  57.     End Function
  58.  
  59. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement