-Se agregó el formato para impresión de boletos, se cambiaron las claves en ClsPaginas para /Transportes y se agregaron el nombre de la ruta a la CveRuta en listado de boletos

This commit is contained in:
AbrahamCastilloV
2024-01-08 13:58:21 -07:00
parent bf40e1c70e
commit 937902c363
5 changed files with 1236 additions and 13 deletions

View File

@@ -9583,9 +9583,9 @@ Public Class ClsPaginas
#Region "Transportes"
PaginaDict.Add("/Transportes/ListadoContratos.aspx".ToUpper(), 598)
PaginaDict.Add("/Transportes/ListadoViajes.aspx".ToUpper(), 598)
PaginaDict.Add("/Transportes/Boletos.aspx".ToUpper(), 598)
PaginaDict.Add("/Transportes/ListadoBoletos.aspx".ToUpper(), 598)
PaginaDict.Add("/Transportes/ListadoViajes.aspx".ToUpper(), 599)
PaginaDict.Add("/Transportes/ListadoBoletos.aspx".ToUpper(), 600)
PaginaDict.Add("/Transportes/Boletos.aspx".ToUpper(), 601)
#End Region
'Antes de aquí.

File diff suppressed because it is too large Load Diff

View File

@@ -19,7 +19,6 @@
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<div class="row my-1" style="margin-right: 10px; margin-top: 10px;" align="right">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvBoletos.ClientID) %>"
style="display: inline-block; margin-right: -10px; width: 150px;" />
@@ -27,12 +26,13 @@
style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier">
</i></a>
</div>
<asp:Label ID="Prueba" runat="server" Text=""></asp:Label>
<div class="portlet light xspadding bordered margin-bottom-10">
<asp:GridView ID="GvBoletos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningún boleto registrado"
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
data-sort="true">
<Columns>
data-sort="true" DataKeyNames="Asiento,Nombre, Visa,Celular,Sexo,Estatus,Partida,Destino, Importe">
<Columns>
<asp:TemplateField HeaderText="No. Asiento">
<ItemTemplate>
@@ -71,17 +71,35 @@
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Partida">
<ItemTemplate>
<asp:Literal ID="LtlPartida" runat="server" Text='<%# Eval("Partida") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Destino">
<ItemTemplate>
<asp:Literal ID="LtlDestino" runat="server" Text='<%# Eval("Destino") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<asp:Literal ID="LtlImporte" runat="server" Text='<%# Eval("Importe") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
<ItemTemplate>
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar"
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
<asp:LinkButton ID="BtnToggle" runat="server" AlternateText="Activar/Desactivar"
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-cancel'></i>"
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" ToolTip="Editar"/>
<asp:LinkButton ID="BtnToggle" runat="server" AlternateText="Activar"
ToolTip="Activar" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-cancel'></i>"
data-toggle="confirmation" data-popout="true" data-original-title='<%# If(Eval("Estatus").ToString = "True", "Cancelar Boleto", "Reactivar") %>'
data-btn-ok-label="si" OnClick="ToggleViajesPasajeros" />
<asp:LinkButton ID="BtnViaje" runat="server" AlternateText="Viaje"
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-print'></i>" />
<asp:LinkButton ID="BtnImprimir" runat="server" AlternateText="Viaje"
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-print'></i>" ToolTip="Imprimir"
OnClick="ImprimirBoleto" />
</ItemTemplate>
</asp:TemplateField>

View File

@@ -1,8 +1,11 @@
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
@@ -14,12 +17,23 @@ Partial Class ListadoBoletos
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/ListadoViajes.aspx")
End If
CveViaje = Request.QueryString("CveViaje").ToEntero
Ruta = Request.QueryString("Ruta")
Prueba.Text = Ruta
InicializaCombos()
CargaDatos()
@@ -71,4 +85,30 @@ Partial Class ListadoBoletos
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 params As New List(Of ReportParameter)
params.Add(New ReportParameter("Ruta", Ruta))
params.Add(New ReportParameter("Origen", GvRow.DataKey("Partida")))
params.Add(New ReportParameter("Destino", GvRow.DataKey("Destino")))
params.Add(New ReportParameter("FechaSalida", "2024-01-03"))
params.Add(New ReportParameter("HoraSalida", "17:00"))
params.Add(New ReportParameter("Nombre", GvRow.DataKey("Nombre")))
params.Add(New ReportParameter("Visa", GvRow.DataKey("Visa")))
params.Add(New ReportParameter("Celular", GvRow.DataKey("Celular")))
params.Add(New ReportParameter("Importe", GvRow.DataKey("Importe")))
params.Add(New ReportParameter("TipoBoleto", "Tipo Boleto"))
params.Add(New ReportParameter("Agencia", "Agencia"))
params.Add(New ReportParameter("TelefonoAgencia", "Telefono Agencia"))
ImprimirPDFStimul("Empresas/188/Formatos/Boleto.mrt", dtResult, params, NombreArchivo:="Boleto")
'Empresas/Grales/Formatos/EntradaSalida.mrt
'Empresas/188/Formatos/Boleto.mrt
End Sub
End Class

View File

@@ -15,6 +15,14 @@ Partial Class ListadoViajes
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
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
@@ -192,7 +200,7 @@ Partial Class ListadoViajes
DdlPartida.SelectedValue = GvRow.DataKey("CvePartida")
DdlChofer.SelectedValue = GvRow.DataKey("CvePersonal")
ViewState("CveViaje") = GvRow.DataKey("CveViaje")
Page.Response.Write("<script>console.log('El resultado de tu variable" + CveViaje + "')</script>")
ViewState("Ruta") = GvRow.DataKey("Ruta")
Dim fecha As DateTime
If DateTime.TryParse(GvRow.DataKey("Fecha").ToString, fecha) Then
@@ -247,6 +255,8 @@ Partial Class ListadoViajes
Protected Sub GoBoletos(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim CveViaje As String = GvRow.DataKey("CveViaje")
Response.Redirect(String.Format("~/Transportes/ListadoBoletos.aspx?CveViaje={0}", CveViaje))
Dim Ruta As String = GvRow.DataKey("Ruta")
Response.Redirect(String.Format("~/Transportes/ListadoBoletos.aspx?CveViaje={0}&Ruta={1}", CveViaje, Ruta))
End Sub
End Class