diff --git a/App_Code/ClsDestinos.vb b/App_Code/ClsDestinos.vb deleted file mode 100644 index ffca8e5a6..000000000 --- a/App_Code/ClsDestinos.vb +++ /dev/null @@ -1,152 +0,0 @@ -Imports System.Data -Imports System.Data.SqlClient -Imports Extensiones - -Public Class ClsDestinos - Implements IDisposable - -#Region "Campos" - 'SQL - Private SqlConexion As SqlConnection - Private SqlAdapter As SqlDataAdapter - Private SqlCommand As SqlCommand - Private SqlTransacc As SqlTransaction - Private Data As DataTable - Private DSet As New DataSet - - Private disposedValue As Boolean = False ' Para detectar llamadas redundantes - 'REGISTRAR CONEXIÓN - Private CveConexion As Integer = 0 - Public ReadOnly Property DtResultados() As DataTable - Get - DtResultados = Data - End Get - End Property - -#End Region - -#Region "Propiedades" - Public Property CveDestino As Integer - Public Property CveUsuario As Integer - Public Property CveEmpresa As Integer - Public Property Destino As String - Public Property Estatus As Boolean - Public Property EsNacional As Boolean - Public Property FechaIng As DateTime -#End Region - -#Region "Funciones básicas" - Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing) - - If TransaccionCompartida Is Nothing Then - SqlConexion = New SqlConnection - SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString - Try - SqlConexion.Open() - Catch ex As Exception - OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex) - End Try - Else - SqlConexion = TransaccionCompartida.Connection - SqlTransacc = TransaccionCompartida - End If - - SqlAdapter = New SqlDataAdapter("", SqlConexion) - ConexionAdd() - End Sub - Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure) - With SqlAdapter.SelectCommand - .Parameters.Clear() - .CommandText = StrSQL - .CommandType = TipoComando - End With - If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc - Data = New DataTable - End Sub -#Region "Conexiones" - - Private Sub ConexionAdd() - If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then - Try - DataAdapter("PA_Sis_RegistrarConexion") - With SqlAdapter.SelectCommand.Parameters - .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("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output - End With - SqlAdapter.Fill(Data) - CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero - Catch ex As Exception - OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try - - End If - End Sub - - Private Sub ConexionClose() - 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) - - Try - SqlAdapter.Fill(Data) - - Catch ex As Exception - OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try - CveConexion = 0 - End If - - End Sub -#End Region - Public Function IniciaTransacSQL() As SqlTransaction - If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction() - 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 - Public Function GetDestinos(Optional CveRuta As Integer = 0) As Boolean - Dim Retorno As Boolean = False - DataAdapter("PA_Trans_DestinosGet") - If CveRuta <> 0 Then - With SqlAdapter.SelectCommand.Parameters - .Add("@CveRuta", SqlDbType.Int).Value = CveRuta - End With - End If - - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - OnError("Ocurrió un error al obtener los destino.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - End Try - - Return Retorno - End Function - -End Class diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index a7c0d3c14..5b3184493 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -9631,9 +9631,9 @@ Public Class ClsPaginas #End Region #Region "Transportes" - PaginaDict.Add("/Transportes/ListadoContratos.aspx".ToUpper(), 598) - PaginaDict.Add("/Transportes/ListadoViajes.aspx".ToUpper(), 599) - PaginaDict.Add("/Transportes/ListadoBoletos.aspx".ToUpper(), 600) + PaginaDict.Add("/Transportes/RepContratos.aspx".ToUpper(), 598) + PaginaDict.Add("/Transportes/RepViajes.aspx".ToUpper(), 599) + PaginaDict.Add("/Transportes/RepBoletos.aspx".ToUpper(), 600) PaginaDict.Add("/Transportes/Boletos.aspx".ToUpper(), 601) #End Region 'Antes de aquí. diff --git a/App_Code/ClsTransportes.vb b/App_Code/ClsTransportes.vb index 0e1efccc8..557fce9f3 100644 --- a/App_Code/ClsTransportes.vb +++ b/App_Code/ClsTransportes.vb @@ -241,7 +241,7 @@ Public Class ClsTransportes #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) As Integer + 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") @@ -259,6 +259,7 @@ Public Class ClsTransportes .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 @@ -299,7 +300,7 @@ Public Class ClsTransportes 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") + DataAdapter("PA_Trans_ViajesPasajerosUpdate") With SqlAdapter.SelectCommand.Parameters .Add("@CveViajePasajero", SqlDbType.Int).Value = CveViajePasajero .Add("@Estatus", SqlDbType.Int).Value = Estatus @@ -336,6 +337,7 @@ Public Class ClsTransportes Return Retorno End Function +#End Region #End Region diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 5fc629f5c..2106523ac 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -217,6 +217,25 @@ Public Class ClsVentas End Try Return retorno End Function + Public Function CGame_ManifiestoUpvta(cveVenta As Int32, cveUsuario As Int32, cveEmpresa As Int32, CveManifiesto As Int32) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_CGame_ManifiestoUpvta", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveVenta", SqlDbType.Int).Value = cveVenta + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa + .Add("@CveManifiesto", SqlDbType.Int).Value = CveManifiesto + .Add("@CveUsuario", SqlDbType.Int).Value = cveUsuario + End With + + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al actualizar venta manifiesto.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return retorno + End Function + Public Function GetVentaTerminal(CveVentaTerminal As Integer, Fecha As DateTime, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_VentasGetTerminal") diff --git a/Inventarios/RecepcionAlmacen.aspx b/Inventarios/RecepcionAlmacen.aspx index 1da85b76c..937f907e0 100644 --- a/Inventarios/RecepcionAlmacen.aspx +++ b/Inventarios/RecepcionAlmacen.aspx @@ -192,7 +192,7 @@
- +
diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb index 40d70f44a..382b175f2 100644 --- a/Inventarios/RecepcionAlmacen.aspx.vb +++ b/Inventarios/RecepcionAlmacen.aspx.vb @@ -474,7 +474,7 @@ Partial Class Inventarios_RecepcionAlmacen CargaPendientes() CargaPermisos() - If UsuarioActual.CveEmpresa.Contiene(72, 80) Then DdlAlmacen.AutoPostBack = True + Dim PermisoEspecialCambioFecha As Boolean = False If UsuarioActual.CveUsuario.Contiene(100, 1937) Then PermisoEspecialCambioFecha = True @@ -591,9 +591,7 @@ Partial Class Inventarios_RecepcionAlmacen UpGenerales.Update() End Sub - Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs) - RecargaporAlmacenes() - End Sub + Private Sub RecargaporAlmacenes() CveTipoAlmacen = -1 diff --git a/Inventarios/RepEntradasSalidas.aspx b/Inventarios/RepEntradasSalidas.aspx index 8a60e98ab..4e6ef9959 100644 --- a/Inventarios/RepEntradasSalidas.aspx +++ b/Inventarios/RepEntradasSalidas.aspx @@ -209,7 +209,7 @@