--Se ajusta el método de UpdateViajesPasajeros a todas las variables. Se hacen ajustes visualizes en Boletos y se arregla visibilidad de avisos. Se agrega la columna de vendedor a ViajesPasajeros y en el PA_VPGet y algunas modificaciones estéticas. Se crea la función updateBoleto para poder cambiar de asiento y ruta.
This commit is contained in:
@@ -186,13 +186,23 @@ Public Class ClsTransportes
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function UpdateViajesPasajeros(CveViajePasajero As Integer, Optional Estatus As Boolean = True, Optional Activar As Boolean = False) As Boolean
|
||||
Public Function UpdateViajesPasajeros(CveViajePasajero As Integer, Optional CveViaje As Integer = -1, Optional CveVendedor As Integer = -1, Optional Importe As Decimal = -1, Optional Asiento As Integer = -1, Optional Nombre As String = "", Optional Visa As String = "", Optional Celular As String = "", Optional Observacion As String = "", Optional Estatus As Boolean = True, Optional CveUsuario As Integer = -1, Optional Sexo As Boolean = True) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Trans_ViajesPasajerosUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveViajePasajero", SqlDbType.Int).Value = CveViajePasajero
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
.Add("@CveViaje", SqlDbType.Int).Value = CveViaje
|
||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||
.Add("@Importe", SqlDbType.SmallMoney).Value = Importe
|
||||
.Add("@Asiento", SqlDbType.TinyInt).Value = Asiento
|
||||
.Add("@Nombre", SqlDbType.VarChar).Value = Nombre
|
||||
.Add("@Visa", SqlDbType.VarChar).Value = Visa
|
||||
.Add("@Celular", SqlDbType.VarChar).Value = Celular
|
||||
.Add("@Observacion", SqlDbType.VarChar).Value = Observacion
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@Sexo", SqlDbType.Bit).Value = Sexo
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -5243,7 +5243,7 @@ Namespace Modelos
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
If Not ObjTransportes.UpdateViajesPasajeros(CveViajePasajero, Activar:=False, Estatus:=False) Then
|
||||
If Not ObjTransportes.UpdateViajesPasajeros(CveViajePasajero) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -85,13 +85,12 @@
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpPanel">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<%-- Boleto --%>
|
||||
<div class="col-md-9">
|
||||
<%-- Datos del Cliente --%>
|
||||
<%-- Datos del Pasajero --%>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light xspadding bordered">
|
||||
@@ -149,7 +148,7 @@
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCelular" runat="server" Width="100%" CssClass="form-control"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtCelular" runat="server" Width="100%" CssClass="form-control" type="number" MaxLength="10"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" CssClass="help-block errorimput"
|
||||
ControlToValidate="TxtCelular" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Celular''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
@@ -168,7 +167,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- Datos del Viaje y Destinos --%>
|
||||
<%-- Datos del Viaje --%>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light xspadding bordered ">
|
||||
@@ -237,14 +236,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<%-- Botón para Agregar Pasajero(Oculto) --%>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label runat="server" ID="LbAviso" CssClass="col-md-9 alert alert-warning text-center mx-1"
|
||||
Visible="False"><p><span class="bold uppercase">information: </span>Los boletos están siendo apartados hasta finalizar su compra</p></asp:Label>
|
||||
<asp:Button ID="BtnAgregarPasajero" runat="server" CssClass="col-md-2 btn btn-success"
|
||||
Visible="false"
|
||||
Text="Agregar Pasajeros" OnClick="AgregarPasajero" ValidationGroup="GrpGuardar" />
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright my-1">
|
||||
<div style="display:flex; justify-content:space-between">
|
||||
<asp:Label runat="server" ID="LbAviso" CssClass="col-md-9 alert alert-warning text-center mx-1"
|
||||
Visible="False"><p><span class="bold uppercase">information: </span>Los boletos están siendo apartados hasta finalizar su compra</p></asp:Label>
|
||||
<asp:Button ID="BtnAgregarPasajero" runat="server" CssClass="col-md-2 btn btn-success"
|
||||
Visible="false"
|
||||
Text="Agregar Pasajeros" OnClick="AgregarPasajero" ValidationGroup="GrpGuardar" />
|
||||
</div>
|
||||
</div>
|
||||
<%-- Listado de Boletos --%>
|
||||
<div class="row">
|
||||
|
||||
@@ -59,7 +59,6 @@ Partial Class Boletos
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
If Request.QueryString("CveViaje") Is Nothing And UsuarioActual.CveVendedor <> Nothing And UsuarioActual.CveVendedor <> -1 Then
|
||||
@@ -73,7 +72,6 @@ Partial Class Boletos
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjContratos As New ClsContratos
|
||||
Dim ObjViaje As New ClsTransportes
|
||||
@@ -131,7 +129,6 @@ Partial Class Boletos
|
||||
'Boletos Vendidos
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub InicializaCombos()
|
||||
Dim CveSubProyecto As Integer = Contrato.Rows(0)("CveSubProyecto").ToString.ToEntero
|
||||
|
||||
@@ -164,7 +161,6 @@ Partial Class Boletos
|
||||
'End If
|
||||
ObjDestinos.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub CotizarTarifa()
|
||||
If DdlDestino.SelectedValue <> "-1" And DdlPartida.SelectedValue <> "-1" Then
|
||||
Dim ImporteR As Decimal = 0
|
||||
@@ -179,6 +175,7 @@ Partial Class Boletos
|
||||
LbCostos.Text = $"El precio de su boleto es ${ImporteR.FormatoNumero}"
|
||||
LbCostos.Visible = True
|
||||
BtnAgregarPasajero.Visible = True
|
||||
LbAviso.Visible = True
|
||||
Else
|
||||
ViewState("Importe") = 0
|
||||
BtnAgregarPasajero.Visible = False
|
||||
@@ -190,7 +187,6 @@ Partial Class Boletos
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub OnLinkButtonClick(sender As Object, e As EventArgs)
|
||||
'quitamos la selección anterior, en caso de existir.
|
||||
If AsientoSeleccionado <> "" Then
|
||||
@@ -206,7 +202,6 @@ Partial Class Boletos
|
||||
|
||||
UpPanel.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub FinalizarVenta(sender As Object, e As EventArgs)
|
||||
|
||||
Dim SbAlert As New StringBuilder()
|
||||
@@ -318,20 +313,21 @@ Partial Class Boletos
|
||||
Alert(SbAlert.ToString(), If(TieneError, TipoMensaje.MsgError, TipoMensaje.MsgInformacion), ShowCloseButton:=False)
|
||||
End Try
|
||||
|
||||
LbAviso.Visible = False
|
||||
BtnAgregarPasajero.Visible = False
|
||||
BtnGuardar.Visible = False
|
||||
LbCostos.Visible = False
|
||||
UpPanel.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlPartida_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
DdlDestino.DataSource = DtDestinos.FiltraParametros($"CveDestinoOrigen = {DdlPartida.SelectedValue}")
|
||||
DdlDestino.DataBind()
|
||||
DdlDestino.Items.Insert(0, New ListItem("Seleccione Destino", "-1"))
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlDestino_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlDestino.SelectedIndexChanged
|
||||
CotizarTarifa()
|
||||
End Sub
|
||||
|
||||
Private Sub GeneraPasajeros(Cantidad As Integer)
|
||||
DtPasajeros.Clear()
|
||||
For i As Integer = 1 To Cantidad
|
||||
@@ -343,7 +339,6 @@ Partial Class Boletos
|
||||
GvB.DataSource = DtPasajeros
|
||||
GvB.DataBind()
|
||||
End Sub
|
||||
|
||||
Protected Sub AgregarPasajero(sender As Object, e As EventArgs)
|
||||
|
||||
If AsientoSeleccionado = "" Then
|
||||
@@ -392,7 +387,6 @@ Partial Class Boletos
|
||||
BtnGuardar.Visible = True
|
||||
UpPanel.Update()
|
||||
End Sub
|
||||
|
||||
Private Function CrearRemision(ByRef objTrans As ClsTransportes) As Modelos.Factura.MMensajeFactura
|
||||
Dim Retorno As New Modelos.Factura.MMensajeFactura
|
||||
|
||||
@@ -481,11 +475,8 @@ Partial Class Boletos
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
'Protected Sub TimerActualizar_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles timerActualizar.Tick
|
||||
' ScriptManager.RegisterStartupScript(Me, Me.GetType(), "ActualizarTiempo", "actualizarTiempo();", True)
|
||||
' UpTimer.Update()
|
||||
'End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1,88 +1,88 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports ADSNetLibrary.Helpers
|
||||
Imports ADSNetLibrary.SIGAPI.Helpers
|
||||
Imports Extensiones.ModExtensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class ListadoBoletos
|
||||
Inherits ClsPaginas
|
||||
Private Property CveViaje As Integer
|
||||
Get
|
||||
Return ViewState("CveViaje").ToString().ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveViaje") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Ruta As String
|
||||
Get
|
||||
Return ViewState("Ruta").ToString()
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Ruta") = value
|
||||
End Set
|
||||
End Property
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
If Request.QueryString("CveViaje") Is Nothing Then
|
||||
Response.Redirect("/Transportes/RepViajes.aspx")
|
||||
End If
|
||||
CveViaje = Request.QueryString("CveViaje").ToEntero
|
||||
Ruta = IfNull(Request("Ruta"), "").ToString
|
||||
LblViaje.Text = Ruta
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjTransportes As New ClsTransportes
|
||||
If ObjTransportes.GetViajesPasajeros(CveViaje) Then
|
||||
GvBoletos.DataSource = ObjTransportes.DtResultados
|
||||
End If
|
||||
ObjTransportes.Dispose()
|
||||
GvBoletos.DataBind()
|
||||
End Sub
|
||||
|
||||
Protected Sub ImprimirBoleto(sender As Object, e As EventArgs)
|
||||
Dim dtResult As New DataTable()
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim Fecha As Date = GvRow.DataKey("FechaIng").ToDate
|
||||
Dim Importe As Decimal = GvRow.DataKey("Importe").ToDecimal
|
||||
|
||||
Dim params As New List(Of ReportParameter) From {
|
||||
New ReportParameter("Ruta", Ruta),
|
||||
New ReportParameter("Origen", GvRow.DataKey("Partida")),
|
||||
New ReportParameter("Destino", GvRow.DataKey("Destino")),
|
||||
New ReportParameter("FechaSalida", Fecha.ToShortDateString()),
|
||||
New ReportParameter("HoraSalida", Fecha.ToString("HH:mm")),
|
||||
New ReportParameter("Nombre", GvRow.DataKey("Nombre")),
|
||||
New ReportParameter("Visa", GvRow.DataKey("Visa")),
|
||||
New ReportParameter("Celular", GvRow.DataKey("Celular")),
|
||||
New ReportParameter("Importe", Math.Round(Importe, 1).ToString),
|
||||
New ReportParameter("TipoBoleto", "Tipo Boleto"),
|
||||
New ReportParameter("Agencia", GvRow.DataKey("Agencia")),
|
||||
New ReportParameter("TelefonoAgencia", GvRow.DataKey("TelefonoAgencia")),
|
||||
New ReportParameter("Asiento", GvRow.DataKey("Asiento"))
|
||||
}
|
||||
|
||||
ImprimirPDFStimul($"{UsuarioActual.Empresa.Ruta}Formatos\Boleto.mrt", dtResult, params, NombreArchivo:="Boleto")
|
||||
'Empresas/Grales/Formatos/EntradaSalida.mrt
|
||||
'Empresas/188/Formatos/Boleto.mrt
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnCancelar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim CveViajePasajero As Integer = GvRow.DataKey("CveViajePasajero").ToEntero()
|
||||
Dim Estatus As String = GvRow.DataKey("Estatus")
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports ADSNetLibrary.Helpers
|
||||
Imports ADSNetLibrary.SIGAPI.Helpers
|
||||
Imports Extensiones.ModExtensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class ListadoBoletos
|
||||
Inherits ClsPaginas
|
||||
Private Property CveViaje As Integer
|
||||
Get
|
||||
Return ViewState("CveViaje").ToString().ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveViaje") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Ruta As String
|
||||
Get
|
||||
Return ViewState("Ruta").ToString()
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Ruta") = value
|
||||
End Set
|
||||
End Property
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
If Request.QueryString("CveViaje") Is Nothing Then
|
||||
Response.Redirect("/Transportes/RepViajes.aspx")
|
||||
End If
|
||||
CveViaje = Request.QueryString("CveViaje").ToEntero
|
||||
Ruta = IfNull(Request("Ruta"), "").ToString
|
||||
LblViaje.Text = Ruta
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjTransportes As New ClsTransportes
|
||||
If ObjTransportes.GetViajesPasajeros(CveViaje) Then
|
||||
GvBoletos.DataSource = ObjTransportes.DtResultados
|
||||
End If
|
||||
ObjTransportes.Dispose()
|
||||
GvBoletos.DataBind()
|
||||
End Sub
|
||||
|
||||
Protected Sub ImprimirBoleto(sender As Object, e As EventArgs)
|
||||
Dim dtResult As New DataTable()
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim Fecha As Date = GvRow.DataKey("FechaIng").ToDate
|
||||
Dim Importe As Decimal = GvRow.DataKey("Importe").ToDecimal
|
||||
|
||||
Dim params As New List(Of ReportParameter) From {
|
||||
New ReportParameter("Ruta", Ruta),
|
||||
New ReportParameter("Origen", GvRow.DataKey("Partida")),
|
||||
New ReportParameter("Destino", GvRow.DataKey("Destino")),
|
||||
New ReportParameter("FechaSalida", Fecha.ToShortDateString()),
|
||||
New ReportParameter("HoraSalida", Fecha.ToString("HH:mm")),
|
||||
New ReportParameter("Nombre", GvRow.DataKey("Nombre")),
|
||||
New ReportParameter("Visa", GvRow.DataKey("Visa")),
|
||||
New ReportParameter("Celular", GvRow.DataKey("Celular")),
|
||||
New ReportParameter("Importe", Math.Round(Importe, 1).ToString),
|
||||
New ReportParameter("TipoBoleto", "Tipo Boleto"),
|
||||
New ReportParameter("Agencia", GvRow.DataKey("Agencia")),
|
||||
New ReportParameter("TelefonoAgencia", GvRow.DataKey("TelefonoAgencia")),
|
||||
New ReportParameter("Asiento", GvRow.DataKey("Asiento"))
|
||||
}
|
||||
|
||||
ImprimirPDFStimul($"{UsuarioActual.Empresa.Ruta}Formatos\Boleto.mrt", dtResult, params, NombreArchivo:="Boleto")
|
||||
'Empresas/Grales/Formatos/EntradaSalida.mrt
|
||||
'Empresas/188/Formatos/Boleto.mrt
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnCancelar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim CveViajePasajero As Integer = GvRow.DataKey("CveViajePasajero").ToEntero()
|
||||
Dim Estatus As String = GvRow.DataKey("Estatus")
|
||||
Dim cambiarEstatus As Boolean = Not Estatus.ToBool
|
||||
|
||||
|
||||
Dim TieneError As Boolean = False
|
||||
Dim TieneError As Boolean = False
|
||||
Try
|
||||
Dim DtRem As DataTable = Nothing
|
||||
|
||||
@@ -120,7 +120,7 @@ Partial Class ListadoBoletos
|
||||
Else
|
||||
'SI NO TIENE VENTA, SOLO CANCELAR EL BOLETO
|
||||
Dim ObjTran2 As New ClsTransportes
|
||||
If Not ObjTran2.UpdateViajesPasajeros(CveViajePasajero, Activar:=cambiarEstatus, Estatus:=cambiarEstatus) Then
|
||||
If Not ObjTran2.UpdateViajesPasajeros(CveViajePasajero) Then
|
||||
TieneError = True
|
||||
End If
|
||||
ObjTran2.Dispose()
|
||||
@@ -129,16 +129,16 @@ Partial Class ListadoBoletos
|
||||
End If
|
||||
Catch ex As Exception
|
||||
TieneError = True
|
||||
GuardaLog(ex.ToString())
|
||||
Finally
|
||||
GuardaLog(ex.ToString())
|
||||
Finally
|
||||
If TieneError Then
|
||||
Alert($"Ocurrió un error al cancelar el boleto.", TipoMensaje.MsgError)
|
||||
Else
|
||||
Alert($"El boleto ha sido cancelado correctamente.")
|
||||
End If
|
||||
|
||||
CargaDatos()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
CargaDatos()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -26,6 +26,8 @@
|
||||
cursor: pointer;
|
||||
color: #45b6af;
|
||||
text-align: center;
|
||||
font-weight:bold;
|
||||
border-radius:5px;
|
||||
}
|
||||
|
||||
.disponible:hover, .disponible.activo {
|
||||
@@ -34,14 +36,18 @@
|
||||
}
|
||||
|
||||
.nodisponible {
|
||||
font-size: 10px;
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border: 2px solid #F3565D;
|
||||
background-color: #F3565D;
|
||||
margin: 5px;
|
||||
cursor: pointer;
|
||||
margin: .1px;
|
||||
cursor:no-drop;
|
||||
color: white;
|
||||
text-align: center;
|
||||
font-weight:bold;
|
||||
border-radius:5px;
|
||||
}
|
||||
|
||||
.nodisponible:hover {
|
||||
@@ -82,11 +88,7 @@
|
||||
</style>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpTabContainer">
|
||||
<ContentTemplate>
|
||||
<ajax:TabContainer ID="Tab" runat="server" Width="100%" ActiveTabIndex="0">
|
||||
@@ -94,151 +96,155 @@
|
||||
<ajax:TabPanel runat="server" HeaderText="Información General" CssClass="tabBodyOverride">
|
||||
<ContentTemplate>
|
||||
<%-- Datos del Contrato --%>
|
||||
<div class="portlet light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="C_chkexpand" class=" collapse" data-original-title=""
|
||||
title=""></a><span class="hidden">
|
||||
<input id="C_chkexpand" type="checkbox" name="ctl00$C$chkexpand" checked="checked"></span>
|
||||
</div>
|
||||
<div class="caption uppercase" style="position: relative;">
|
||||
<i class="fa fa-info-circle"></i>Datos del Contrato
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4 bold text-primary">Folio</label>
|
||||
<asp:Label class="col-md-8" runat="server" ID="LbFolio" Text="Folio"></asp:Label>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Cliente</label>
|
||||
<div class="col-md-8">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="86%" data-metodo="getcliente"
|
||||
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 86%;"
|
||||
UsaWebService="true" Enabled="false"></ADS:Dropdownlost>
|
||||
<asp:LinkButton runat="server" CssClass="btn btn-primary fa-add" Width="12%"
|
||||
PostBackUrl="~/Ventas/Clientes.aspx?CveCliente=-1"></asp:LinkButton>
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
<div class="portlet light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="C_chkexpand" class=" collapse" data-original-title=""
|
||||
title=""></a><span class="hidden">
|
||||
<input id="C_chkexpand" type="checkbox" name="ctl00$C$chkexpand" checked="checked"></span>
|
||||
</div>
|
||||
<div class="caption uppercase" style="position: relative;">
|
||||
<i class="fa fa-info-circle"></i>Datos del Contrato
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Servicio</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="70" Width="100%"
|
||||
TextMode="MultiLine"
|
||||
Rows="2"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripcion"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Servicio''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDescripcion" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVDescripcion" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4 bold text-primary">Folio</label>
|
||||
<asp:Label class="col-md-8" runat="server" ID="LbFolio" Text="Folio"></asp:Label>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Observaciones</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="70" Width="100%"
|
||||
TextMode="MultiLine"
|
||||
Rows="2"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Cliente</label>
|
||||
<div class="col-md-8">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="86%" data-metodo="getcliente"
|
||||
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 86%;"
|
||||
UsaWebService="true" Enabled="false"></ADS:Dropdownlost>
|
||||
<asp:LinkButton runat="server" CssClass="btn btn-primary fa-add" Width="12%"
|
||||
PostBackUrl="~/Ventas/Clientes.aspx?CveCliente=-1"></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Lugar de Salida</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtUbicacion" runat="server" MaxLength="70" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-4">Servicio</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="70" Width="100%"
|
||||
TextMode="MultiLine"
|
||||
Rows="2"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripcion"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Servicio''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDescripcion" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVDescripcion" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Fecha Salida</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
Width="100%"
|
||||
type="datetime"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaSalida" runat="server" ControlToValidate="TxtFechaSalida"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Salida''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETxtFechaSalida" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTxtFechaSalida" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Observaciones</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="70" Width="100%"
|
||||
TextMode="MultiLine"
|
||||
Rows="2"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Fecha Regreso</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
Width="100%"
|
||||
type="datetime"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaRegreso" runat="server" ControlToValidate="TxtFechaRegreso"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Regreso''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTxtFechaRegreso" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-4">Lugar de Salida</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtUbicacion" runat="server" MaxLength="70" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Cantidad de pasajeros</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtCantidadPasajeros" CssStyle="col-md-8 form-control" runat="server"
|
||||
type="number"
|
||||
Width="100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCantidadPasajeros" runat="server" ControlToValidate="TxtCantidadPasajeros"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad de pasajeros''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECantidadPasajeros" runat="server" HighlightCssClass="VCOCantidadPasajeros"
|
||||
TargetControlID="RFVCantidadPasajeros" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Fecha Salida</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
Width="100%"
|
||||
type="datetime"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaSalida" runat="server" ControlToValidate="TxtFechaSalida"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Salida''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETxtFechaSalida" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTxtFechaSalida" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Tipo Unidad</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlTipoAF" AppendDataBoundItems="true" DataTextField="TipoActivoFijo"
|
||||
DataValueField="CveTipoActivoFijo" Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoAF" runat="server" ControlToValidate="DdlTipoAF"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Unidad''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETipoAF" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTipoAF" Width="400px">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-4">Fecha Regreso</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
Width="100%"
|
||||
type="datetime"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaRegreso" runat="server" ControlToValidate="TxtFechaRegreso"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Regreso''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTxtFechaRegreso" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Costo dólares</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtDolares" CssStyle=" form-control" runat="server" type="number"
|
||||
Width="95%"></asp:TextBox>
|
||||
<span class="fa fa-dollar"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Cantidad de pasajeros</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtCantidadPasajeros" CssStyle="col-md-8 form-control" runat="server"
|
||||
type="number"
|
||||
Width="100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCantidadPasajeros" runat="server" ControlToValidate="TxtCantidadPasajeros"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad de pasajeros''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECantidadPasajeros" runat="server" HighlightCssClass="VCOCantidadPasajeros"
|
||||
TargetControlID="RFVCantidadPasajeros" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Costo pesos</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtPesos" CssStyle=" form-control" runat="server" type="number"
|
||||
Width="95%"></asp:TextBox>
|
||||
<span class="fa fa-dollar"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-4">Tipo Unidad</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlTipoAF" AppendDataBoundItems="true" DataTextField="TipoActivoFijo"
|
||||
DataValueField="CveTipoActivoFijo" Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoAF" runat="server" ControlToValidate="DdlTipoAF"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Unidad''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETipoAF" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTipoAF" Width="400px">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Anticipo</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtAnticipo" CssStyle=" form-control" Width="95%" runat="server"
|
||||
type="decimal"></asp:TextBox>
|
||||
<span class="fa fa-percent"></span>
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Costo dólares</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtDolares" CssStyle=" form-control" runat="server" type="number"
|
||||
Width="95%"></asp:TextBox>
|
||||
<span class="fa fa-dollar"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Costo pesos</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtPesos" CssStyle=" form-control" runat="server" type="number"
|
||||
Width="95%"></asp:TextBox>
|
||||
<span class="fa fa-dollar"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Anticipo</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtAnticipo" CssStyle=" form-control" Width="95%" runat="server"
|
||||
type="decimal"></asp:TextBox>
|
||||
<span class="fa fa-percent"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -254,82 +260,93 @@
|
||||
<ajax:TabPanel runat="server" HeaderText="Boletos" CssClass="row" Visible="false"
|
||||
ID="TabBoletos">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvViajesPasajeros" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningún boleto registrado"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
|
||||
data-sort="true" DataKeyNames="CveViajePasajero, CveViaje, CveDestinoFinal, CveVendedor, Importe, Asiento, Nombre, Visa, Celular, Observacion, Estatus, CveUsuario, FechaIng, Sexo, Partida, Destino">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="No. Asiento">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAsiento" runat="server" Text='<%# Eval("Asiento") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nombre">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNombre" runat="server" Text='<%# Eval("Nombre") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Visa">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlVisa" runat="server" Text='<%# Eval("Visa") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Celular">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCelular" runat="server" Text='<%# Eval("Celular") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Sexo">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSexo" runat="server" Text='<%# If(Eval("Sexo").ToString = "True", "Masculino", "Femenino") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Estatus">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlEstatus" runat="server" Text='<%# If(Eval("Estatus").ToString = "True", "Activo", "Cancelado") %>'
|
||||
CssClass='<%# If(Eval("Estatus").ToString = "True", "text-success", "text-danger") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Partida">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlPartida" runat="server" Text='<%# Eval("Partida") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Destino">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDestino" runat="server" Text='<%# Eval("Destino") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlImporte" runat="server" Text='<%# Eval("Importe", "{0:n}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar" OnClick="EditarBoleto"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" ToolTip="Editar" />
|
||||
<asp:LinkButton ID="BtnReAgendar" runat="server" AlternateText="Editar" OnClick="CambiarBoleto"
|
||||
CssClass="btn btn-circle btn-sm yellow" Text="<i class='fa fa-repeat'></i>" ToolTip="Editar" />
|
||||
<asp:LinkButton ID="BtnCancelar" runat="server" AlternateText="Activar"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-cancel'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title='<%# If(Eval("Estatus").ToString = "True", "Cancelar Boleto", "Reactivar") %>'
|
||||
data-btn-ok-label="si" OnClick="BtnCancelar_Click" />
|
||||
<asp:LinkButton ID="BtnImprimir" runat="server" AlternateText="Viaje"
|
||||
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-print'></i>" ToolTip="Imprimir"
|
||||
OnClick="ImprimirBoleto" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpPasajeros" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvViajesPasajeros" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningún boleto registrado"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
|
||||
data-sort="true" DataKeyNames="CveViajePasajero, CveViaje, CveDestinoFinal, CveVendedor, Importe, Asiento, Nombre, Visa, Celular, Observacion, Estatus, CveUsuario, FechaIng, Sexo, Partida, Destino, Vendedor">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="No. Asiento">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAsiento" runat="server" Text='<%# Eval("Asiento") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nombre">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNombre" runat="server" Text='<%# Eval("Nombre") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Visa">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlVisa" runat="server" Text='<%# Eval("Visa") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Celular">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCelular" runat="server" Text='<%# Eval("Celular") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Sexo">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSexo" runat="server" Text='<%# If(Eval("Sexo").ToString = "True", "Masculino", "Femenino") %>'>
|
||||
</asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Estatus">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlEstatus" runat="server" Text='<%# If(Eval("Estatus").ToString = "True", "Activo", "Cancelado") %>'
|
||||
CssClass='<%# If(Eval("Estatus").ToString = "True", "text-success", "text-danger") %>'>
|
||||
</asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Partida">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlPartida" runat="server" Text='<%# Eval("Partida") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Destino">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDestino" runat="server" Text='<%# Eval("Destino") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Vendedor">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlVendedor" runat="server" Text='<%# Eval("Vendedor") %>'>
|
||||
</asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlImporte" runat="server" Text='<%# Eval("Importe", "{0:C2}") %>'>
|
||||
</asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar" OnClick="EditarBoleto"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" ToolTip="Editar" />
|
||||
<asp:LinkButton ID="BtnReAgendar" runat="server" AlternateText="Editar" OnClick="CambiarBoleto"
|
||||
CssClass="btn btn-circle btn-sm yellow" Text="<i class='fa fa-repeat'></i>" ToolTip="Editar" />
|
||||
<asp:LinkButton ID="BtnCancelar" runat="server" AlternateText="Activar"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-cancel'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title='<%# If(Eval("Estatus").ToString = "True", "Cancelar Boleto", "Reactivar") %>'
|
||||
data-btn-ok-label="si" OnClick="BtnCancelar_Click" />
|
||||
<asp:LinkButton ID="BtnImprimir" runat="server" AlternateText="Viaje"
|
||||
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-print'></i>" ToolTip="Imprimir"
|
||||
OnClick="ImprimirBoleto" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
<%-- Modal Editar Boleto --%>
|
||||
<asp:UpdatePanel runat="server" ID="UpModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div id="ModalEditar" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div id="UpAddChofer" class="modal-content rowpadding" tabindex="-1"
|
||||
@@ -342,7 +359,7 @@
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="row" style="display: flex; align-items: center;">
|
||||
<div class="row">
|
||||
<%-- Datos del Boleto --%>
|
||||
<div class="col-md-8">
|
||||
<asp:Panel runat="server" ID="PnEditarViaje" Visible="false">
|
||||
@@ -352,7 +369,7 @@
|
||||
<asp:DropDownList runat="server" ID="DdlRuta" CssClass="form-control select2me input-sm"
|
||||
DataTextField="SubProyecto"
|
||||
DataValueField="CveSubProyecto" OnSelectedIndexChanged="OnChangeRuta" AutoPostBack="true"
|
||||
Width="100%">
|
||||
Width="100%" Style="overflow: hidden">
|
||||
</asp:DropDownList>
|
||||
|
||||
</div>
|
||||
@@ -361,14 +378,14 @@
|
||||
<div class="row margin-bottom-5">
|
||||
<label class="col-md-4 bold">Partida</label>
|
||||
<div class="col-md-8">
|
||||
<asp:Label CssClass="form-control" runat="server" ID="LbPartida">Partida</asp:Label>
|
||||
<asp:Label CssClass="form-control bg-grey" runat="server" ID="LbPartida">Partida</asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row margin-bottom-5">
|
||||
<label class="col-md-4 bold">Destino</label>
|
||||
<div class="col-md-8">
|
||||
<asp:Label CssClass="form-control" runat="server" ID="LbDestino">Destino</asp:Label>
|
||||
<asp:Label CssClass="form-control bg-grey" runat="server" ID="LbDestino">Destino</asp:Label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -376,7 +393,7 @@
|
||||
<div class="row margin-bottom-5">
|
||||
<label class="col-md-4 bold">Importe</label>
|
||||
<div class="col-md-8">
|
||||
<asp:Label CssClass="form-control" runat="server" ID="LbImporte">Importe</asp:Label>
|
||||
<asp:Label CssClass="form-control bg-grey" runat="server" ID="LbImporte">Importe</asp:Label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -384,7 +401,7 @@
|
||||
<div class="row margin-bottom-5">
|
||||
<label class="col-md-4 bold">Creado</label>
|
||||
<div class="col-md-8">
|
||||
<asp:Label CssClass="form-control" runat="server"
|
||||
<asp:Label CssClass="form-control bg-grey bg-grey" runat="server"
|
||||
ID="LbCreado">Creado</asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -392,11 +409,9 @@
|
||||
<div class="row margin-bottom-5">
|
||||
<label class="col-md-4 bold">Asiento</label>
|
||||
<div class="col-md-8">
|
||||
|
||||
<asp:Label CssClass="form-control" runat="server"
|
||||
ID="LbAsiento">Asiento</asp:Label>
|
||||
<asp:TextBox runat="server" ID="TxtAsiento" CssClass="form-control" MaxLength="2"
|
||||
type="number" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</asp:Panel>
|
||||
|
||||
@@ -429,11 +444,17 @@
|
||||
<div class="row margin-bottom-5">
|
||||
<label class="col-md-4 bold">Observación</label>
|
||||
<div class="col-md-8">
|
||||
|
||||
<asp:Label CssClass="form-control" runat="server"
|
||||
ID="LbObservacion">Observacion</asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row margin-bottom-5">
|
||||
<label class="col-md-4 bold">Sexo</label>
|
||||
<div class="col-md-8">
|
||||
<asp:Label CssClass="form-control" runat="server"
|
||||
ID="LbSexo">Sexo</asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row margin-bottom-5">
|
||||
@@ -450,19 +471,16 @@
|
||||
</div>
|
||||
|
||||
<%-- Asientos --%>
|
||||
<asp:UpdatePanel runat="server" ID="UpBoletos">
|
||||
<asp:UpdatePanel runat="server" ID="UpBoletos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Panel runat="server" ID="PnAsientos" class="col-md-4"
|
||||
<asp:Panel runat="server" ID="PnAsientos" class="col-md-4 center"
|
||||
Visible="true">
|
||||
<div class="portlet light xspadding bordered margin-bottom-10">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="2" class="btnChofer
|
||||
my-1">
|
||||
<asp:LinkButton ID="chofer"
|
||||
runat="server"
|
||||
Text="Chofer" />
|
||||
<td colspan="2" class="btnChofer my-1">
|
||||
<label>Chofer</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -476,7 +494,7 @@
|
||||
CssClass="disponible" ID="A2" runat="server"
|
||||
Text="2" />
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>  </td>
|
||||
<td>
|
||||
<asp:LinkButton OnClick="OnLinkButtonClick"
|
||||
CssClass="disponible" ID="A3" runat="server"
|
||||
@@ -499,7 +517,7 @@
|
||||
CssClass="disponible" ID="A6" runat="server"
|
||||
Text="6" />
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>  </td>
|
||||
<td>
|
||||
<asp:LinkButton OnClick="OnLinkButtonClick"
|
||||
CssClass="disponible" ID="A7" runat="server"
|
||||
@@ -522,7 +540,7 @@
|
||||
CssClass="disponible" ID="A10" runat="server"
|
||||
Text="10" />
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>  </td>
|
||||
<td>
|
||||
<asp:LinkButton OnClick="OnLinkButtonClick"
|
||||
CssClass="disponible" ID="A11" runat="server"
|
||||
@@ -545,7 +563,7 @@
|
||||
CssClass="disponible" ID="A14" runat="server"
|
||||
Text="14" />
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>  </td>
|
||||
<td>
|
||||
<asp:LinkButton OnClick="OnLinkButtonClick"
|
||||
CssClass="disponible" ID="A15" runat="server"
|
||||
@@ -568,7 +586,7 @@
|
||||
CssClass="disponible" ID="A18" runat="server"
|
||||
Text="18" />
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>  </td>
|
||||
<td>
|
||||
<asp:LinkButton OnClick="OnLinkButtonClick"
|
||||
CssClass="disponible" ID="A19" runat="server"
|
||||
@@ -591,7 +609,7 @@
|
||||
CssClass="disponible" ID="A22" runat="server"
|
||||
Text="22" />
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>  </td>
|
||||
<td>
|
||||
<asp:LinkButton OnClick="OnLinkButtonClick"
|
||||
CssClass="disponible" ID="A23" runat="server"
|
||||
@@ -614,7 +632,7 @@
|
||||
CssClass="disponible" ID="A26" runat="server"
|
||||
Text="26" />
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>  </td>
|
||||
<td>
|
||||
<asp:LinkButton OnClick="OnLinkButtonClick"
|
||||
CssClass="disponible" ID="A27" runat="server"
|
||||
@@ -637,7 +655,7 @@
|
||||
CssClass="disponible" ID="A30" runat="server"
|
||||
Text="30" />
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>  </td>
|
||||
<td>
|
||||
<asp:LinkButton OnClick="OnLinkButtonClick"
|
||||
CssClass="disponible" ID="A31" runat="server"
|
||||
@@ -661,7 +679,7 @@
|
||||
CssClass="disponible" ID="A34" runat="server"
|
||||
Text="34" />
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>  </td>
|
||||
<td>
|
||||
<asp:LinkButton OnClick="OnLinkButtonClick"
|
||||
CssClass="disponible" ID="A35" runat="server"
|
||||
@@ -684,7 +702,7 @@
|
||||
CssClass="disponible" ID="A38" runat="server"
|
||||
Text="38" />
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>  </td>
|
||||
<td>
|
||||
<asp:LinkButton OnClick="OnLinkButtonClick"
|
||||
CssClass="disponible" ID="A39" runat="server"
|
||||
@@ -707,7 +725,7 @@
|
||||
CssClass="disponible" ID="A42" runat="server"
|
||||
Text="42" />
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>  </td>
|
||||
<td>
|
||||
<asp:LinkButton OnClick="OnLinkButtonClick"
|
||||
CssClass="disponible" ID="A43" runat="server"
|
||||
@@ -730,7 +748,7 @@
|
||||
CssClass="disponible" ID="A46" runat="server"
|
||||
Text="46" />
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>  </td>
|
||||
<td>
|
||||
<asp:LinkButton OnClick="OnLinkButtonClick"
|
||||
CssClass="disponible" ID="A47" runat="server"
|
||||
@@ -762,20 +780,15 @@
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button OnClick="UpdateBoleto" runat="server" CssClass="btn
|
||||
btn-primary"
|
||||
ValidationGroup="GrpGuardar"
|
||||
Text="Actualizar"></asp:Button>
|
||||
<asp:Button OnClick="UpdateBoleto" runat="server" CssClass="btn btn-primary" Text="Actualizar">
|
||||
</asp:Button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class RepContratoDetalle
|
||||
Inherits ClsPaginas
|
||||
#Region "Propiedades"
|
||||
Private Property CveContrato As Integer
|
||||
Get
|
||||
Return CType(ViewState("CveContrato"), Integer)
|
||||
@@ -17,6 +18,14 @@ Partial Class RepContratoDetalle
|
||||
ViewState("CveContrato") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveViajePasajero As Integer
|
||||
Get
|
||||
Return CType(ViewState("CveViajePasajero"), Integer)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveViajePasajero") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Contrato As DataTable
|
||||
Get
|
||||
Return CType(ViewState("Contrato"), DataTable)
|
||||
@@ -25,6 +34,14 @@ Partial Class RepContratoDetalle
|
||||
ViewState("Contrato") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property ViajeActual As DataTable
|
||||
Get
|
||||
Return CType(ViewState("ViajeActual"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("ViajeActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property SubProyecto As String
|
||||
Get
|
||||
Return CType(ViewState("SubProyecto"), String)
|
||||
@@ -41,15 +58,19 @@ Partial Class RepContratoDetalle
|
||||
ViewState("AsientoSeleccionado") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Request("CveContrato") Is Nothing Then
|
||||
Response.Redirect($"~/Transportes/RepContratos.aspx")
|
||||
End If
|
||||
CveContrato = Request("CveContrato").ToEntero
|
||||
|
||||
If Not IsPostBack Then
|
||||
InicializaCombos()
|
||||
CargaDatos()
|
||||
AsientoSeleccionado = ""
|
||||
CveViajePasajero = 0
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Private Sub InicializaCombos()
|
||||
@@ -97,55 +118,66 @@ Partial Class RepContratoDetalle
|
||||
End If
|
||||
ObjContratos.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnCancelar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim CveViajePasajero As String = GvRow.DataKey("CveViajePasajero")
|
||||
Dim Estatus As String = GvRow.DataKey("Estatus")
|
||||
Dim cambiarEstatus As Boolean = Not Estatus.ToBool
|
||||
CveViajePasajero = GvRow.DataKey("CveViajePasajero").ToEntero
|
||||
LbPartida.Text = GvRow.DataKey("Partida").ToString()
|
||||
LbDestino.Text = GvRow.DataKey("Destino").ToString()
|
||||
LbImporte.Text = Convert.ToDecimal(GvRow.DataKey("Importe")).ToString("C")
|
||||
LbNombre.Text = GvRow.DataKey("Nombre").ToString()
|
||||
LbVisa.Text = GvRow.DataKey("Visa").ToString()
|
||||
LbCelular.Text = GvRow.DataKey("Celular").ToString()
|
||||
LbSexo.Text = GvRow.DataKey("Sexo").ToString()
|
||||
LbObservacion.Text = GvRow.DataKey("Observacion").ToString()
|
||||
LbEstatus.Text = GvRow.DataKey("Estatus").ToString()
|
||||
LbCreado.Text = GvRow.DataKey("FechaIng").ToString()
|
||||
TxtAsiento.Text = GvRow.DataKey("Asiento").ToString()
|
||||
Dim Estatus As Boolean = Not LbEstatus.Text.ToBool
|
||||
Dim ObjTransportes As New ClsTransportes
|
||||
ObjTransportes.IniciaTransacSQL()
|
||||
Try
|
||||
If ObjTransportes.UpdateViajesPasajeros(CveViajePasajero.ToEntero, Activar:=cambiarEstatus, Estatus:=cambiarEstatus) Then
|
||||
If Not cambiarEstatus Then
|
||||
Alert($"El boleto ha sido cancelado correctamente.")
|
||||
Else
|
||||
Alert($"El boleto ha sido reactivado correctamente.")
|
||||
End If
|
||||
ObjTransportes.IniciaTransacSQL()
|
||||
|
||||
If ObjTransportes.UpdateViajesPasajeros(CveViajePasajero, CveContrato, UsuarioActual.CveVendedor, LbImporte.Text.ToDecimal, TxtAsiento.Text.ToEntero, LbNombre.Text, LbVisa.Text, LbCelular.Text, LbObservacion.Text, Estatus, UsuarioActual.CveUsuario, LbSexo.Text.ToBool) Then
|
||||
Alert($"El boleto ha modificado el estatus de su boleto correctamente.")
|
||||
|
||||
ObjTransportes.Commit()
|
||||
End If
|
||||
ObjTransportes.Commit()
|
||||
|
||||
Catch ex As Exception
|
||||
ObjTransportes.RollBack()
|
||||
Alert($"No se pudo cambiar el estatus del boleto {ex}", TipoMensaje.MsgError)
|
||||
Alert($"No se pudo cambiar el estatus del boleto", TipoMensaje.MsgError)
|
||||
Finally
|
||||
ObjTransportes.Dispose()
|
||||
CargaDatos()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Protected Sub CambiarBoleto(sender As Object, e As EventArgs)
|
||||
DdlRuta.ClearSelection()
|
||||
PnEditarViaje.Visible = True
|
||||
PnEditarUsuario.Visible = False
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
CveViajePasajero = GvRow.DataKey("CveViajePasajero").ToEntero
|
||||
LbPartida.Text = GvRow.DataKey("Partida").ToString()
|
||||
LbDestino.Text = GvRow.DataKey("Destino").ToString()
|
||||
LbImporte.Text = GvRow.DataKey("Importe").ToString()
|
||||
LbImporte.Text = Convert.ToDecimal(GvRow.DataKey("Importe")).ToString("C")
|
||||
LbNombre.Text = GvRow.DataKey("Nombre").ToString()
|
||||
LbVisa.Text = GvRow.DataKey("Visa").ToString()
|
||||
LbCelular.Text = GvRow.DataKey("Celular").ToString()
|
||||
LbSexo.Text = GvRow.DataKey("Sexo").ToString()
|
||||
LbObservacion.Text = GvRow.DataKey("Observacion").ToString()
|
||||
LbEstatus.Text = GvRow.DataKey("Estatus").ToString()
|
||||
LbCreado.Text = GvRow.DataKey("FechaIng").ToString()
|
||||
LbAsiento.Text = GvRow.DataKey("Asiento").ToString()
|
||||
TxtAsiento.Text = GvRow.DataKey("Asiento").ToString()
|
||||
|
||||
'Seleccionamos la ruta que tiene el usuario actual
|
||||
DdlRuta.ClearSelection()
|
||||
Dim ObjContratos As New ClsContratos
|
||||
If ObjContratos.GetContratosReporte(UsuarioActual.CveEmpresa, MinFecha, MaxFecha, -1, CveEstatus:=-1, CveTipoContrato:=35) Then
|
||||
For Each row As DataRow In ObjContratos.DtResultados.Rows
|
||||
Dim fecha As DateTime = row("FechaInicial").ToString.ToDateTime
|
||||
' Asigna los valores de la columna deseada al ListItem
|
||||
Dim listItem As New ListItem(row("SubProyecto").ToString() + " - " + row("FechaInicial").ToString(), row("CveContrato").ToString())
|
||||
|
||||
Dim listItem As New ListItem(row("SubProyecto").ToString() + " - " + fecha.ToShortDateString + " - " + fecha.ToShortTimeString, row("CveContrato").ToString())
|
||||
' Agrega el ListItem al DropDownList
|
||||
DdlRuta.Items.Add(listItem)
|
||||
Next
|
||||
@@ -154,53 +186,76 @@ Partial Class RepContratoDetalle
|
||||
ObjContratos.Dispose()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalEditar"))
|
||||
End Sub
|
||||
|
||||
Protected Sub UpdateBoleto(sender As Object, e As EventArgs)
|
||||
For Each boleto As DataRow In ViajeActual.Rows
|
||||
If (boleto.Item("Asiento").ToString = TxtAsiento.Text) Then
|
||||
Alert($"El asiento {boleto.Item("Asiento")} ya ha está ocupado", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim ObjTransportes As New ClsTransportes
|
||||
|
||||
Try
|
||||
ObjTransportes.IniciaTransacSQL()
|
||||
|
||||
If ObjTransportes.UpdateViajesPasajeros(CveViajePasajero, DdlRuta.SelectedValue.ToEntero, UsuarioActual.CveVendedor, LbImporte.Text.ToDecimal, TxtAsiento.Text.ToEntero, LbNombre.Text, LbVisa.Text, LbCelular.Text, LbObservacion.Text, LbEstatus.Text.ToBool, UsuarioActual.CveUsuario, LbSexo.Text.ToBool) Then
|
||||
ObjTransportes.Commit()
|
||||
End If
|
||||
Catch ex As ArgumentException
|
||||
Alert($"Ocurrió un ocurrió un error al actualizar su boleto", TipoMensaje.MsgError)
|
||||
ObjTransportes.RollBack()
|
||||
Finally
|
||||
Alert("Su asiento fue actualizado correctamente")
|
||||
ObjTransportes.Dispose()
|
||||
CargaDatos()
|
||||
End Try
|
||||
End Sub
|
||||
Protected Sub EditarBoleto(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub OnLinkButtonClick(sender As Object, e As EventArgs)
|
||||
'quitamos la selección anterior, en caso de existir.
|
||||
'Limpiamos la selección anterior
|
||||
If AsientoSeleccionado <> "" Then
|
||||
Dim cph As ContentPlaceHolder = CType(Me.Master.FindControl("C"), ContentPlaceHolder)
|
||||
Dim lnk As LinkButton = CType(cph.FindControl(AsientoSeleccionado), LinkButton)
|
||||
lnk.CssClass = "disponible"
|
||||
End If
|
||||
|
||||
'Seleccionamos un asiento
|
||||
Dim linkButton As LinkButton = DirectCast(sender, LinkButton)
|
||||
Dim buttonID As String = linkButton.ID
|
||||
linkButton.CssClass += " activo"
|
||||
AsientoSeleccionado = buttonID
|
||||
TxtAsiento.Text = buttonID.Substring(1)
|
||||
|
||||
UpBoletos.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalEditar"))
|
||||
End Sub
|
||||
|
||||
Protected Sub OnChangeRuta(sender As Object, e As EventArgs)
|
||||
Dim ObjTransportes As New ClsTransportes
|
||||
|
||||
If ObjTransportes.GetViajesPasajeros(DdlRuta.SelectedValue.ToEntero) Then
|
||||
BusquedaSeleccionada(ObjTransportes.DtResultados)
|
||||
End If
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalEditar"))
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BusquedaSeleccionada(dt As DataTable)
|
||||
'Limpiamos autobus
|
||||
Dim cph As ContentPlaceHolder = CType(Me.Master.FindControl("C"), ContentPlaceHolder)
|
||||
|
||||
For i As Integer = 1 To 50
|
||||
Dim lnk As LinkButton = CType(cph.FindControl($"A{i}"), LinkButton)
|
||||
If lnk IsNot Nothing Then
|
||||
lnk.Enabled = True
|
||||
lnk.CssClass = "disponible"
|
||||
End If
|
||||
Next
|
||||
'Si la dt DataTable tiene algo llenamos los asientos
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
Dim cph As ContentPlaceHolder = CType(Me.Master.FindControl("C"), ContentPlaceHolder)
|
||||
|
||||
For i As Integer = 1 To 50
|
||||
Dim lnk As LinkButton = CType(cph.FindControl($"A{i}"), LinkButton)
|
||||
If lnk IsNot Nothing Then
|
||||
lnk.Enabled = True
|
||||
lnk.CssClass = "disponible"
|
||||
End If
|
||||
Next
|
||||
|
||||
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
|
||||
lnk.CssClass = "nodisponible"
|
||||
@@ -208,6 +263,7 @@ Partial Class RepContratoDetalle
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
ViajeActual = dt
|
||||
End Sub
|
||||
Protected Sub ImprimirBoleto(sender As Object, e As EventArgs)
|
||||
Dim dtResult As New DataTable()
|
||||
@@ -236,8 +292,6 @@ Partial Class RepContratoDetalle
|
||||
'Empresas/188/Formatos/Boleto.mrt
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user