--Cambios en Boletos, parece que se duplicaron id's
This commit is contained in:
@@ -20,7 +20,6 @@ Partial Class Boletos
|
||||
ViewState("Importe") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveViaje As Integer
|
||||
Get
|
||||
Return ViewState("CveViaje").ToString().ToEntero
|
||||
@@ -59,13 +58,15 @@ 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
|
||||
Dim cph As ContentPlaceHolder = CType(Me.Master.FindControl("C"), ContentPlaceHolder)
|
||||
For Each dr As DataRow In dt.Rows
|
||||
@@ -75,7 +76,6 @@ Partial Class Boletos
|
||||
lnk.CssClass = "nodisponible"
|
||||
lnk.ToolTip = dr("Nombre").ToString
|
||||
End If
|
||||
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
@@ -85,6 +85,10 @@ Partial Class Boletos
|
||||
|
||||
Protected Sub InicializaCombos()
|
||||
'Lista Destinos''carga específicos
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub CargaDestinos()
|
||||
Dim ObjDestinos As New ClsTransportes()
|
||||
|
||||
If ObjDestinos.GetDestinos(CveRuta:=CveRuta) Then
|
||||
@@ -102,20 +106,18 @@ Partial Class Boletos
|
||||
End If
|
||||
ObjDestinos.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub CotizarTarifa(sender As Object, e As EventArgs)
|
||||
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
|
||||
@@ -177,4 +179,12 @@ Partial Class Boletos
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub DdlPartida_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CotizarTarifa(sender, e)
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlDestino_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CotizarTarifa(sender, e)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user