--Se arregló el PA_Trans_ViajesPasajerosAdd

This commit is contained in:
AbrahamCastilloV
2023-12-26 20:57:43 -07:00
parent 6b0047351a
commit cdfa334cd0
3 changed files with 10 additions and 3 deletions

View File

@@ -244,7 +244,7 @@ Public Class ClsTransportes
Public Function AddViajesPasajeros(CveViaje As Integer, CveDestinoOrigen As Integer, CveDestinoFinal As Integer, Importe As Decimal, Asiento As Integer, Nombre As String, Visa As String, Celular As String, Sexo As Boolean, Observacion As String, CveUsuario As Integer) As Integer Public Function AddViajesPasajeros(CveViaje As Integer, CveDestinoOrigen As Integer, CveDestinoFinal As Integer, Importe As Decimal, Asiento As Integer, Nombre As String, Visa As String, Celular As String, Sexo As Boolean, Observacion As String, CveUsuario As Integer) As Integer
Dim Retorno As Integer = -1 Dim Retorno As Integer = -1
DataAdapter("PA_Trans_ViajesAdd") DataAdapter("PA_Trans_ViajesPasajerosAdd")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveViajePasajero", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@CveViajePasajero", SqlDbType.Int).Direction = ParameterDirection.Output

View File

@@ -152,12 +152,13 @@ Partial Class Boletos
If retorno > 1 Then If retorno > 1 Then
ObjTransporte.Commit() ObjTransporte.Commit()
Alert("Boleto creado correctamente.")
End If End If
Catch ex As Exception Catch ex As Exception
Alert($"No se pudo generar el boleto {ex}", TipoMensaje.MsgError) Alert($"No se pudo generar el boleto {ex}", TipoMensaje.MsgError)
Finally Finally
ObjTransporte.Dispose() ObjTransporte.Dispose()
Response.Redirect($"/Transportes/Boletos.aspx?CveViaje={CveViaje}")
End Try End Try
End Sub End Sub

View File

@@ -51,7 +51,13 @@ Partial Class ListadoBoletos
Try Try
ObjTransportes.IniciaTransacSQL() ObjTransportes.IniciaTransacSQL()
If ObjTransportes.UpdateViajesPasajeros(CveViajePasajero.ToEntero, Activar:=True, Estatus:=cambiarEstatus) Then If ObjTransportes.UpdateViajesPasajeros(CveViajePasajero.ToEntero, Activar:=True, Estatus:=cambiarEstatus) Then
Alert("El boleto ha sido cancelado correctamente.")
If cambiarEstatus Then
Alert($"El boleto ha sido cancelado correctamente.")
Else
Alert($"El boleto ha sido reactivado correctamente.")
End If
End If End If
ObjTransportes.Commit() ObjTransportes.Commit()