--Se ajusta el método de UpdateViajesPasajeros a todas las variables. Se hacen ajustes visualizes en Boletos y se arregla visibilidad de avisos. Se agrega la columna de vendedor a ViajesPasajeros y en el PA_VPGet y algunas modificaciones estéticas. Se crea la función updateBoleto para poder cambiar de asiento y ruta.

This commit is contained in:
AbrahamCastilloV
2024-02-24 11:06:59 -07:00
parent bf60f3e2a5
commit fbdd16e481
7 changed files with 470 additions and 403 deletions

View File

@@ -59,7 +59,6 @@ Partial Class Boletos
#End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then
If Request.QueryString("CveViaje") Is Nothing And UsuarioActual.CveVendedor <> Nothing And UsuarioActual.CveVendedor <> -1 Then
@@ -73,7 +72,6 @@ Partial Class Boletos
End If
End Sub
Private Sub CargaDatos()
Dim ObjContratos As New ClsContratos
Dim ObjViaje As New ClsTransportes
@@ -131,7 +129,6 @@ Partial Class Boletos
'Boletos Vendidos
End Sub
Protected Sub InicializaCombos()
Dim CveSubProyecto As Integer = Contrato.Rows(0)("CveSubProyecto").ToString.ToEntero
@@ -164,7 +161,6 @@ Partial Class Boletos
'End If
ObjDestinos.Dispose()
End Sub
Protected Sub CotizarTarifa()
If DdlDestino.SelectedValue <> "-1" And DdlPartida.SelectedValue <> "-1" Then
Dim ImporteR As Decimal = 0
@@ -179,6 +175,7 @@ Partial Class Boletos
LbCostos.Text = $"El precio de su boleto es ${ImporteR.FormatoNumero}"
LbCostos.Visible = True
BtnAgregarPasajero.Visible = True
LbAviso.Visible = True
Else
ViewState("Importe") = 0
BtnAgregarPasajero.Visible = False
@@ -190,7 +187,6 @@ Partial Class Boletos
End If
End Sub
Protected Sub OnLinkButtonClick(sender As Object, e As EventArgs)
'quitamos la selección anterior, en caso de existir.
If AsientoSeleccionado <> "" Then
@@ -206,7 +202,6 @@ Partial Class Boletos
UpPanel.Update()
End Sub
Protected Sub FinalizarVenta(sender As Object, e As EventArgs)
Dim SbAlert As New StringBuilder()
@@ -318,20 +313,21 @@ Partial Class Boletos
Alert(SbAlert.ToString(), If(TieneError, TipoMensaje.MsgError, TipoMensaje.MsgInformacion), ShowCloseButton:=False)
End Try
LbAviso.Visible = False
BtnAgregarPasajero.Visible = False
BtnGuardar.Visible = False
LbCostos.Visible = False
UpPanel.Update()
End Sub
Protected Sub DdlPartida_SelectedIndexChanged(sender As Object, e As EventArgs)
DdlDestino.DataSource = DtDestinos.FiltraParametros($"CveDestinoOrigen = {DdlPartida.SelectedValue}")
DdlDestino.DataBind()
DdlDestino.Items.Insert(0, New ListItem("Seleccione Destino", "-1"))
End Sub
Protected Sub DdlDestino_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlDestino.SelectedIndexChanged
CotizarTarifa()
End Sub
Private Sub GeneraPasajeros(Cantidad As Integer)
DtPasajeros.Clear()
For i As Integer = 1 To Cantidad
@@ -343,7 +339,6 @@ Partial Class Boletos
GvB.DataSource = DtPasajeros
GvB.DataBind()
End Sub
Protected Sub AgregarPasajero(sender As Object, e As EventArgs)
If AsientoSeleccionado = "" Then
@@ -392,7 +387,6 @@ Partial Class Boletos
BtnGuardar.Visible = True
UpPanel.Update()
End Sub
Private Function CrearRemision(ByRef objTrans As ClsTransportes) As Modelos.Factura.MMensajeFactura
Dim Retorno As New Modelos.Factura.MMensajeFactura
@@ -481,11 +475,8 @@ Partial Class Boletos
Return Retorno
End Function
'Protected Sub TimerActualizar_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles timerActualizar.Tick
' ScriptManager.RegisterStartupScript(Me, Me.GetType(), "ActualizarTiempo", "actualizarTiempo();", True)
' UpTimer.Update()
'End Sub
End Class