-- Se removieron partes de Css sin usar y se amplió el rango del updatePanel para que reiniciara los valores del asiento anterior y pusiera el nuevo en no disponible. Se simplificó la respuesta al método de AddViajesPasajeros y se agregó un Update al finalizar el try, para recargar los boletos y los inputs.
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Boletos
|
||||
Partial Class Boletos
|
||||
Inherits ClsPaginas
|
||||
#Region "Propiedades"
|
||||
Private Property AsientoSeleccionado As String
|
||||
@@ -156,9 +153,7 @@ Partial Class Boletos
|
||||
|
||||
Try
|
||||
AsientoSeleccionado = AsientoSeleccionado.Replace("A", "")
|
||||
Dim retorno As Integer = ObjTransporte.AddViajesPasajeros(CveViaje, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero, Importe, AsientoSeleccionado.ToEntero, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If retorno > 1 Then
|
||||
If ObjTransporte.AddViajesPasajeros(CveViaje, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero, Importe, AsientoSeleccionado.ToEntero, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) > 1 Then
|
||||
Alert("Boleto generado correctamente")
|
||||
ObjTransporte.Commit()
|
||||
DdlPartida.SelectedValue = ""
|
||||
@@ -168,13 +163,14 @@ Partial Class Boletos
|
||||
TxtCelular.Text = ""
|
||||
TxtObservaciones.Text = ""
|
||||
AsientoSeleccionado = ""
|
||||
upPanel.Update()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ObjTransporte.RollBack()
|
||||
Alert($"No se pudo generar el boleto {ex}", TipoMensaje.MsgError)
|
||||
Finally
|
||||
ObjTransporte.Dispose()
|
||||
CargaDatos()
|
||||
UpPanel.Update()
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user