--cancelacion de viajes

This commit is contained in:
2024-02-24 13:02:08 -07:00
parent 19ddffd8a9
commit e90aaa7c73
3 changed files with 23 additions and 3 deletions

View File

@@ -214,6 +214,25 @@ Public Class ClsTransportes
Return Retorno Return Retorno
End Function
Public Function CancelarViaje(CveViajePasajero As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Trans_ViajesPasajerosCancelarUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveViajePasajero", SqlDbType.Int).Value = CveViajePasajero
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al cancelar el boleto.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function End Function
Public Function GetRemisionBoleto(CveViajePasajero As Integer, CveEmpresa As Integer) As Boolean Public Function GetRemisionBoleto(CveViajePasajero As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False

View File

@@ -5246,7 +5246,7 @@ Namespace Modelos
End If End If
If Not TieneError Then If Not TieneError Then
If Not ObjTransportes.UpdateViajesPasajeros(CveViajePasajero) Then If Not ObjTransportes.CancelarViaje(CveViajePasajero) Then
TieneError = True TieneError = True
End If End If
End If End If
@@ -5259,8 +5259,10 @@ Namespace Modelos
TieneError = True TieneError = True
End If End If
End If End If
If Not ObjEventos.AddEventoBitacora("se canceló el boleto:" & Row("Obs").ToString(), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVenta) Then If Not ObjEventos.AddEventoBitacora("se canceló el boleto:" & Row("Obs").ToString(), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVenta) Then
ErrorList.Add("Ocurrió un error al agregar la bitacora de cancelación de boleto.") ErrorList.Add("Ocurrió un error al agregar la bitacora de cancelación de boleto.")
TieneError = True
End If End If
If Not TieneError Then If Not TieneError Then
@@ -5277,7 +5279,6 @@ Namespace Modelos
End If End If
End If End If
End If End If
End If End If
Catch ex As Exception Catch ex As Exception
TieneError = True TieneError = True

View File

@@ -120,7 +120,7 @@ Partial Class ListadoBoletos
Else Else
'SI NO TIENE VENTA, SOLO CANCELAR EL BOLETO 'SI NO TIENE VENTA, SOLO CANCELAR EL BOLETO
Dim ObjTran2 As New ClsTransportes Dim ObjTran2 As New ClsTransportes
If Not ObjTran2.UpdateViajesPasajeros(CveViajePasajero, Activar:=cambiarEstatus, Estatus:=cambiarEstatus) Then If Not ObjTran2.CancelarViaje(CveViajePasajero) Then
TieneError = True TieneError = True
End If End If
ObjTran2.Dispose() ObjTran2.Dispose()