diff --git a/App_Code/ClsTransportes.vb b/App_Code/ClsTransportes.vb index d1c65a7c6..1ea521d8a 100644 --- a/App_Code/ClsTransportes.vb +++ b/App_Code/ClsTransportes.vb @@ -186,13 +186,23 @@ Public Class ClsTransportes Return Retorno End Function - Public Function UpdateViajesPasajeros(CveViajePasajero As Integer, Optional Estatus As Boolean = True, Optional Activar As Boolean = False) As Boolean + Public Function UpdateViajesPasajeros(CveViajePasajero As Integer, Optional CveViaje As Integer = -1, Optional CveVendedor As Integer = -1, Optional Importe As Decimal = -1, Optional Asiento As Integer = -1, Optional Nombre As String = "", Optional Visa As String = "", Optional Celular As String = "", Optional Observacion As String = "", Optional Estatus As Boolean = True, Optional CveUsuario As Integer = -1, Optional Sexo As Boolean = True) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Trans_ViajesPasajerosUpdate") With SqlAdapter.SelectCommand.Parameters .Add("@CveViajePasajero", SqlDbType.Int).Value = CveViajePasajero - .Add("@Estatus", SqlDbType.Int).Value = Estatus + .Add("@CveViaje", SqlDbType.Int).Value = CveViaje + .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor + .Add("@Importe", SqlDbType.SmallMoney).Value = Importe + .Add("@Asiento", SqlDbType.TinyInt).Value = Asiento + .Add("@Nombre", SqlDbType.VarChar).Value = Nombre + .Add("@Visa", SqlDbType.VarChar).Value = Visa + .Add("@Celular", SqlDbType.VarChar).Value = Celular + .Add("@Observacion", SqlDbType.VarChar).Value = Observacion + .Add("@Estatus", SqlDbType.Bit).Value = Estatus + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@Sexo", SqlDbType.Bit).Value = Sexo End With Try diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index a389e480f..76f467007 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -5243,7 +5243,7 @@ Namespace Modelos End If If Not TieneError Then - If Not ObjTransportes.UpdateViajesPasajeros(CveViajePasajero, Activar:=False, Estatus:=False) Then + If Not ObjTransportes.UpdateViajesPasajeros(CveViajePasajero) Then TieneError = True End If End If diff --git a/Transportes/Boletos.aspx b/Transportes/Boletos.aspx index 8010db45b..81bc24dfe 100644 --- a/Transportes/Boletos.aspx +++ b/Transportes/Boletos.aspx @@ -85,13 +85,12 @@ -
<%-- Boleto --%>
- <%-- Datos del Cliente --%> + <%-- Datos del Pasajero --%>
@@ -149,7 +148,7 @@
- + @@ -168,7 +167,7 @@
- <%-- Datos del Viaje y Destinos --%> + <%-- Datos del Viaje --%>
@@ -237,14 +236,14 @@
<%-- Botón para Agregar Pasajero(Oculto) --%> -
-

information: Los boletos están siendo apartados hasta finalizar su compra

- - - +
+
+

information: Los boletos están siendo apartados hasta finalizar su compra

