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