- coloreo de asientos ya vendidos
This commit is contained in:
@@ -289,8 +289,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<asp:LinkButton OnClick="OnLinkButtonClick" CssClass="disponible"
|
||||
runat="server"
|
||||
ID="A1" Text="<i class='fa fa-user my-1'><br/>1</i>" />
|
||||
runat="server" ID="A1" Text="<i class='fa fa-user my-1'><br/>1</i>" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:LinkButton OnClick="OnLinkButtonClick" CssClass="disponible" ID="A2" runat="server"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
|
||||
Partial Class Boletos
|
||||
Inherits ClsPaginas
|
||||
@@ -57,19 +58,30 @@ Partial Class Boletos
|
||||
Private Sub CargaDatos()
|
||||
'Datos Viaje
|
||||
Dim ObjViaje As New ClsTransportes
|
||||
Dim retornoViaje As Boolean = ObjViaje.GetViajes(CveViaje.ToEntero, UsuarioActual.CveEmpresa)
|
||||
Dim retornoViaje As Boolean = ObjViaje.GetViajes(CveViaje, UsuarioActual.CveEmpresa)
|
||||
ViewState("CveRuta") = ObjViaje.CveRuta
|
||||
If retornoViaje Then
|
||||
TxtRuta.Text = ObjViaje.Ruta
|
||||
TxtFecha.Text = ObjViaje.Fecha.ToString
|
||||
End If
|
||||
'Boletos Vendidos
|
||||
Dim retornoBoletos As Boolean = ObjViaje.GetViajesPasajeros(CveViaje)
|
||||
If retornoBoletos Then
|
||||
GvBoletos.DataSource = ObjViaje.DtResultados
|
||||
ObjViaje.Dispose()
|
||||
GvBoletos.DataBind()
|
||||
TxtFecha.Text = ObjViaje.Fecha.ToShortDateString
|
||||
'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
|
||||
End If
|
||||
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
ObjViaje.Dispose()
|
||||
GvBoletos.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user