From 84ebbeb6c01dc563476c9ff8426b8b3f5760f354 Mon Sep 17 00:00:00 2001 From: AbrahamCastilloV Date: Wed, 14 Feb 2024 09:45:19 -0700 Subject: [PATCH] =?UTF-8?q?--Se=20elimin=C3=B3=20la=20parte=20para=20agreg?= =?UTF-8?q?ar=20viajes=20y=20se=20cambi=C3=B3=20todo=20a=20contratos.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsTransportes.vb | 107 ------------------ Transportes/RepViajes.aspx | 195 +++++++++++++++------------------ Transportes/RepViajes.aspx.vb | 201 +++++++++++++++++++--------------- 3 files changed, 200 insertions(+), 303 deletions(-) diff --git a/App_Code/ClsTransportes.vb b/App_Code/ClsTransportes.vb index 612d9f694..a5e09b0c2 100644 --- a/App_Code/ClsTransportes.vb +++ b/App_Code/ClsTransportes.vb @@ -134,113 +134,6 @@ Public Class ClsTransportes End Sub #End Region -#Region "Viajes" - Public Function AddViajes(CveRuta As Integer, CveAF As Integer, CvePersonal As Integer, CveEmpresa As Integer, Fecha As DateTime, CvePartida As Integer, CveDestino As Integer, Optional IsMasivo As Boolean = False, Optional CveMasivo As Integer = -1) As Integer - Dim Retorno As Integer = -1 - - DataAdapter("PA_Trans_ViajesAdd") - - With SqlAdapter.SelectCommand.Parameters - .Add("@CveViaje", SqlDbType.Int).Direction = ParameterDirection.Output - .Add("@CveRuta", SqlDbType.Int).Value = CveRuta - .Add("@CveAF", SqlDbType.Int).Value = CveAF - .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - .Add("@Fecha", SqlDbType.DateTime).Value = Fecha - .Add("@CvePartida", SqlDbType.Int).Value = CvePartida - .Add("@CveDestino", SqlDbType.Int).Value = CveDestino - .Add("@IsMasivo", SqlDbType.Bit).Value = IsMasivo - .Add("@CveMasivo", SqlDbType.Int).Value = CveMasivo - End With - - Try - SqlAdapter.Fill(Data) - Retorno = CInt(SqlAdapter.SelectCommand.Parameters("@CveViaje").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 GetViajes(CveViaje As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno As Boolean = False - - DataAdapter("PA_Trans_ViajesGet") - - With SqlAdapter.SelectCommand.Parameters - .Add("@CveViaje", SqlDbType.Int).Value = CveViaje - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - End With - Try - SqlAdapter.Fill(Data) - If CveViaje > 0 AndAlso Data IsNot Nothing AndAlso Data.Rows.Count > 0 Then - CveRuta = Data.Rows(0)("CveRuta").ToString.ToEntero - CveAF = Data.Rows(0)("CveAF").ToString.ToEntero - CvePersonal = Data.Rows(0)("CvePersonal").ToString.ToEntero - CveEmpresa = Data.Rows(0)("CveEmpresa").ToString.ToEntero - CvePartida = Data.Rows(0)("CvePartida").ToString.ToEntero - CveDestino = Data.Rows(0)("CveDestino").ToString.ToEntero - CveMasivo = Data.Rows(0)("CveMasivo").ToString.ToEntero - Fecha = Data.Rows(0)("Fecha").ToString.ToDate - Ruta = Data.Rows(0)("Ruta").ToString - Me.CveViaje = Data.Rows(0)("CveViaje").ToString.ToEntero - End If - Retorno = True - Catch ex As Exception - OnError("Ocurrió un error al obtener el catálogo de viajes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - End Try - - Return Retorno - End Function - - Public Function RemoveViaje(Optional CveViaje As Integer = -1, Optional CveMasivo As Integer = -1) As Boolean - Dim Retorno As Boolean = False - - - DataAdapter("PA_Trans_ViajesRemove") - With SqlAdapter.SelectCommand.Parameters - .Add("@CveViaje", SqlDbType.Int).Value = CveViaje - .Add("@CveMasivo", SqlDbType.Int).Value = CveMasivo - End With - - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - OnError("Ocurrió un error al eliminar el contrato.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - End Try - - Return Retorno - End Function - - Public Function UpdateViajes(CveViaje As Integer, CveRuta As Integer, CveAF As Integer, CvePersonal As Integer, CveEmpresa As Integer, Fecha As DateTime, CvePartida As Integer, CveDestino As Integer) As Boolean - Dim Retorno As Boolean = False - - DataAdapter("PA_Trans_ViajesUpdate") - With SqlAdapter.SelectCommand.Parameters - .Add("@CveViaje", SqlDbType.Int).Value = CveViaje - .Add("@CveRuta", SqlDbType.Int).Value = CveRuta - .Add("@CveAF", SqlDbType.Int).Value = CveAF - .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - .Add("@Fecha", SqlDbType.Date).Value = Fecha - .Add("@CvePartida", SqlDbType.Int).Value = CvePartida - .Add("@CveDestino", SqlDbType.Int).Value = CveDestino - - End With - - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - OnError("Ocurrió un error al actualizar el Contrato.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - End Try - - Return Retorno - End Function -#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 diff --git a/Transportes/RepViajes.aspx b/Transportes/RepViajes.aspx index 0440a31bf..3aea914b8 100644 --- a/Transportes/RepViajes.aspx +++ b/Transportes/RepViajes.aspx @@ -17,8 +17,8 @@ } .masivo_block { - margin: 1rem; - border: grey 1px solid; + padding: 1rem; + border: #E1E5EC 1px solid; } @@ -36,16 +36,16 @@
- " + " style="display: inline-block; margin-right: -10px; width: 150px;" /> - " + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info">
<%-- Listado de Viajes --%> - + data-sort="true" DataKeyNames=""> @@ -68,31 +68,20 @@ - - - - - - - - - - - - - + - > + -