--cancelacion de viajes
This commit is contained in:
@@ -214,6 +214,25 @@ Public Class ClsTransportes
|
||||
|
||||
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
|
||||
Public Function GetRemisionBoleto(CveViajePasajero As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -5246,7 +5246,7 @@ Namespace Modelos
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
If Not ObjTransportes.UpdateViajesPasajeros(CveViajePasajero) Then
|
||||
If Not ObjTransportes.CancelarViaje(CveViajePasajero) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
@@ -5259,8 +5259,10 @@ Namespace Modelos
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
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.")
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
@@ -5277,7 +5279,6 @@ Namespace Modelos
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
TieneError = True
|
||||
|
||||
@@ -120,7 +120,7 @@ Partial Class ListadoBoletos
|
||||
Else
|
||||
'SI NO TIENE VENTA, SOLO CANCELAR EL BOLETO
|
||||
Dim ObjTran2 As New ClsTransportes
|
||||
If Not ObjTran2.UpdateViajesPasajeros(CveViajePasajero, Activar:=cambiarEstatus, Estatus:=cambiarEstatus) Then
|
||||
If Not ObjTran2.CancelarViaje(CveViajePasajero) Then
|
||||
TieneError = True
|
||||
End If
|
||||
ObjTran2.Dispose()
|
||||
|
||||
Reference in New Issue
Block a user