- traspaso

This commit is contained in:
2024-01-15 17:53:50 -07:00
parent 4c9ffc031c
commit bd29b29394
5 changed files with 205 additions and 205 deletions

View File

@@ -59,13 +59,16 @@ Partial Class Boletos
'Datos Viaje
Dim ObjViaje As New ClsTransportes
Dim retornoViaje As Boolean = ObjViaje.GetViajes(CveViaje, UsuarioActual.CveEmpresa)
ViewState("CveRuta") = ObjViaje.CveRuta
If retornoViaje Then
If retornoViaje AndAlso ObjViaje.CveViaje > 0 Then
CveRuta = ObjViaje.CveRuta
TxtRuta.Text = ObjViaje.Ruta
TxtFecha.Text = ObjViaje.Fecha.ToShortDateString
CargaDestinos()
'Boletos Vendidos
Dim dt As DataTable
If ObjViaje.GetViajesPasajeros(CveViaje, Estatus:=True) Then 'Poner párametro para estatus y cancelado de viajes
If ObjViaje.GetViajesPasajeros(CveViaje, Estatus:=1) Then 'Poner párametro para estatus y cancelado de viajes
dt = ObjViaje.DtResultados
dt = ObjViaje.DtResultados
Dim cph As ContentPlaceHolder = CType(Me.Master.FindControl("C"), ContentPlaceHolder)
For Each dr As DataRow In dt.Rows
@@ -75,7 +78,6 @@ Partial Class Boletos
lnk.CssClass = "nodisponible"
lnk.ToolTip = dr("Nombre").ToString
End If
Next
End If
End If
@@ -85,6 +87,10 @@ Partial Class Boletos
Protected Sub InicializaCombos()
'Lista Destinos''carga específicos
End Sub
Private Sub CargaDestinos()
Dim ObjDestinos As New ClsTransportes()
If ObjDestinos.GetDestinos(CveRuta:=CveRuta) Then
@@ -102,20 +108,18 @@ Partial Class Boletos
End If
ObjDestinos.Dispose()
End Sub
Protected Sub CotizarTarifa(sender As Object, e As EventArgs)
Private Sub CotizarTarifa()
If DdlDestino.SelectedValue <> "" And DdlPartida.SelectedValue <> "" Then
Dim ObjDestinos As New ClsTransportes()
Dim retorno As Boolean = ObjDestinos.GetDestinosTarifas(DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero)
Dim ImporteR As Decimal = ObjDestinos.DtResultados.FiltroPrimeroValor("Importe").ToDecimal
Dim ImporteR As Decimal = ObjDestinos.DtResultados.FiltroPrimeroValor("Importe").ToDecimal.RoundSQL
ObjDestinos.Dispose()
If retorno Then
If ImporteR > 0 Then
Dim redondeado As String = CStr(Math.Round(ImporteR, 2))
ViewState("Importe") = redondeado
TxtCosto.Text = $"El precio de su boleto es ${Importe}"
ViewState("Importe") = ImporteR
TxtCosto.Text = $"El precio de su boleto es ${ImporteR.FormatoNumero}"
BtnGuardar.Visible = True
upPanel.Visible = True
Else
@@ -175,4 +179,12 @@ Partial Class Boletos
End Sub
Protected Sub DdlPartida_SelectedIndexChanged(sender As Object, e As EventArgs)
CotizarTarifa()
End Sub
Protected Sub DdlDestino_SelectedIndexChanged(sender As Object, e As EventArgs)
CotizarTarifa()
End Sub
End Class