-- 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:
@@ -33,11 +33,6 @@
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
{
|
||||
background-color: #45b6af;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.nodisponible {
|
||||
display: inline-block;
|
||||
width: 45px;
|
||||
@@ -74,8 +69,9 @@
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="upPanel">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpPanel">
|
||||
<ContentTemplate>
|
||||
<%-- Datos de cliente y su viaje --%>
|
||||
<div class="col-md-8">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
@@ -158,6 +154,7 @@
|
||||
<label for="<%= TxtRuta.ClientID.ToString()%>">Ruta:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
|
||||
@@ -174,6 +171,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
@@ -181,8 +179,8 @@
|
||||
<label for="<%= TxtFecha.ClientID.ToString()%>">Fecha:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlDestino" AppendDataBoundItems="true" DataTextField="Destino"
|
||||
AutoPostBack="true"
|
||||
@@ -196,10 +194,8 @@
|
||||
<label for="<%= DdlDestino.ClientID.ToString()%>">Destino:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<asp:Label runat="server" ID="TxtCosto" CssClass="text-success bold mx-1"></asp:Label>
|
||||
<br />
|
||||
@@ -209,14 +205,10 @@
|
||||
ValidationGroup="GrpGuardar"></asp:Button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<%-- Asientos --%>
|
||||
<div class="col-md-4">
|
||||
<div class="portlet light xspadding bordered margin-bottom-10">
|
||||
<table>
|
||||
@@ -468,10 +460,8 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -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