This commit is contained in:
2024-02-21 10:32:55 -07:00
5 changed files with 611 additions and 602 deletions

View File

@@ -1,472 +1,473 @@
Imports System.Data Imports System.Data
Imports System.Data.SqlClient Imports System.Data.SqlClient
Imports Extensiones Imports Extensiones
Public Class ClsTransportes Public Class ClsTransportes
Implements IDisposable Implements IDisposable
#Region "Campos" #Region "Campos"
'SQL 'SQL
Private SqlConexion As SqlConnection Private SqlConexion As SqlConnection
Private SqlAdapter As SqlDataAdapter Private SqlAdapter As SqlDataAdapter
Private SqlCommand As SqlCommand Private SqlCommand As SqlCommand
Private SqlTransacc As SqlTransaction Private SqlTransacc As SqlTransaction
Private Data As DataTable Private Data As DataTable
Private DSet As New DataSet Private DSet As New DataSet
Private disposedValue As Boolean = False Private disposedValue As Boolean = False
Private CveConexion As Integer = 0 Private CveConexion As Integer = 0
Public ReadOnly Property DtResultados() As DataTable Public ReadOnly Property DtResultados() As DataTable
Get Get
DtResultados = Data DtResultados = Data
End Get End Get
End Property End Property
#End Region #End Region
#Region "Propiedades" #Region "Propiedades"
Public Property CveViaje As Integer Public Property CveViaje As Integer
Public Property CveRuta As Integer Public Property CveRuta As Integer
Public Property CveAF As Integer Public Property CveAF As Integer
Public Property CvePersonal As Integer Public Property CvePersonal As Integer
Public Property CveEmpresa As Integer Public Property CveEmpresa As Integer
Public Property CvePartida As Integer Public Property CvePartida As Integer
Public Property CveDestino As Integer Public Property CveDestino As Integer
Public Property CveMasivo As Integer Public Property CveMasivo As Integer
Public Property Fecha As DateTime Public Property Fecha As DateTime
Public Property Ruta As String Public Property Ruta As String
#End Region #End Region
#Region "Funciones básicas" #Region "Funciones básicas"
Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing) Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing)
If TransaccionCompartida Is Nothing Then If TransaccionCompartida Is Nothing Then
SqlConexion = New SqlConnection With { SqlConexion = New SqlConnection With {
.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString .ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
} }
Try Try
SqlConexion.Open() SqlConexion.Open()
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex) OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
End Try End Try
Else Else
SqlConexion = TransaccionCompartida.Connection SqlConexion = TransaccionCompartida.Connection
SqlTransacc = TransaccionCompartida SqlTransacc = TransaccionCompartida
End If End If
SqlAdapter = New SqlDataAdapter("", SqlConexion) SqlAdapter = New SqlDataAdapter("", SqlConexion)
ConexionAdd() ConexionAdd()
End Sub End Sub
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure) Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
With SqlAdapter.SelectCommand With SqlAdapter.SelectCommand
.Parameters.Clear() .Parameters.Clear()
.CommandText = StrSQL .CommandText = StrSQL
.CommandType = TipoComando .CommandType = TipoComando
End With End With
If SqlTransacc IsNot Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc If SqlTransacc IsNot Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
Data = New DataTable Data = New DataTable
End Sub End Sub
#Region "Conexiones" #Region "Conexiones"
Private Sub ConexionAdd() Private Sub ConexionAdd()
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
Try Try
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
CveConexion = CInt(SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString) CveConexion = CInt(SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString)
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
End If End If
End Sub End Sub
Private Sub ConexionClose() Private Sub ConexionClose()
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0 CveConexion = 0
End If End If
End Sub End Sub
#End Region #End Region
Public Function IniciaTransacSQL() As SqlTransaction Public Function IniciaTransacSQL() As SqlTransaction
If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction() If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction()
Return SqlTransacc Return SqlTransacc
End Function
Public Sub RollBack()
SqlTransacc.Rollback()
End Sub
Public Sub Commit()
SqlTransacc.Commit()
End Sub
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
If Not disposedValue Then
If disposing Then
If Not Data Is Nothing Then Data.Dispose() : Data = Nothing
If Not DSet Is Nothing Then DSet.Dispose() : DSet = Nothing
If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing
If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing
If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing
If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close()
If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing
End If
End If
disposedValue = True
End Sub
Public Sub Dispose() Implements IDisposable.Dispose
ConexionClose()
Dispose(True)
GC.SuppressFinalize(Me)
End Sub
#End Region
#Region "Boletos"
Public Function AddViajesPasajeros(CveViaje As Integer, CveDestinoOrigen As Integer, CveDestinoFinal As Integer, Importe As Decimal, Asiento As Integer, Nombre As String, Visa As String, Celular As String, Sexo As Boolean, Observacion As String, CveUsuario As Integer, CveVendedor As Integer) As Integer
Dim Retorno As Integer = -1
DataAdapter("PA_Trans_ViajesPasajerosAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveViajePasajero", SqlDbType.Int).Direction = ParameterDirection.Output
.Add("@CveViaje", SqlDbType.Int).Value = CveViaje
.Add("@CveDestinoOrigen", SqlDbType.Int).Value = CveDestinoOrigen
.Add("@CveDestinoFinal", SqlDbType.Int).Value = CveDestinoFinal
.Add("@Importe", SqlDbType.Money).Value = Importe
.Add("@Asiento", SqlDbType.Int).Value = Asiento
.Add("@Nombre", SqlDbType.VarChar).Value = Nombre
.Add("@Visa", SqlDbType.VarChar).Value = Visa
.Add("@Celular", SqlDbType.VarChar).Value = Celular
.Add("@Sexo", SqlDbType.Bit).Value = Sexo
.Add("@Observacion", SqlDbType.VarChar).Value = Observacion
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
End With
Try
SqlAdapter.Fill(Data)
Retorno = CInt(SqlAdapter.SelectCommand.Parameters("@CveViajePasajero").Value.ToString)
Catch ex As Exception
OnError("Ocurrió un error al guardar el nuevo viaje.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function GetViajesPasajeros(CveViaje As Integer, Optional CveViajePasajero As Integer = -1, Optional Estatus As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Trans_ViajesPasajerosGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveViaje", SqlDbType.Int).Value = CveViaje
.Add("@CveViajePasajero", SqlDbType.Int).Value = CveViajePasajero
.Add("@Estatus", SqlDbType.Int).Value = Estatus
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener el catálogo de boletos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function UpdateViajesPasajeros(CveViajePasajero As Integer, Optional Estatus As Boolean = True, Optional Activar As Boolean = False) 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
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualizar el boleto.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function End Function
Public Function GetRemisionBoleto(CveViajePasajero As Integer, CveEmpresa As Integer) As Boolean Public Sub RollBack()
Dim Retorno As Boolean = False SqlTransacc.Rollback()
DataAdapter("PA_Trans_ViajesPasajerosVentaGet") End Sub
With SqlAdapter.SelectCommand.Parameters Public Sub Commit()
.Add("@CveViajePasajero", SqlDbType.Int).Value = CveViajePasajero SqlTransacc.Commit()
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End Sub
End With Protected Overridable Sub Dispose(ByVal disposing As Boolean)
If Not disposedValue Then
Try If disposing Then
SqlAdapter.Fill(Data) If Not Data Is Nothing Then Data.Dispose() : Data = Nothing
Retorno = True If Not DSet Is Nothing Then DSet.Dispose() : DSet = Nothing
Catch ex As Exception If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing
OnError("Ocurrió un error al obtener la remisión del boleto.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing
End Try If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing
If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close()
Return Retorno If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing
End If
End If
disposedValue = True
End Sub
Public Sub Dispose() Implements IDisposable.Dispose
ConexionClose()
Dispose(True)
GC.SuppressFinalize(Me)
End Sub
#End Region
#Region "Boletos"
Public Function AddViajesPasajeros(CveViaje As Integer, CveDestinoOrigen As Integer, CveDestinoFinal As Integer, Importe As Decimal, Asiento As Integer, Nombre As String, Visa As String, Celular As String, Sexo As Boolean, Observacion As String, CveUsuario As Integer, CveVendedor As Integer) As Integer
Dim Retorno As Integer = -1
DataAdapter("PA_Trans_ViajesPasajerosAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveViajePasajero", SqlDbType.Int).Direction = ParameterDirection.Output
.Add("@CveViaje", SqlDbType.Int).Value = CveViaje
.Add("@CveDestinoOrigen", SqlDbType.Int).Value = CveDestinoOrigen
.Add("@CveDestinoFinal", SqlDbType.Int).Value = CveDestinoFinal
.Add("@Importe", SqlDbType.Money).Value = Importe
.Add("@Asiento", SqlDbType.Int).Value = Asiento
.Add("@Nombre", SqlDbType.VarChar).Value = Nombre
.Add("@Visa", SqlDbType.VarChar).Value = Visa
.Add("@Celular", SqlDbType.VarChar).Value = Celular
.Add("@Sexo", SqlDbType.Bit).Value = Sexo
.Add("@Observacion", SqlDbType.VarChar).Value = Observacion
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
End With
Try
SqlAdapter.Fill(Data)
Retorno = CInt(SqlAdapter.SelectCommand.Parameters("@CveViajePasajero").Value.ToString)
Catch ex As Exception
OnError("Ocurrió un error al guardar el nuevo viaje.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function GetViajesPasajeros(CveViaje As Integer, Optional CveViajePasajero As Integer = -1, Optional Estatus As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Trans_ViajesPasajerosGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveViaje", SqlDbType.Int).Value = CveViaje
.Add("@CveViajePasajero", SqlDbType.Int).Value = CveViajePasajero
.Add("@Estatus", SqlDbType.Int).Value = Estatus
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener el catálogo de boletos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function UpdateViajesPasajeros(CveViajePasajero As Integer, Optional Estatus As Boolean = True, Optional Activar As Boolean = False) 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
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualizar el boleto.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function GetRemisionBoleto(CveViajePasajero As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Trans_ViajesPasajerosVentaGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveViajePasajero", SqlDbType.Int).Value = CveViajePasajero
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener la remisión del boleto.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function End Function
#End Region #End Region
#Region "Destinos" #Region "Destinos"
Public Function GetDestinos(Optional CveSubProyecto As Integer = 0) As Boolean Public Function GetDestinos(Optional CveSubProyecto As Integer = 0) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Trans_DestinosGet") DataAdapter("PA_Trans_DestinosGet")
If CveRuta <> 0 Then If CveRuta <> 0 Then
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveRuta", SqlDbType.Int).Value = CveRuta .Add("@CveRuta", SqlDbType.Int).Value = CveRuta
End With End With
End If End If
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Retorno = True Retorno = True
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error al obtener los destino.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) OnError("Ocurrió un error al obtener los destino.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try End Try
Return Retorno Return Retorno
End Function End Function
Public Function AddDestino(Destino As String, Estatus As String, EsNacional As String, CveUsuario As Integer, CveEmpresa As Integer) As Integer Public Function AddDestino(Destino As String, Estatus As String, EsNacional As String, CveUsuario As Integer, CveEmpresa As Integer) As Integer
Dim Retorno As Integer = -1 Dim Retorno As Integer = -1
DataAdapter("PA_Trans_DestinosAdd") DataAdapter("PA_Trans_DestinosAdd")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveDestino", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@CveDestino", SqlDbType.Int).Direction = ParameterDirection.Output
.Add("@Destino", SqlDbType.VarChar).Value = Destino .Add("@Destino", SqlDbType.VarChar).Value = Destino
.Add("@EsNacional", SqlDbType.VarChar).Value = Convert.ToBoolean(EsNacional) .Add("@EsNacional", SqlDbType.Bit).Value = Convert.ToBoolean(EsNacional)
.Add("@Estatus", SqlDbType.Bit).Value = Convert.ToBoolean(Estatus) .Add("@Estatus", SqlDbType.Bit).Value = Convert.ToBoolean(Estatus)
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Retorno = CInt(SqlAdapter.SelectCommand.Parameters("@CveDestino").Value.ToString) Retorno = CInt(SqlAdapter.SelectCommand.Parameters("@CveDestino").Value.ToString)
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error al agregar el destino.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) OnError("Ocurrió un error al agregar el destino.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try End Try
Return Retorno Return Retorno
End Function End Function
Public Function UpdateDestino(CveDestino As Integer, Destino As String, Estatus As String, EsNacional As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean Public Function UpdateDestino(CveDestino As Integer, Destino As String, Estatus As String, EsNacional As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Trans_DestinosUpdate") DataAdapter("PA_Trans_DestinosUpdate")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveDestino", SqlDbType.Int).Value = CveDestino .Add("@CveDestino", SqlDbType.Int).Value = CveDestino
.Add("@Destino", SqlDbType.VarChar).Value = Destino .Add("@Destino", SqlDbType.VarChar).Value = Destino
.Add("@EsNacional", SqlDbType.VarChar).Value = Convert.ToBoolean(EsNacional) .Add("@EsNacional", SqlDbType.VarChar).Value = Convert.ToBoolean(EsNacional)
.Add("@Estatus", SqlDbType.Bit).Value = Convert.ToBoolean(Estatus) .Add("@Estatus", SqlDbType.Bit).Value = Convert.ToBoolean(Estatus)
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Retorno = True Retorno = True
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error al actualizar el destino.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) OnError("Ocurrió un error al actualizar el destino.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try End Try
Return Retorno Return Retorno
End Function End Function
Public Function RemoveDestino(CveDestino As Integer) As Boolean Public Function RemoveDestino(CveDestino As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Trans_DestinosRemove") DataAdapter("PA_Trans_DestinosRemove")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveDestino", SqlDbType.Int).Value = CveDestino .Add("@CveDestino", SqlDbType.Int).Value = CveDestino
End With .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data) Try
Retorno = True SqlAdapter.Fill(Data)
Catch ex As Exception Retorno = True
OnError("Ocurrió un error al eliminar el destino.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Catch ex As Exception
End Try OnError("Ocurrió un error al eliminar el destino.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function Return Retorno
#End Region End Function
#End Region
'#Region "Rutas"
' Public Function GetRutas(CveRuta As Integer, CveUsuario As Integer, CveEmpresa As Integer, Ruta As String, Estatus As Boolean, FechaIng As DateTime) As Boolean '#Region "Rutas"
' Dim Retorno As Boolean = False ' Public Function GetRutas(CveRuta As Integer, CveUsuario As Integer, CveEmpresa As Integer, Ruta As String, Estatus As Boolean, FechaIng As DateTime) As Boolean
' DataAdapter("PA_Trans_RutasGet") ' Dim Retorno As Boolean = False
' With SqlAdapter.SelectCommand.Parameters ' DataAdapter("PA_Trans_RutasGet")
' .Add("@CveRuta", SqlDbType.Int).Value = CveRuta ' With SqlAdapter.SelectCommand.Parameters
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa ' .Add("@CveRuta", SqlDbType.Int).Value = CveRuta
' .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
' .Add("@Ruta", SqlDbType.VarChar).Value = Ruta ' .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
' .Add("@Estatus", SqlDbType.Bit).Value = Estatus ' .Add("@Ruta", SqlDbType.VarChar).Value = Ruta
' .Add("@FechaIng", SqlDbType.DateTime).Value = FechaIng ' .Add("@Estatus", SqlDbType.Bit).Value = Estatus
' .Add("@FechaIng", SqlDbType.DateTime).Value = FechaIng
' End With
' Try ' End With
' SqlAdapter.Fill(Data) ' Try
' Retorno = True ' SqlAdapter.Fill(Data)
' Retorno = True
' Catch ex As Exception
' OnError("Ocurrió un error al obtener las rutas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) ' Catch ex As Exception
' End Try ' OnError("Ocurrió un error al obtener las rutas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
' End Try
' Return Retorno
' End Function ' Return Retorno
' Public Function AddRuta(Ruta As String, Estatus As String, CveUsuario As Integer, CveEmpresa As Integer) As Integer ' End Function
' Dim Retorno As Integer = -1 ' Public Function AddRuta(Ruta As String, Estatus As String, CveUsuario As Integer, CveEmpresa As Integer) As Integer
' Dim Retorno As Integer = -1
' DataAdapter("PA_Trans_RutasAdd")
' With SqlAdapter.SelectCommand.Parameters ' DataAdapter("PA_Trans_RutasAdd")
' .Add("@CveRuta", SqlDbType.Int).Direction = ParameterDirection.Output ' With SqlAdapter.SelectCommand.Parameters
' .Add("@Ruta", SqlDbType.VarChar).Value = Ruta ' .Add("@CveRuta", SqlDbType.Int).Direction = ParameterDirection.Output
' .Add("@Estatus", SqlDbType.Bit).Value = Convert.ToBoolean(Estatus) ' .Add("@Ruta", SqlDbType.VarChar).Value = Ruta
' .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario ' .Add("@Estatus", SqlDbType.Bit).Value = Convert.ToBoolean(Estatus)
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa ' .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
' End With ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
' Try ' End With
' SqlAdapter.Fill(Data) ' Try
' Retorno = CInt(SqlAdapter.SelectCommand.Parameters("@CveRuta").Value.ToString) ' SqlAdapter.Fill(Data)
' Catch ex As Exception ' Retorno = CInt(SqlAdapter.SelectCommand.Parameters("@CveRuta").Value.ToString)
' OnError("Ocurrió un error al agregar la ruta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) ' Catch ex As Exception
' End Try ' OnError("Ocurrió un error al agregar la ruta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
' End Try
' Return Retorno
' End Function ' Return Retorno
' Public Function UpdateRuta(CveRuta As Integer, Ruta As String, Estatus As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean ' End Function
' Dim Retorno As Boolean = False ' Public Function UpdateRuta(CveRuta As Integer, Ruta As String, Estatus As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
' DataAdapter("PA_Trans_RutasUpdate") ' Dim Retorno As Boolean = False
' With SqlAdapter.SelectCommand.Parameters ' DataAdapter("PA_Trans_RutasUpdate")
' .Add("@CveRuta", SqlDbType.Int).Value = CveRuta ' With SqlAdapter.SelectCommand.Parameters
' .Add("@Ruta", SqlDbType.VarChar).Value = Ruta ' .Add("@CveRuta", SqlDbType.Int).Value = CveRuta
' .Add("@Estatus", SqlDbType.Bit).Value = Convert.ToBoolean(Estatus) ' .Add("@Ruta", SqlDbType.VarChar).Value = Ruta
' .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario ' .Add("@Estatus", SqlDbType.Bit).Value = Convert.ToBoolean(Estatus)
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa ' .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
' End With ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
' Try ' End With
' SqlAdapter.Fill(Data) ' Try
' Retorno = True ' SqlAdapter.Fill(Data)
' Catch ex As Exception ' Retorno = True
' OnError("Ocurrió un error al actualizar la ruta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) ' Catch ex As Exception
' End Try ' OnError("Ocurrió un error al actualizar la ruta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
' End Try
' Return Retorno
' End Function ' Return Retorno
' Public Function RemoveRuta(CveRuta As Integer) As Boolean ' End Function
' Dim Retorno As Boolean = False ' Public Function RemoveRuta(CveRuta As Integer) As Boolean
' Dim Retorno As Boolean = False
' DataAdapter("PA_Trans_RutasRemove")
' With SqlAdapter.SelectCommand.Parameters ' DataAdapter("PA_Trans_RutasRemove")
' .Add("@CveRuta", SqlDbType.Int).Value = CveRuta ' With SqlAdapter.SelectCommand.Parameters
' End With ' .Add("@CveRuta", SqlDbType.Int).Value = CveRuta
' End With
' Try
' SqlAdapter.Fill(Data) ' Try
' Retorno = True ' SqlAdapter.Fill(Data)
' Catch ex As Exception ' Retorno = True
' OnError("Ocurrió un error al eliminar la ruta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) ' Catch ex As Exception
' End Try ' OnError("Ocurrió un error al eliminar la ruta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
' End Try
' Return Retorno
' End Function ' Return Retorno
' End Function
'#End Region
'#End Region
#Region "Importes"
Public Function GetDestinosTarifas(CveSubProyecto As Integer, CveDestinoOrigen As Integer, CveDestinoFinal As Integer) As Boolean #Region "Importes"
Dim Retorno As Boolean = False Public Function GetDestinosTarifas(CveSubProyecto As Integer, CveDestinoOrigen As Integer, CveDestinoFinal As Integer) As Boolean
DataAdapter("PA_Trans_DestinosTarifasGet") Dim Retorno As Boolean = False
With SqlAdapter.SelectCommand.Parameters DataAdapter("PA_Trans_DestinosTarifasGet")
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto With SqlAdapter.SelectCommand.Parameters
.Add("@CveDestinoOrigen", SqlDbType.Int).Value = CveDestinoOrigen .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveDestinoFinal", SqlDbType.Int).Value = CveDestinoFinal .Add("@CveDestinoOrigen", SqlDbType.Int).Value = CveDestinoOrigen
End With .Add("@CveDestinoFinal", SqlDbType.Int).Value = CveDestinoFinal
Try End With
SqlAdapter.Fill(Data) Try
Retorno = True SqlAdapter.Fill(Data)
Catch ex As Exception Retorno = True
OnError("Ocurrió un error al obtener la tarifa de los destinos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Catch ex As Exception
End Try OnError("Ocurrió un error al obtener la tarifa de los destinos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function Return Retorno
End Function
Public Function AddDestinosTarifas(CveSubProyecto As Integer, CveDestinoOrigen As Integer, CveDestinoFinal As Integer, Importe As Decimal) As Integer
Dim Retorno As Integer = -1 Public Function AddDestinosTarifas(CveSubProyecto As Integer, CveDestinoOrigen As Integer, CveDestinoFinal As Integer, Importe As Decimal) As Integer
Dim Retorno As Integer = -1
DataAdapter("PA_Trans_DestinosTarifasAdd")
With SqlAdapter.SelectCommand.Parameters DataAdapter("PA_Trans_DestinosTarifasAdd")
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto With SqlAdapter.SelectCommand.Parameters
.Add("@CveDestinoOrigen", SqlDbType.Int).Value = CveDestinoOrigen .Add("@CveDestinoTarifa", SqlDbType.Int).Direction = ParameterDirection.Output
.Add("@CveDestinoFinal", SqlDbType.Int).Value = CveDestinoFinal .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@Importe", SqlDbType.SmallMoney).Value = Importe .Add("@CveDestinoOrigen", SqlDbType.Int).Value = CveDestinoOrigen
.Add("@CveDestinoTarifa", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@CveDestinoFinal", SqlDbType.Int).Value = CveDestinoFinal
End With .Add("@Importe", SqlDbType.SmallMoney).Value = Importe
Try End With
SqlAdapter.Fill(Data) Try
Retorno = CInt(SqlAdapter.SelectCommand.Parameters("@CveDestinoTarifa").Value.ToString) SqlAdapter.Fill(Data)
Catch ex As Exception Retorno = CInt(SqlAdapter.SelectCommand.Parameters("@CveDestinoTarifa").Value.ToString)
OnError("Ocurrió un error al agregar el importe.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Catch ex As Exception
End Try OnError("Ocurrió un error al agregar el importe.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function Return Retorno
Public Function UpdateDestinosTarifas(CveDestinoTarifa As Integer, CveSubProyecto As Integer, CveDestinoOrigen As Integer, CveDestinoFinal As Integer, Importe As Decimal) As Boolean End Function
Dim Retorno As Boolean = False Public Function UpdateDestinosTarifas(CveDestinoTarifa As Integer, CveSubProyecto As Integer, CveDestinoOrigen As Integer, CveDestinoFinal As Integer, Importe As Decimal) As Boolean
DataAdapter("PA_Trans_DestinosTarifasUpdate") Dim Retorno As Boolean = False
With SqlAdapter.SelectCommand.Parameters DataAdapter("PA_Trans_DestinosTarifasUpdate")
.Add("@CveDestinoTarifa", SqlDbType.Int).Value = CveDestinoTarifa With SqlAdapter.SelectCommand.Parameters
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveDestinoTarifa", SqlDbType.Int).Value = CveDestinoTarifa
.Add("@CveDestinoOrigen", SqlDbType.Int).Value = CveDestinoOrigen .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveDestinoFinal", SqlDbType.Int).Value = CveDestinoFinal .Add("@CveDestinoOrigen", SqlDbType.Int).Value = CveDestinoOrigen
.Add("@Importe", SqlDbType.SmallMoney).Value = Importe .Add("@CveDestinoFinal", SqlDbType.Int).Value = CveDestinoFinal
End With .Add("@Importe", SqlDbType.SmallMoney).Value = Importe
Try End With
SqlAdapter.Fill(Data) Try
Retorno = True SqlAdapter.Fill(Data)
Catch ex As Exception Retorno = True
OnError("Ocurrió un error al actualizar el importe.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Catch ex As Exception
End Try OnError("Ocurrió un error al actualizar el importe.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function Return Retorno
Public Function RemoveDestinosTarifas(CveDestinoTarifa As Integer) As Boolean End Function
Dim Retorno As Boolean = False Public Function RemoveDestinosTarifas(CveDestinoTarifa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Trans_DestinosTarifasRemove")
With SqlAdapter.SelectCommand.Parameters DataAdapter("PA_Trans_DestinosTarifasRemove")
.Add("@CveDestinoTarifa", SqlDbType.Int).Value = CveDestinoTarifa With SqlAdapter.SelectCommand.Parameters
End With .Add("@CveDestinoTarifa", SqlDbType.Int).Value = CveDestinoTarifa
Try End With
SqlAdapter.Fill(Data) Try
Retorno = True SqlAdapter.Fill(Data)
Catch ex As Exception Retorno = True
OnError("Ocurrió un error al eliminar el importe.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Catch ex As Exception
End Try OnError("Ocurrió un error al eliminar el importe.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function Return Retorno
#End Region End Function
#End Region
End Class
End Class

View File

@@ -13,7 +13,7 @@
} }
.mx-1 { .mx-1 {
margin: 0 2rem; margin: 0 5px 0 5px;
} }
.disponible { .disponible {
@@ -88,157 +88,164 @@
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpPanel"> <asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpPanel">
<ContentTemplate> <ContentTemplate>
<div class="row"> <div class="row">
<%-- Boleto --%> <%-- Boleto --%>
<div class="col-md-9"> <div class="col-md-9">
<%-- Datos del Cliente --%> <%-- Datos del Cliente --%>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="portlet light xspadding bordered"> <div class="portlet light xspadding bordered">
<div class="portlet-title"> <div class="portlet-title">
<div class="row"> <div class="row">
<div class="caption font-green col-md-8"> <div class="caption font-green col-md-8">
<i class="fa fa-users font-green"></i> <i class="fa fa-users font-green"></i>
<span class="caption-subject bold uppercase">Datos del Pasajero <span class="caption-subject bold uppercase">Datos del Pasajero
</span> </span>
</div>
<div class="col-md-4">
<asp:UpdatePanel runat="server" ID="UpTimer" UpdateMode="Conditional">
<ContentTemplate>
<asp:Label ID="lblTiempo" runat="server" Text=""></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
<div class="portlet-body form">
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconrigh">
<asp:TextBox ID="TxtNombre" CssClass="form-control" runat="server" MaxLength="200"
ClientIDMode="Static"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVTxtNombre" runat="server" ControlToValidate="TxtNombre"
CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<label>Nombre:</label>
</div> </div>
</div> <div class="col-md-4">
<asp:UpdatePanel runat="server" ID="UpTimer" UpdateMode="Conditional">
<div class="col-md-6"> <ContentTemplate>
<div class="form-group form-md-line-input input-iconright"> <asp:Label ID="lblTiempo" runat="server" Text=""></asp:Label>
<asp:TextBox ID="TxtVisa" runat="server" Width="100%" CssClass="form-control"></asp:TextBox> </ContentTemplate>
<label>Visa:</label> </asp:UpdatePanel>
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="portlet-body form">
<div class="col-md-6"> <div class="row">
<div class="form-group form-md-line-input input-iconright"> <div class="col-md-6">
<asp:DropDownList ID="RblSexo" CssClass="form-control input-sm select2me" runat="server"> <div class="form-group form-md-line-input input-iconrigh">
<asp:ListItem Text="Masculino" Value="1" Selected="True" /> <asp:TextBox ID="TxtNombre" CssClass="form-control" runat="server" MaxLength="200"
<asp:ListItem Text="Femenino" Value="0" /> ClientIDMode="Static"></asp:TextBox>
</asp:DropDownList> <asp:RequiredFieldValidator ID="RFVTxtNombre" runat="server" ControlToValidate="TxtNombre"
<label>Sexo:</label> CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo."
<i></i> ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<label>Nombre:</label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtVisa" runat="server" Width="100%" CssClass="form-control"></asp:TextBox>
<label>Visa:</label>
</div>
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="row">
<div class="form-group form-md-line-input input-iconright"> <div class="col-md-6">
<asp:TextBox ID="TxtCelular" runat="server" Width="100%" CssClass="form-control"></asp:TextBox> <div class="form-group form-md-line-input input-iconright">
<asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" CssClass="help-block errorimput" <asp:DropDownList ID="RblSexo" CssClass="form-control input-sm select2me" runat="server">
ControlToValidate="TxtCelular" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Celular''</b> es necesario, por favor ingréselo." <asp:ListItem Text="Masculino" Value="1" Selected="True" />
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> <asp:ListItem Text="Femenino" Value="0" />
<label>Celular:</label> </asp:DropDownList>
<label>Sexo:</label>
<i></i>
</div>
</div>
<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: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>
<label>Celular:</label>
</div>
</div> </div>
</div> </div>
</div>
<div class="form-group form-md-line-input input-iconright "> <div class="form-group form-md-line-input input-iconright ">
<asp:TextBox ID="TxtObservaciones" CssClass="form-control" runat="server" MaxLength="200" <asp:TextBox ID="TxtObservaciones" CssClass="form-control" runat="server" MaxLength="200"
ClientIDMode="Static"></asp:TextBox> ClientIDMode="Static"></asp:TextBox>
<label>Observaciones:</label> <label>Observaciones:</label>
<i></i> <i></i>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> <%-- Datos del Viaje y Destinos --%>
<%-- Datos del Viaje y Destinos --%> <div class="row">
<div class="row"> <div class="col-md-12">
<div class="col-md-12"> <div class="portlet light xspadding bordered ">
<div class="portlet light xspadding bordered "> <div class="portlet-title">
<div class="portlet-title"> <div class="caption font-yellow">
<div class="caption font-yellow"> <i class=" fa fa-bus font-yellow"></i>
<i class=" fa fa-bus font-yellow"></i> <span class="caption-subject bold uppercase">Datos del Viaje</span>
<span class="caption-subject bold uppercase">Datos del Viaje</span>
</div>
</div>
<div class="portlet-body form">
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtRuta" runat="server" Width="100%" Enabled="false" CssClass="form-control"></asp:TextBox>
<label for="<%= TxtRuta.ClientID.ToString()%>">Ruta:</label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlPartida" DataTextField="Partida"
AutoPostBack="true"
DataValueField="CveDestinoOrigen" Class="form-control input-sm select2me" Width="200px"
runat="server" OnSelectedIndexChanged="DdlPartida_SelectedIndexChanged" >
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVPartida" runat="server" ControlToValidate="DdlPartida"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Partida''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<label for="<%= DdlPartida.ClientID.ToString()%>">Partida:</label>
</div>
</div> </div>
</div> </div>
<div class="row"> <div class="portlet-body form">
<div class="col-md-6"> <div class="row">
<div class="form-group form-md-line-input input-iconright"> <div class="col-md-6">
<asp:TextBox ID="TxtFecha" runat="server" Width="100%" Enabled="false" CssClass="form-control"></asp:TextBox> <div class="form-group form-md-line-input input-iconright">
<label for="<%= TxtFecha.ClientID.ToString()%>">Fecha:</label> <asp:TextBox ID="TxtRuta" runat="server" Width="100%" Enabled="false" CssClass="form-control"></asp:TextBox>
<label for="<%= TxtRuta.ClientID.ToString()%>">Ruta:</label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlPartida" DataTextField="Partida"
AutoPostBack="true"
DataValueField="CveDestinoOrigen" Class="form-control input-sm select2me" Width="200px"
runat="server" OnSelectedIndexChanged="DdlPartida_SelectedIndexChanged">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVPartida" runat="server" ControlToValidate="DdlPartida"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Partida''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<label for="<%= DdlPartida.ClientID.ToString()%>">Partida:</label>
</div>
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="row">
<div class="form-group form-md-line-input input-iconright"> <div class="col-md-6">
<asp:DropDownList ID="DdlDestino" DataTextField="Destino" <div class="form-group form-md-line-input input-iconright">
AutoPostBack="true" <asp:TextBox ID="TxtFecha" runat="server" Width="100%" Enabled="false" CssClass="form-control"></asp:TextBox>
DataValueField="CveDestinoFinal" Class="form-control input-sm select2me" <label for="<%= TxtFecha.ClientID.ToString()%>">Fecha:</label>
Width="200px" runat="server"> </div>
</asp:DropDownList> </div>
<asp:RequiredFieldValidator ID="RFVDestino" runat="server" ControlToValidate="DdlDestino"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Destino''</b> es necesario, por favor ingréselo." <div class="col-md-6">
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> <div class="form-group form-md-line-input input-iconright">
<label for="<%= DdlDestino.ClientID.ToString()%>">Destino:</label> <asp:DropDownList ID="DdlDestino" DataTextField="Destino"
AutoPostBack="true"
DataValueField="CveDestinoFinal" Class="form-control input-sm select2me"
Width="200px" runat="server">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVDestino" runat="server" ControlToValidate="DdlDestino"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Destino''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<label for="<%= DdlDestino.ClientID.ToString()%>">Destino:</label>
</div>
</div> </div>
</div> </div>
</div>
<div class="row"> <div class="row">
<asp:Label runat="server" ID="LbCostos" CssClass="text-success bold mx-1" Visible="False"></asp:Label> <p class="col-md-6"></p>
<asp:Label runat="server" ID="LbCostos" CssClass="col-md-6 text-success bold my-1 text-right"
Visible="False"></asp:Label>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> <%-- Botón para Agregar Pasajero(Oculto) --%>
<%-- Botón para Agregar Pasajero(Oculto) --%> <div class="form-group form-md-line-input input-iconright">
<div class="form-group form-md-line-input input-iconright text-right"> <asp:Label runat="server" ID="LbAviso" CssClass="col-md-9 alert alert-warning text-center mx-1"
<asp:Button ID="BtnAgregarPasajero" runat="server" CssClass="btn btn-success" Visible="false" Visible="False"><p><span class="bold uppercase">information: </span>Los boletos están siendo apartados hasta finalizar su compra</p></asp:Label>
Text="Agregar Pasajeros" OnClick="AgregarPasajero" /> <asp:Button ID="BtnAgregarPasajero" runat="server" CssClass="col-md-2 btn btn-success"
</div> Visible="false"
Text="Agregar Pasajeros" OnClick="AgregarPasajero" ValidationGroup="GrpGuardar"/>
</div>
<%-- Listado de Boletos --%> <%-- Listado de Boletos --%>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
@@ -519,7 +526,7 @@
</table> </table>
</div> </div>
</div> </div>
</div> </div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</asp:Content> </asp:Content>
@@ -527,14 +534,14 @@
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server"> <asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script type="text/javascript"> <script type="text/javascript">
var tiempoTranscurrido = 0; var tiempoTranscurrido = 0;
setInterval(actualizarTiempo, 1000); setInterval(actualizarTiempo, 1000);
function actualizarTiempo() { function actualizarTiempo() {
tiempoTranscurrido++; tiempoTranscurrido++;
var horas = Math.floor(tiempoTranscurrido / 3600); var horas = Math.floor(tiempoTranscurrido / 3600);
var minutos = Math.floor((tiempoTranscurrido % 3600) / 60); var minutos = Math.floor((tiempoTranscurrido % 3600) / 60);
var segundos = tiempoTranscurrido % 60; var segundos = tiempoTranscurrido % 60;
//(horas < 10 ? "0" : "") + horas + " : " + //(horas < 10 ? "0" : "") + horas + " : " +
var tiempoFormateado = (minutos < 10 ? "0" : "") + minutos + " : " + (segundos < 10 ? "0" : "") + segundos + " s"; var tiempoFormateado = (minutos < 10 ? "0" : "") + minutos + " : " + (segundos < 10 ? "0" : "") + segundos + " s";
document.getElementById('<%= lblTiempo.ClientID %>').innerText = tiempoFormateado; document.getElementById('<%= lblTiempo.ClientID %>').innerText = tiempoFormateado;
} }
</script> </script>

View File

@@ -232,7 +232,7 @@ Partial Class CatRutas
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim ObjDestino As New ClsTransportes Dim ObjDestino As New ClsTransportes
If ObjDestino.RemoveDestino(GvRow.DataKey("CveDestino").ToEntero) Then If ObjDestino.RemoveDestino(GvRow.DataKey("CveDestino").ToEntero, UsuarioActual.CveEmpresa) Then
Alert("Destino eliminado correctamente") Alert("Destino eliminado correctamente")
CargaDatos() CargaDatos()
End If End If

View File

@@ -243,7 +243,7 @@
<div class="row my-1"> <div class="row my-1">
<label class="col-md-4">Cliente</label> <label class="col-md-4">Cliente</label>
<div class="col-md-8"> <div class="col-md-8">
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="86%" data-metodo="getcliente" <ADS:Dropdownlost CssClassDdl="select2me form-control" ID="DdlClientes" Width="86%" data-metodo="getcliente"
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 86%;" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 86%;"
UsaWebService="true" Enabled="false"></ADS:Dropdownlost> UsaWebService="true" Enabled="false"></ADS:Dropdownlost>
<asp:LinkButton runat="server" CssClass="btn btn-primary fa-add" Width="12%" <asp:LinkButton runat="server" CssClass="btn btn-primary fa-add" Width="12%"
@@ -254,7 +254,7 @@
<div class="row"> <div class="row">
<label class="col-md-4">Servicio</label> <label class="col-md-4">Servicio</label>
<div class="col-md-8"> <div class="col-md-8">
<asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="70" Width="100%" <asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="70" Width="100%" CssClass="select2me form-control"
TextMode="MultiLine" TextMode="MultiLine"
Rows="2"></asp:TextBox> Rows="2"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripcion" <asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripcion"
@@ -269,7 +269,8 @@
<div class="row my-1"> <div class="row my-1">
<label class="col-md-4">Observaciones</label> <label class="col-md-4">Observaciones</label>
<div class="col-md-8"> <div class="col-md-8">
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="70" Width="100%" <asp:TextBox CssClass="select2me form-control" ID="TxtObservaciones" runat="server"
MaxLength="70" Width="100%"
TextMode="MultiLine" TextMode="MultiLine"
Rows="2"></asp:TextBox> Rows="2"></asp:TextBox>
</div> </div>
@@ -278,7 +279,7 @@
<div class="row"> <div class="row">
<label class="col-md-4">Lugar de Salida</label> <label class="col-md-4">Lugar de Salida</label>
<div class="col-md-8"> <div class="col-md-8">
<asp:TextBox ID="TxtUbicacion" runat="server" MaxLength="70" Width="100%"></asp:TextBox> <asp:TextBox ID="TxtUbicacion" runat="server" MaxLength="70" Width="100%" CssClass="form-control"></asp:TextBox>
</div> </div>
</div> </div>
@@ -315,7 +316,7 @@
<div class="row my-1"> <div class="row my-1">
<label class="col-md-4">Cantidad de pasajeros</label> <label class="col-md-4">Cantidad de pasajeros</label>
<div class="col-md-8"> <div class="col-md-8">
<asp:TextBox ID="TxtCantidadPasajeros" CssStyle="col-md-8 form-control" runat="server" <asp:TextBox ID="TxtCantidadPasajeros" CssClass="select2me form-control" runat="server"
type="number" type="number"
Width="100%"></asp:TextBox> Width="100%"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVCantidadPasajeros" runat="server" ControlToValidate="TxtCantidadPasajeros" <asp:RequiredFieldValidator ID="RFVCantidadPasajeros" runat="server" ControlToValidate="TxtCantidadPasajeros"
@@ -376,7 +377,7 @@
<div class="col-md-8"> <div class="col-md-8">
<asp:DropDownList ID="DdlMoneda" AppendDataBoundItems="true" DataTextField="Moneda" <asp:DropDownList ID="DdlMoneda" AppendDataBoundItems="true" DataTextField="Moneda"
DataValueField="CveMoneda" DataValueField="CveMoneda"
Class="table-group-action-input form-control input-inline select2me" CssClass="table-group-action-input form-control input-inline select2me"
Width="100%" runat="server"> Width="100%" runat="server">
</asp:DropDownList> </asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVMoneda" runat="server" ControlToValidate="DdlMoneda" <asp:RequiredFieldValidator ID="RFVMoneda" runat="server" ControlToValidate="DdlMoneda"

View File

@@ -2,6 +2,6 @@
public partial class RepViajesCalendario : ClsPaginas { public partial class RepViajesCalendario : ClsPaginas {
protected void Page_Load(object sender, EventArgs e) { protected void Page_Load(object sender, EventArgs e) {
Console.WriteLine(e);
} }
} }