+ +
<%-- Listado de Boletos --%>
diff --git a/Transportes/Boletos.aspx.vb b/Transportes/Boletos.aspx.vb index 124d7ce1e..0e1379e8c 100644 --- a/Transportes/Boletos.aspx.vb +++ b/Transportes/Boletos.aspx.vb @@ -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 diff --git a/Transportes/RepBoletos.aspx.vb b/Transportes/RepBoletos.aspx.vb index 45e636fa7..30f227a4b 100644 --- a/Transportes/RepBoletos.aspx.vb +++ b/Transportes/RepBoletos.aspx.vb @@ -1,88 +1,88 @@ -Option Explicit On -Option Strict On - -Imports System.Data -Imports ADSNetLibrary.Helpers -Imports ADSNetLibrary.SIGAPI.Helpers -Imports Extensiones.ModExtensiones -Imports Microsoft.Reporting.WebForms - -Partial Class ListadoBoletos - Inherits ClsPaginas - Private Property CveViaje As Integer - Get - Return ViewState("CveViaje").ToString().ToEntero - End Get - Set(value As Integer) - ViewState("CveViaje") = value - End Set - End Property - Private Property Ruta As String - Get - Return ViewState("Ruta").ToString() - End Get - Set(value As String) - ViewState("Ruta") = value - End Set - End Property - Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load - If Not IsPostBack Then - If Request.QueryString("CveViaje") Is Nothing Then - Response.Redirect("/Transportes/RepViajes.aspx") - End If - CveViaje = Request.QueryString("CveViaje").ToEntero - Ruta = IfNull(Request("Ruta"), "").ToString - LblViaje.Text = Ruta - CargaDatos() - End If - End Sub - - Private Sub CargaDatos() - Dim ObjTransportes As New ClsTransportes - If ObjTransportes.GetViajesPasajeros(CveViaje) Then - GvBoletos.DataSource = ObjTransportes.DtResultados - End If - ObjTransportes.Dispose() - GvBoletos.DataBind() - End Sub - - Protected Sub ImprimirBoleto(sender As Object, e As EventArgs) - Dim dtResult As New DataTable() - Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - Dim Fecha As Date = GvRow.DataKey("FechaIng").ToDate - Dim Importe As Decimal = GvRow.DataKey("Importe").ToDecimal - - Dim params As New List(Of ReportParameter) From { - New ReportParameter("Ruta", Ruta), - New ReportParameter("Origen", GvRow.DataKey("Partida")), - New ReportParameter("Destino", GvRow.DataKey("Destino")), - New ReportParameter("FechaSalida", Fecha.ToShortDateString()), - New ReportParameter("HoraSalida", Fecha.ToString("HH:mm")), - New ReportParameter("Nombre", GvRow.DataKey("Nombre")), - New ReportParameter("Visa", GvRow.DataKey("Visa")), - New ReportParameter("Celular", GvRow.DataKey("Celular")), - New ReportParameter("Importe", Math.Round(Importe, 1).ToString), - New ReportParameter("TipoBoleto", "Tipo Boleto"), - New ReportParameter("Agencia", GvRow.DataKey("Agencia")), - New ReportParameter("TelefonoAgencia", GvRow.DataKey("TelefonoAgencia")), - New ReportParameter("Asiento", GvRow.DataKey("Asiento")) - } - - ImprimirPDFStimul($"{UsuarioActual.Empresa.Ruta}Formatos\Boleto.mrt", dtResult, params, NombreArchivo:="Boleto") - 'Empresas/Grales/Formatos/EntradaSalida.mrt - 'Empresas/188/Formatos/Boleto.mrt - - End Sub - - - Protected Sub BtnCancelar_Click(sender As Object, e As EventArgs) - Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - Dim CveViajePasajero As Integer = GvRow.DataKey("CveViajePasajero").ToEntero() - Dim Estatus As String = GvRow.DataKey("Estatus") +Option Explicit On +Option Strict On + +Imports System.Data +Imports ADSNetLibrary.Helpers +Imports ADSNetLibrary.SIGAPI.Helpers +Imports Extensiones.ModExtensiones +Imports Microsoft.Reporting.WebForms + +Partial Class ListadoBoletos + Inherits ClsPaginas + Private Property CveViaje As Integer + Get + Return ViewState("CveViaje").ToString().ToEntero + End Get + Set(value As Integer) + ViewState("CveViaje") = value + End Set + End Property + Private Property Ruta As String + Get + Return ViewState("Ruta").ToString() + End Get + Set(value As String) + ViewState("Ruta") = value + End Set + End Property + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load + If Not IsPostBack Then + If Request.QueryString("CveViaje") Is Nothing Then + Response.Redirect("/Transportes/RepViajes.aspx") + End If + CveViaje = Request.QueryString("CveViaje").ToEntero + Ruta = IfNull(Request("Ruta"), "").ToString + LblViaje.Text = Ruta + CargaDatos() + End If + End Sub + + Private Sub CargaDatos() + Dim ObjTransportes As New ClsTransportes + If ObjTransportes.GetViajesPasajeros(CveViaje) Then + GvBoletos.DataSource = ObjTransportes.DtResultados + End If + ObjTransportes.Dispose() + GvBoletos.DataBind() + End Sub + + Protected Sub ImprimirBoleto(sender As Object, e As EventArgs) + Dim dtResult As New DataTable() + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + Dim Fecha As Date = GvRow.DataKey("FechaIng").ToDate + Dim Importe As Decimal = GvRow.DataKey("Importe").ToDecimal + + Dim params As New List(Of ReportParameter) From { + New ReportParameter("Ruta", Ruta), + New ReportParameter("Origen", GvRow.DataKey("Partida")), + New ReportParameter("Destino", GvRow.DataKey("Destino")), + New ReportParameter("FechaSalida", Fecha.ToShortDateString()), + New ReportParameter("HoraSalida", Fecha.ToString("HH:mm")), + New ReportParameter("Nombre", GvRow.DataKey("Nombre")), + New ReportParameter("Visa", GvRow.DataKey("Visa")), + New ReportParameter("Celular", GvRow.DataKey("Celular")), + New ReportParameter("Importe", Math.Round(Importe, 1).ToString), + New ReportParameter("TipoBoleto", "Tipo Boleto"), + New ReportParameter("Agencia", GvRow.DataKey("Agencia")), + New ReportParameter("TelefonoAgencia", GvRow.DataKey("TelefonoAgencia")), + New ReportParameter("Asiento", GvRow.DataKey("Asiento")) + } + + ImprimirPDFStimul($"{UsuarioActual.Empresa.Ruta}Formatos\Boleto.mrt", dtResult, params, NombreArchivo:="Boleto") + 'Empresas/Grales/Formatos/EntradaSalida.mrt + 'Empresas/188/Formatos/Boleto.mrt + + End Sub + + + Protected Sub BtnCancelar_Click(sender As Object, e As EventArgs) + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + Dim CveViajePasajero As Integer = GvRow.DataKey("CveViajePasajero").ToEntero() + Dim Estatus As String = GvRow.DataKey("Estatus") Dim cambiarEstatus As Boolean = Not Estatus.ToBool - Dim TieneError As Boolean = False + Dim TieneError As Boolean = False Try Dim DtRem As DataTable = Nothing @@ -120,7 +120,7 @@ Partial Class ListadoBoletos Else 'SI NO TIENE VENTA, SOLO CANCELAR EL BOLETO Dim ObjTran2 As New ClsTransportes - If Not ObjTran2.UpdateViajesPasajeros(CveViajePasajero, Activar:=cambiarEstatus, Estatus:=cambiarEstatus) Then + If Not ObjTran2.UpdateViajesPasajeros(CveViajePasajero) Then TieneError = True End If ObjTran2.Dispose() @@ -129,16 +129,16 @@ Partial Class ListadoBoletos End If Catch ex As Exception TieneError = True - GuardaLog(ex.ToString()) - Finally + GuardaLog(ex.ToString()) + Finally If TieneError Then Alert($"Ocurrió un error al cancelar el boleto.", TipoMensaje.MsgError) Else Alert($"El boleto ha sido cancelado correctamente.") End If - CargaDatos() - End Try - End Sub - + CargaDatos() + End Try + End Sub + End Class \ No newline at end of file diff --git a/Transportes/RepContratoDetalle.aspx b/Transportes/RepContratoDetalle.aspx index 9f55e033b..4a51e9570 100644 --- a/Transportes/RepContratoDetalle.aspx +++ b/Transportes/RepContratoDetalle.aspx @@ -26,6 +26,8 @@ cursor: pointer; color: #45b6af; text-align: center; + font-weight:bold; + border-radius:5px; } .disponible:hover, .disponible.activo { @@ -34,14 +36,18 @@ } .nodisponible { + font-size: 10px; display: inline-block; width: 20px; height: 20px; + border: 2px solid #F3565D; background-color: #F3565D; - margin: 5px; - cursor: pointer; + margin: .1px; + cursor:no-drop; color: white; text-align: center; + font-weight:bold; + border-radius:5px; } .nodisponible:hover { @@ -82,11 +88,7 @@ - - - - @@ -94,151 +96,155 @@ <%-- Datos del Contrato --%> -
-
-
- -
-
- Datos del Contrato -
-
- -
-
- - -
- -
- -
- - +
+
+
+
+
+ +
+
+ Datos del Contrato +
-
-
- -
- - - - -
-
+
+
+ + +
-
- -
- -
-
+
+ +
+ + +
+
-
- -
- -
-
+
+ +
+ + + + +
+
-
- -
- - - - -
-
+
+ +
+ +
+
-
- -
- - - - -
-
+
+ +
+ +
+
-
- -
- - - - -
-
+
+ +
+ + + + +
+
-
- -
- - - - - -
-
+
+ +
+ + + + +
+
-
- -
- - -
-
+
+ +
+ + + + +
+
-
- -
- - -
-
+
+ +
+ + + + + +
+
-
- -
- - +
+ +
+ + +
+
+ +
+ +
+ + +
+
+ +
+ +
+ + +
+
@@ -254,82 +260,93 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- Modal Editar Boleto --%> -