--creación de listado de boletos
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
Partial Class Boletos
|
||||
Inherits ClsPaginas
|
||||
#Region "Propiedades"
|
||||
Private Property AsientoSeleccionado As String
|
||||
Get
|
||||
Return ViewState("AsientoSeleccionado").ToString()
|
||||
@@ -35,7 +36,7 @@ Partial Class Boletos
|
||||
ViewState("CveRuta") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
@@ -56,12 +57,19 @@ Partial Class Boletos
|
||||
Private Sub CargaDatos()
|
||||
'Datos Viaje
|
||||
Dim ObjViaje As New ClsTransportes
|
||||
Dim retorno As Boolean = ObjViaje.GetViajes(CveViaje.ToEntero, UsuarioActual.CveEmpresa)
|
||||
Dim retornoViaje As Boolean = ObjViaje.GetViajes(CveViaje.ToEntero, UsuarioActual.CveEmpresa)
|
||||
ViewState("CveRuta") = ObjViaje.CveRuta
|
||||
If retorno Then
|
||||
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()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -106,12 +114,14 @@ Partial Class Boletos
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub OnLinkButtonClick(sender As Object, e As EventArgs)
|
||||
Dim linkButton As LinkButton = DirectCast(sender, LinkButton)
|
||||
Dim buttonID As String = linkButton.ID
|
||||
linkButton.CssClass += " activo"
|
||||
ViewState("AsientoSeleccionado") = buttonID
|
||||
End Sub
|
||||
|
||||
Protected Sub AddBoleto(sender As Object, e As EventArgs)
|
||||
|
||||
If AsientoSeleccionado = "" Then
|
||||
@@ -124,7 +134,7 @@ Partial Class Boletos
|
||||
|
||||
Try
|
||||
AsientoSeleccionado = AsientoSeleccionado.Replace("A", "")
|
||||
Dim retorno As Integer = ObjTransporte.AddViajePasajero(CveViaje, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero, Importe, AsientoSeleccionado.ToEntero, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text, UsuarioActual.CveUsuario)
|
||||
Dim retorno As Integer = ObjTransporte.AddViajePasajeros(CveViaje, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero, Importe, AsientoSeleccionado.ToEntero, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text, UsuarioActual.CveUsuario)
|
||||
|
||||
If retorno > 1 Then
|
||||
ObjTransporte.Commit()
|
||||
@@ -137,4 +147,5 @@ Partial Class Boletos
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user