-- cambios en revisión

This commit is contained in:
2023-12-21 09:01:18 -07:00
parent 3f184fe79d
commit 69ddbc3e23
2 changed files with 80 additions and 19 deletions

View File

@@ -1,5 +1,4 @@

Imports Extensiones
Imports Extensiones
Partial Class Boletos
Inherits ClsPaginas
@@ -20,11 +19,11 @@ Partial Class Boletos
End Set
End Property
Private Property CveViaje As Decimal
Private Property CveViaje As Integer
Get
Return ViewState("CveViaje").ToString().ToDecimal
Return ViewState("CveViaje").ToString().toentero
End Get
Set(value As Decimal)
Set(value As Integer)
ViewState("CveViaje") = value
End Set
End Property
@@ -38,8 +37,8 @@ Partial Class Boletos
CveViaje = Request.QueryString("CveViaje").ToEntero
DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True
CargaDatos()
InicializaCombos()
CargaDatos()
End If
End Sub
@@ -47,11 +46,15 @@ Partial Class Boletos
Private Sub CargaDatos()
'Datos Viaje
Dim ObjViaje As New ClsTransportes
Dim retorno = ObjViaje.GetViajes(CveViaje.ToEntero, UsuarioActual.CveEmpresa)
Dim retorno As Boolean = ObjViaje.GetViajes(CveViaje.ToEntero, UsuarioActual.CveEmpresa)
If retorno Then
TxtRuta.Text = ObjViaje.Ruta.ToString
'TxtRuta.Text = ObjViaje.Ruta.ToString
TxtFecha.Text = ObjViaje.Fecha.ToString
End If
End Sub
Protected Sub InicializaCombos()
'Lista Destinos''carga específicos
Dim ObjDestinos As New ClsDestinos()
If ObjDestinos.GetDestinos(-1, -1, -1, "", True, True, DateTime.Now) Then
@@ -69,21 +72,17 @@ Partial Class Boletos
End If
End Sub
Protected Sub InicializaCombos()
End Sub
Protected Sub CotizarTarifa(sender As Object, e As EventArgs)
If DdlDestino.SelectedValue <> "" And DdlPartida.SelectedValue <> "" Then
Dim ObjDestinos As New ClsTransportes()
If ObjDestinos.GetDestinosTarifas(DdlDestino.SelectedValue.ToEntero, DdlPartida.SelectedValue.ToEntero) Then
If ObjDestinos.Importe > 0 Then
TxtCosto.Text = $"El precio de su boleto es ${ObjDestinos.Importe}"
If ObjDestinos.GetDestinosTarifas(DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero) Then
Dim tImporte As Decimal = ObjDestinos.DtResultados.FiltroPrimeroValor("Importe").ToDecimal
If tImporte > 0 Then
TxtCosto.Text = $"El precio de su boleto es ${tImporte}"
BtnGuardar.Visible = True
upPanel.Visible = True
Importe = ObjDestinos.Importe.ToEntero
Importe = tImporte
Else
TxtCosto.Text = ""
BtnGuardar.Visible = False
@@ -114,7 +113,9 @@ Partial Class Boletos
ObjTransporte.IniciaTransacSQL()
Try
Dim retorno As Integer = ObjTransporte.AddViajePasajero(CveViaje.ToEntero, DdlPartida.Text.ToEntero, DdlDestino.Text.ToEntero, 0.0, asientoSeleccionado, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text, UsuarioActual.CveUsuario)
asientoSeleccionado = asientoSeleccionado.Replace("A", "")
Dim retorno As Integer = ObjTransporte.AddViajePasajero(CveViaje, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero, 0.0, asientoSeleccionado.ToEntero,
TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text, UsuarioActual.CveUsuario)
If retorno > 1 Then
ObjTransporte.Commit()