--Se seleccionaron boletos ya vendidos, se les cambio la clase a .nodisponible, se deshabilitaron los click y se puso el nombre del cliente en hover. Se agregó un nuevo botón de acción a la lista de viajes para poder ver los boletos por viaje. Se creó el nuevo url para la lista de boletos vendidos por viaje en ClsPaginas, y en la nueva url se creo la lista de boletos con las acciones para editar, cambiar estatus de boleto e imprimirlo
This commit is contained in:
@@ -9471,6 +9471,7 @@ Public Class ClsPaginas
|
||||
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)
|
||||
#End Region
|
||||
'Antes de aquí.
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
display: inline-block;
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
background-color: #E7505A;
|
||||
background-color: #F3565D;
|
||||
border-radius: 10px !important;
|
||||
margin: 5px;
|
||||
cursor: pointer;
|
||||
@@ -217,60 +217,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="portlet light xspadding bordered margin-bottom-10">
|
||||
<asp:GridView ID="GvBoletos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningún viaje registrado"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD text-center" GridLines="None"
|
||||
data-sort="true">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Nombre">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNombre" runat="server" Text='<%# Eval("Nombre") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Visa">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlVisa" runat="server" Text='<%# Eval("Visa") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Celular">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCelular" runat="server" Text='<%# Eval("Celular") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Sexo">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSexo" runat="server" Text='<%# If(Eval("Sexo").ToString = "True", "Masculino", "Femenino") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Estatus">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlEstatus" runat="server" Text='<%# If(Eval("Estatus").ToString = "True", "Activo", "Cancelado") %>'
|
||||
CssClass='<%# If(Eval("Estatus").ToString = "True", "text-success", "text-danger") %>'></asp:Label>
|
||||
</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="BtnEliminar" runat="server" AlternateText="Eliminar"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-cancel'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="Confirmar"
|
||||
data-btn-ok-label="si" />
|
||||
<asp:LinkButton ID="BtnViaje" runat="server" AlternateText="Viaje"
|
||||
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-print'></i>" />
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Boletos
|
||||
Inherits ClsPaginas
|
||||
@@ -66,22 +66,20 @@ Partial Class Boletos
|
||||
'Boletos Vendidos
|
||||
Dim dt As DataTable
|
||||
If ObjViaje.GetViajesPasajeros(CveViaje) Then
|
||||
GvBoletos.DataSource = ObjViaje.DtResultados
|
||||
dt = ObjViaje.DtResultados
|
||||
Dim cph As ContentPlaceHolder = CType(Me.Master.FindControl("C"), ContentPlaceHolder)
|
||||
For Each dr As DataRow In dt.Rows
|
||||
Dim lnk As LinkButton = CType(cph.FindControl($"A{dr("Asiento")}"), LinkButton)
|
||||
If lnk IsNot Nothing Then
|
||||
lnk.Enabled = False ' se vendieron
|
||||
lnk.BackColor = Drawing.Color.Red
|
||||
'falta ponerlelos colores rojos, colorear con
|
||||
lnk.Enabled = False
|
||||
lnk.CssClass = "nodisponible"
|
||||
lnk.ToolTip = dr("Nombre").ToString
|
||||
End If
|
||||
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
ObjViaje.Dispose()
|
||||
GvBoletos.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
101
Transportes/ListadoBoletos.aspx
Normal file
101
Transportes/ListadoBoletos.aspx
Normal file
@@ -0,0 +1,101 @@
|
||||
<%@ Page Language="VB" AutoEventWireup="false" MasterPageFile="~/Site.master" CodeFile="ListadoBoletos.aspx.vb"
|
||||
Inherits="ListadoBoletos" EnableEventValidation="true" %>
|
||||
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Listado de Boletos
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.my-1 {
|
||||
margin-block: 1rem;
|
||||
}
|
||||
|
||||
</style>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="HB" runat="Server">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:HyperLink ID="LBListadoContratos" runat="server" NavigateUrl="ListadoContratos.aspx"
|
||||
Target="_blank"><i class='fa fa-file'></i>Contratos</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink ID="LBListadoViajes" runat="server" NavigateUrl="ListadoViajes.aspx"
|
||||
Target="_blank"><i class='fa fa-road'></i>Viajes</asp:HyperLink>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<div class="row my-1" style="margin-right: 10px; margin-top: 18px;" 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: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvBoletos.ClientID) %>"
|
||||
style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier">
|
||||
</i></a>
|
||||
</div>
|
||||
|
||||
<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 text-center" GridLines="None"
|
||||
data-sort="true">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Nombre">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNombre" runat="server" Text='<%# Eval("Nombre") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Visa">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlVisa" runat="server" Text='<%# Eval("Visa") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Celular">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCelular" runat="server" Text='<%# Eval("Celular") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Sexo">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSexo" runat="server" Text='<%# If(Eval("Sexo").ToString = "True", "Masculino", "Femenino") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Estatus">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlEstatus" runat="server" Text='<%# If(Eval("Estatus").ToString = "True", "Activo", "Cancelado") %>'
|
||||
CssClass='<%# If(Eval("Estatus").ToString = "True", "text-success", "text-danger") %>'></asp:Label>
|
||||
</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="BtnEliminar" runat="server" AlternateText="Eliminar"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-cancel'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="Confirmar"
|
||||
data-btn-ok-label="si" />
|
||||
<asp:LinkButton ID="BtnViaje" runat="server" AlternateText="Viaje"
|
||||
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-print'></i>" />
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
|
||||
43
Transportes/ListadoBoletos.aspx.vb
Normal file
43
Transportes/ListadoBoletos.aspx.vb
Normal file
@@ -0,0 +1,43 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
Imports ADSNetLibrary.SIGAPI.Helpers
|
||||
Imports Extensiones.ModExtensiones
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
InicializaCombos()
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub InicializaCombos()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjTransportes As New ClsTransportes
|
||||
|
||||
If ObjTransportes.GetViajesPasajeros(CveViaje) Then
|
||||
|
||||
GvBoletos.DataSource = ObjTransportes.DtResultados
|
||||
ObjTransportes.Dispose()
|
||||
GvBoletos.DataBind()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -103,9 +103,13 @@
|
||||
CssClass="btn btn-circle btn-sm red" OnClick="RemoveViaje" Text="<i class='fa fa-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title='<%# If(Eval("CveMasivo").ToString <> "", "Eliminación masiva", "Confirmar") %>'
|
||||
data-btn-ok-label="si" />
|
||||
<asp:LinkButton ID="BtnBoletos" runat="server" AlternateText="Boletos"
|
||||
CssClass="btn btn-circle btn-sm yellow" Text="<i class='fa fa-ticket'></i>"
|
||||
OnClick="GoBoletos" />
|
||||
<asp:LinkButton ID="BtnViaje" runat="server" AlternateText="Viaje"
|
||||
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-arrow-right'></i>" OnClick="GoViaje"
|
||||
/>
|
||||
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-arrow-right'></i>"
|
||||
OnClick="GoViaje" />
|
||||
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -232,5 +232,9 @@ Partial Class ListadoViajes
|
||||
Dim CveViaje As String = GvRow.DataKey("CveViaje")
|
||||
Response.Redirect(String.Format("~/Transportes/Boletos.aspx?CveViaje={0}", CveViaje))
|
||||
End Sub
|
||||
|
||||
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))
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user