Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -22,6 +22,8 @@ Public Class ClsAC
|
|||||||
Private _CveProgramaOperativo As Integer
|
Private _CveProgramaOperativo As Integer
|
||||||
|
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIÓN
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
@@ -53,7 +55,7 @@ Public Class ClsAC
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
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
|
||||||
@@ -65,6 +67,42 @@ Public Class ClsAC
|
|||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#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
|
||||||
@@ -3217,6 +3255,7 @@ Public Class ClsAC
|
|||||||
Me.disposedValue = True
|
Me.disposedValue = True
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ Public Class ClsAC2
|
|||||||
Private _CveProgramaOperativo As Integer
|
Private _CveProgramaOperativo As Integer
|
||||||
|
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIÓN
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
@@ -49,7 +51,7 @@ Public Class ClsAC2
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
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
|
||||||
@@ -60,7 +62,42 @@ Public Class ClsAC2
|
|||||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
Public Function GetRepPresupuestosEgresosSaldos(Ejercicio As Integer, Fecha As String, Capitulo As String, CveClasificacion As Integer, CveFuenteFinanciamiento As Integer, CveProgramaOperativo As Integer, CveUnidadAdministrativa As Integer, Gpo As Integer) As Boolean
|
Public Function GetRepPresupuestosEgresosSaldos(Ejercicio As Integer, Fecha As String, Capitulo As String, CveClasificacion As Integer, CveFuenteFinanciamiento As Integer, CveProgramaOperativo As Integer, CveUnidadAdministrativa As Integer, Gpo As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_PresupuestosEgresosSaldosRep")
|
DataAdapter("PA_PresupuestosEgresosSaldosRep")
|
||||||
@@ -125,6 +162,7 @@ Public Class ClsAC2
|
|||||||
Me.disposedValue = True
|
Me.disposedValue = True
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ Public Class ClsAF
|
|||||||
Private Data As DataTable
|
Private Data As DataTable
|
||||||
|
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIÓN
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
@@ -96,7 +98,7 @@ Public Class ClsAF
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
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
|
||||||
@@ -107,6 +109,42 @@ Public Class ClsAF
|
|||||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#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
|
||||||
@@ -3225,6 +3263,7 @@ Public Class ClsAF
|
|||||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ Public Class ClsAIMMGM
|
|||||||
Private SqlTransacc As SqlTransaction
|
Private SqlTransacc As SqlTransaction
|
||||||
Private Data As DataTable
|
Private Data As DataTable
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIÓN
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
@@ -61,7 +63,7 @@ Public Class ClsAIMMGM
|
|||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
SqlCommand = New SqlCommand("", SqlConexion)
|
SqlCommand = New SqlCommand("", SqlConexion)
|
||||||
|
ConexionAdd()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
@@ -73,7 +75,42 @@ Public Class ClsAIMMGM
|
|||||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
Private Sub DataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub DataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
|
|
||||||
With SqlCommand
|
With SqlCommand
|
||||||
@@ -726,6 +763,7 @@ Public Class ClsAIMMGM
|
|||||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ Public Class ClsAcarreos
|
|||||||
Private Data As DataTable
|
Private Data As DataTable
|
||||||
|
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIÓN
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
Public ReadOnly Property DtResultados() As DataTable
|
Public ReadOnly Property DtResultados() As DataTable
|
||||||
Get
|
Get
|
||||||
DtResultados = Data
|
DtResultados = Data
|
||||||
@@ -48,7 +49,7 @@ Public Class ClsAcarreos
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
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
|
||||||
@@ -59,6 +60,42 @@ Public Class ClsAcarreos
|
|||||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#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
|
||||||
@@ -1300,6 +1337,7 @@ Public Class ClsAcarreos
|
|||||||
Me.disposedValue = True
|
Me.disposedValue = True
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ Public Class ClsAcumuladores
|
|||||||
Private Data As DataTable
|
Private Data As DataTable
|
||||||
Private DSet As New DataSet
|
Private DSet As New DataSet
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIÓN
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
|
|
||||||
Private Sub SqlDataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub SqlDataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
With SqlAdapter.SelectCommand
|
With SqlAdapter.SelectCommand
|
||||||
@@ -63,9 +65,44 @@ Public Class ClsAcumuladores
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
ConexionAdd()
|
||||||
|
End Sub
|
||||||
|
#Region "Conexiones"
|
||||||
|
|
||||||
|
Private Sub ConexionAdd()
|
||||||
|
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||||
|
Try
|
||||||
|
SqlDataAdapter("PA_Sis_RegistrarConexion")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||||
|
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.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
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ConexionClose()
|
||||||
|
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||||
|
|
||||||
|
SqlDataAdapter(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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
Public ReadOnly Property DtResultados() As DataTable
|
Public ReadOnly Property DtResultados() As DataTable
|
||||||
Get
|
Get
|
||||||
DtResultados = Data
|
DtResultados = Data
|
||||||
@@ -810,6 +847,7 @@ Public Class ClsAcumuladores
|
|||||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ Imports System.Configuration
|
|||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
Imports System.Xml
|
Imports System.Xml
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
|
Imports System.Web
|
||||||
|
|
||||||
Public Class ClsBancos
|
Public Class ClsBancos
|
||||||
Implements IDisposable
|
Implements IDisposable
|
||||||
@@ -49,6 +50,8 @@ Public Class ClsBancos
|
|||||||
Public Property FechaIngCancelacion As Date
|
Public Property FechaIngCancelacion As Date
|
||||||
Public Property FechaCancelacion As Date
|
Public Property FechaCancelacion As Date
|
||||||
|
|
||||||
|
'CONTROL DE LA CONEXION
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " P R O P I E D A D E S - B A N C O S - I E"
|
#Region " P R O P I E D A D E S - B A N C O S - I E"
|
||||||
@@ -187,6 +190,7 @@ Public Class ClsBancos
|
|||||||
|
|
||||||
SqlCommand = New SqlCommand("", SqlConexion)
|
SqlCommand = New SqlCommand("", SqlConexion)
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
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)
|
||||||
@@ -198,6 +202,44 @@ Public Class ClsBancos
|
|||||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
Private Sub DataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub DataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
With SqlCommand
|
With SqlCommand
|
||||||
.Parameters.Clear()
|
.Parameters.Clear()
|
||||||
@@ -4068,6 +4110,7 @@ Public Class ClsBancos
|
|||||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ Public Class ClsBase
|
|||||||
Protected Data As DataTable
|
Protected Data As DataTable
|
||||||
Protected disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Protected disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
Protected EsTransaccion As Boolean = False
|
Protected EsTransaccion As Boolean = False
|
||||||
|
'REGISTRAR CONEXIÓN
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Public Sub IniciaTransacSQL()
|
Public Sub IniciaTransacSQL()
|
||||||
@@ -44,6 +46,7 @@ Public Class ClsBase
|
|||||||
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
|
||||||
|
ConexionAdd()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub AbrirConexion()
|
Protected Sub AbrirConexion()
|
||||||
@@ -103,6 +106,42 @@ Public Class ClsBase
|
|||||||
End With
|
End With
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
Protected Sub DataCommand(strSQL As String, Optional TipoComando As CommandType = CommandType.Text)
|
Protected Sub DataCommand(strSQL As String, Optional TipoComando As CommandType = CommandType.Text)
|
||||||
If sqlCommand Is Nothing Then
|
If sqlCommand Is Nothing Then
|
||||||
sqlCommand = New SqlCommand
|
sqlCommand = New SqlCommand
|
||||||
@@ -161,6 +200,7 @@ Public Class ClsBase
|
|||||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ Public Class ClsCGame
|
|||||||
Private Data As DataTable
|
Private Data As DataTable
|
||||||
|
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIÓN
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
|
|
||||||
Public ReadOnly Property DtResultados() As DataTable
|
Public ReadOnly Property DtResultados() As DataTable
|
||||||
Get
|
Get
|
||||||
@@ -55,7 +57,7 @@ Public Class ClsCGame
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
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
|
||||||
@@ -66,6 +68,42 @@ Public Class ClsCGame
|
|||||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#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
|
||||||
@@ -3365,6 +3403,7 @@ Public Class ClsCGame
|
|||||||
Me.disposedValue = True
|
Me.disposedValue = True
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ Public Class ClsCRM
|
|||||||
Private DSet As New DataSet
|
Private DSet As New DataSet
|
||||||
|
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -52,7 +53,7 @@ Public Class ClsCRM
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
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
|
||||||
@@ -63,6 +64,42 @@ Public Class ClsCRM
|
|||||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#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
|
||||||
@@ -822,6 +859,20 @@ Public Class ClsCRM
|
|||||||
End Try
|
End Try
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
Public Function GetAcercamientosGastos(CveAcercamiento As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_CRM_AcercamientosGastosGet")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveAcercamiento", SqlDbType.Int).Value = CveAcercamiento
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener los Gastos del Acercamiento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -983,6 +1034,7 @@ Public Class ClsCRM
|
|||||||
Me.disposedValue = True
|
Me.disposedValue = True
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ Public Class ClsClaseBase
|
|||||||
Protected disposedValue As Boolean = False
|
Protected disposedValue As Boolean = False
|
||||||
Protected EsTransaccion As Boolean = False
|
Protected EsTransaccion As Boolean = False
|
||||||
Public MyCurrentError As String
|
Public MyCurrentError As String
|
||||||
|
'REGISTRAR CONEXIÓN
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Public Sub New(Optional adsObj As ClsClaseBase = Nothing)
|
Public Sub New(Optional adsObj As ClsClaseBase = Nothing)
|
||||||
@@ -36,6 +38,7 @@ Public Class ClsClaseBase
|
|||||||
Try
|
Try
|
||||||
SqlConexion.Open()
|
SqlConexion.Open()
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
ConexionAdd()
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||||
|
|
||||||
@@ -75,7 +78,42 @@ Public Class ClsClaseBase
|
|||||||
DTSet = New DataSet()
|
DTSet = New DataSet()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
#Region "Conexiones"
|
||||||
|
|
||||||
|
Private Sub ConexionAdd()
|
||||||
|
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||||
|
Try
|
||||||
|
SqlDataAdapter("PA_Sis_RegistrarConexion")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||||
|
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
SqlDataAdapter(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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
Protected Sub addParameters(name As String, tipo As SqlDbType, valor As Object)
|
Protected Sub addParameters(name As String, tipo As SqlDbType, valor As Object)
|
||||||
|
|
||||||
If SqlConexion.State = ConnectionState.Open Then
|
If SqlConexion.State = ConnectionState.Open Then
|
||||||
@@ -133,6 +171,7 @@ Public Class ClsClaseBase
|
|||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
|
ConexionClose()
|
||||||
If (SqlConexion IsNot Nothing) Then
|
If (SqlConexion IsNot Nothing) Then
|
||||||
If SqlConexion.State = ConnectionState.Open Then
|
If SqlConexion.State = ConnectionState.Open Then
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ Public Class ClsClasificaciones
|
|||||||
Private StrSQL As StringBuilder
|
Private StrSQL As StringBuilder
|
||||||
Private Data As DataTable
|
Private Data As DataTable
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIÓN
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
@@ -51,7 +52,7 @@ Public Class ClsClasificaciones
|
|||||||
SqlCommand = New SqlCommand("", SqlConexion)
|
SqlCommand = New SqlCommand("", SqlConexion)
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
StrSQL = New StringBuilder
|
StrSQL = New StringBuilder
|
||||||
|
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)
|
||||||
@@ -63,6 +64,42 @@ Public Class ClsClasificaciones
|
|||||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#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()
|
||||||
@@ -531,6 +568,7 @@ Public Class ClsClasificaciones
|
|||||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ Public Class ClsClientes
|
|||||||
|
|
||||||
'Atributos de la clase
|
'Atributos de la clase
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIÓN
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
@@ -187,7 +188,7 @@ Public Class ClsClientes
|
|||||||
|
|
||||||
SqlCommand = New SqlCommand("", SqlConexion)
|
SqlCommand = New SqlCommand("", SqlConexion)
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
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
|
||||||
@@ -198,6 +199,42 @@ Public Class ClsClientes
|
|||||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
Private Sub DataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub DataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
With SqlCommand
|
With SqlCommand
|
||||||
.Parameters.Clear()
|
.Parameters.Clear()
|
||||||
@@ -1586,6 +1623,7 @@ Public Class ClsClientes
|
|||||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ Public Class ClsCompEstatusFactura
|
|||||||
Private SqlTransacc As SqlTransaction
|
Private SqlTransacc As SqlTransaction
|
||||||
Private Data As DataTable
|
Private Data As DataTable
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIÓN
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -47,7 +49,7 @@ Public Class ClsCompEstatusFactura
|
|||||||
|
|
||||||
SqlCommand = New SqlCommand("", SqlConexion)
|
SqlCommand = New SqlCommand("", SqlConexion)
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
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)
|
||||||
@@ -59,7 +61,42 @@ Public Class ClsCompEstatusFactura
|
|||||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
Public Function GetEstatusFactura() As Boolean
|
Public Function GetEstatusFactura() As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -189,6 +226,7 @@ Public Class ClsCompEstatusFactura
|
|||||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ Public Class ClsCompProveedores
|
|||||||
|
|
||||||
'Atributos de la clase
|
'Atributos de la clase
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIÓN
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
@@ -171,7 +173,7 @@ Public Class ClsCompProveedores
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
ConexionAdd()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub DataAdapter(ByVal pStrSQL As String, Optional ByVal TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub DataAdapter(ByVal pStrSQL As String, Optional ByVal TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
With SqlAdapter.SelectCommand
|
With SqlAdapter.SelectCommand
|
||||||
@@ -182,7 +184,42 @@ Public Class ClsCompProveedores
|
|||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
If SqlTransacc IsNot Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If SqlTransacc IsNot Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
Public Function GetClasificacionProveedores() As Boolean
|
Public Function GetClasificacionProveedores() As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -1534,6 +1571,7 @@ Public Class ClsCompProveedores
|
|||||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ Public Class ClsCompras
|
|||||||
|
|
||||||
'Atributos de la clase
|
'Atributos de la clase
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -64,6 +66,7 @@ Public Class ClsCompras
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
ConexionAdd()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -77,7 +80,42 @@ Public Class ClsCompras
|
|||||||
If SqlTransacc IsNot Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If SqlTransacc IsNot Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
Public Function GetCompras(CveCompra As Integer, Serie As String, Folio As String, CveProveedor As Integer, IdPoliza As Integer, CveEmpresa As Integer, Optional ProveedorRFC As String = "-1") As Boolean
|
Public Function GetCompras(CveCompra As Integer, Serie As String, Folio As String, CveProveedor As Integer, IdPoliza As Integer, CveEmpresa As Integer, Optional ProveedorRFC As String = "-1") As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
@@ -1838,6 +1876,7 @@ Public Class ClsCompras
|
|||||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ Public Class ClsContPAQi
|
|||||||
Private DSet As New DataSet
|
Private DSet As New DataSet
|
||||||
Private StrSQL As StringBuilder
|
Private StrSQL As StringBuilder
|
||||||
Public FolioNuevo As Integer
|
Public FolioNuevo As Integer
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
|
||||||
Public Enum TipoPoliza
|
Public Enum TipoPoliza
|
||||||
@@ -65,7 +66,7 @@ Public Class ClsContPAQi
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||||
End Try
|
End Try
|
||||||
|
ConexionAdd()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
@@ -88,7 +89,7 @@ Public Class ClsContPAQi
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||||
End Try
|
End Try
|
||||||
|
ConexionAdd()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub SetTimeOut(Optional Tiempo As Integer = 30)
|
Private Sub SetTimeOut(Optional Tiempo As Integer = 30)
|
||||||
SqlCommand.CommandTimeout = Tiempo
|
SqlCommand.CommandTimeout = Tiempo
|
||||||
@@ -105,7 +106,42 @@ Public Class ClsContPAQi
|
|||||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
End Sub
|
||||||
|
#Region "Conexiones"
|
||||||
|
|
||||||
|
Private Sub ConexionAdd()
|
||||||
|
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||||
|
Try
|
||||||
|
SqlDataAdapter("PA_Sis_RegistrarConexion")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||||
|
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
SqlDataAdapter(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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
Private Sub SqlDataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub SqlDataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
With SqlCommand
|
With SqlCommand
|
||||||
.Parameters.Clear()
|
.Parameters.Clear()
|
||||||
@@ -11164,6 +11200,7 @@ Public Class ClsContPAQi
|
|||||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ Public Class ClsContPAQi2
|
|||||||
Private Data As DataTable
|
Private Data As DataTable
|
||||||
Private StrSQL As StringBuilder
|
Private StrSQL As StringBuilder
|
||||||
Public FolioNuevo As Integer
|
Public FolioNuevo As Integer
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
|
||||||
Public Enum TipoPoliza
|
Public Enum TipoPoliza
|
||||||
@@ -55,7 +56,7 @@ Public Class ClsContPAQi2
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||||
End Try
|
End Try
|
||||||
|
ConexionAdd()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub New(Empresa As Empresa)
|
Sub New(Empresa As Empresa)
|
||||||
@@ -72,7 +73,7 @@ Public Class ClsContPAQi2
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||||
End Try
|
End Try
|
||||||
|
ConexionAdd()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SqlDataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub SqlDataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
@@ -84,7 +85,42 @@ Public Class ClsContPAQi2
|
|||||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
End Sub
|
||||||
|
#Region "Conexiones"
|
||||||
|
|
||||||
|
Private Sub ConexionAdd()
|
||||||
|
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||||
|
Try
|
||||||
|
SqlDataAdapter("PA_Sis_RegistrarConexion")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||||
|
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
SqlDataAdapter(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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
Private Sub SqlDataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub SqlDataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
With SqlCommand
|
With SqlCommand
|
||||||
.Parameters.Clear()
|
.Parameters.Clear()
|
||||||
@@ -999,6 +1035,7 @@ Public Class ClsContPAQi2
|
|||||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ Public Class ClsContabilidad
|
|||||||
'Atributos de la clase
|
'Atributos de la clase
|
||||||
|
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " P R O P I E D A D E S"
|
#Region " P R O P I E D A D E S"
|
||||||
@@ -98,7 +99,7 @@ Public Class ClsContabilidad
|
|||||||
End If
|
End If
|
||||||
Mensaje = New StringBuilder
|
Mensaje = New StringBuilder
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
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)
|
||||||
@@ -110,6 +111,42 @@ Public Class ClsContabilidad
|
|||||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region " C O N T A B I L I D A D - P R E P O L I Z A"
|
#Region " C O N T A B I L I D A D - P R E P O L I Z A"
|
||||||
@@ -5788,6 +5825,7 @@ Public Class ClsContabilidad
|
|||||||
Me.disposedValue = True
|
Me.disposedValue = True
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ Public Class ClsContratos
|
|||||||
Private Dataset As DataSet
|
Private Dataset As DataSet
|
||||||
Private SqlTransacc As SqlTransaction
|
Private SqlTransacc As SqlTransaction
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
@@ -66,7 +68,7 @@ Public Class ClsContratos
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
ConexionAdd()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
@@ -80,7 +82,42 @@ Public Class ClsContratos
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
#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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
#Region "P R O P I E D A D E S - C O N T R A T O S"
|
#Region "P R O P I E D A D E S - C O N T R A T O S"
|
||||||
Public Property CveContrato As Integer
|
Public Property CveContrato As Integer
|
||||||
@@ -2774,6 +2811,7 @@ Public Class ClsContratos
|
|||||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ Public Class ClsDG
|
|||||||
Private Data As DataTable
|
Private Data As DataTable
|
||||||
|
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
@@ -47,7 +49,7 @@ Public Class ClsDG
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
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
|
||||||
@@ -58,7 +60,42 @@ Public Class ClsDG
|
|||||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#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
|
||||||
@@ -611,6 +648,7 @@ Public Class ClsDG
|
|||||||
Me.disposedValue = True
|
Me.disposedValue = True
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ Public Class ClsDesarrollo
|
|||||||
'Atributos de la clase
|
'Atributos de la clase
|
||||||
|
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
@@ -44,7 +45,7 @@ Public Class ClsDesarrollo
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
End Try
|
||||||
|
ConexionAdd()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
@@ -57,7 +58,42 @@ Public Class ClsDesarrollo
|
|||||||
End With
|
End With
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
Public Function DesarrolloAddUpdate(CveDesarrollo As Integer, Desarrollo As String, CveEvento As Integer, CveUsuarioResponsable As Integer, CveUsuarioPruebas As Integer, CveModulo As Integer, Descripcion As String, CveUsuarioAsignado As Integer,
|
Public Function DesarrolloAddUpdate(CveDesarrollo As Integer, Desarrollo As String, CveEvento As Integer, CveUsuarioResponsable As Integer, CveUsuarioPruebas As Integer, CveModulo As Integer, Descripcion As String, CveUsuarioAsignado As Integer,
|
||||||
FechaAsignacion As Date, TiempoEstimado As Integer, CveDesarrolloEstado As Integer, Manual As Integer, CveUsuario As Integer, Optional FechaTermino As Date = Nothing) As Boolean
|
FechaAsignacion As Date, TiempoEstimado As Integer, CveDesarrolloEstado As Integer, Manual As Integer, CveUsuario As Integer, Optional FechaTermino As Date = Nothing) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
@@ -535,6 +571,7 @@ Public Class ClsDesarrollo
|
|||||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ Public Class ClsEdoc
|
|||||||
Private Data As DataTable
|
Private Data As DataTable
|
||||||
Private DSet As New DataSet
|
Private DSet As New DataSet
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
|
|
||||||
Private Sub SqlDataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub SqlDataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
With SqlAdapter.SelectCommand
|
With SqlAdapter.SelectCommand
|
||||||
@@ -29,7 +31,42 @@ Public Class ClsEdoc
|
|||||||
End If
|
End If
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#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
|
||||||
@@ -62,7 +99,7 @@ Public Class ClsEdoc
|
|||||||
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
|
||||||
|
ConexionAdd()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
With SqlAdapter.SelectCommand
|
With SqlAdapter.SelectCommand
|
||||||
@@ -285,6 +322,7 @@ Public Class ClsEdoc
|
|||||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ Public Class ClsEdocumentacion
|
|||||||
Private Data As DataTable
|
Private Data As DataTable
|
||||||
Private DSet As New DataSet
|
Private DSet As New DataSet
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
|
|
||||||
Private Sub SqlDataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub SqlDataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
With SqlAdapter.SelectCommand
|
With SqlAdapter.SelectCommand
|
||||||
@@ -57,7 +59,7 @@ Public Class ClsEdocumentacion
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
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
|
||||||
@@ -68,7 +70,42 @@ Public Class ClsEdocumentacion
|
|||||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#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
|
||||||
@@ -464,6 +501,7 @@ Public Class ClsEdocumentacion
|
|||||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ Public Class ClsEdosFinancieros
|
|||||||
Private SqlAdapter As SqlDataAdapter = Nothing
|
Private SqlAdapter As SqlDataAdapter = Nothing
|
||||||
Private SqlCommand As SqlCommand = Nothing
|
Private SqlCommand As SqlCommand = Nothing
|
||||||
Private disposedValue As Boolean = False ' To detect redundant calls
|
Private disposedValue As Boolean = False ' To detect redundant calls
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
|
|
||||||
Public ReadOnly Property Data As DataTable
|
Public ReadOnly Property Data As DataTable
|
||||||
Get
|
Get
|
||||||
@@ -37,7 +39,7 @@ Public Class ClsEdosFinancieros
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||||
End Try
|
End Try
|
||||||
|
ConexionAdd()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub New(Empresa As Empresa)
|
Sub New(Empresa As Empresa)
|
||||||
@@ -54,9 +56,52 @@ Public Class ClsEdosFinancieros
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||||
End Try
|
End Try
|
||||||
|
ConexionAdd()
|
||||||
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
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
|
||||||
|
DT = New DataTable
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
Private Sub SqlDataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.Text)
|
Private Sub SqlDataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.Text)
|
||||||
With SqlAdapter.SelectCommand
|
With SqlAdapter.SelectCommand
|
||||||
.Parameters.Clear()
|
.Parameters.Clear()
|
||||||
@@ -854,6 +899,7 @@ Public Class ClsEdosFinancieros
|
|||||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' Do not change this code. Put cleanup code in Dispose(ByVal disposing As Boolean) above.
|
' Do not change this code. Put cleanup code in Dispose(ByVal disposing As Boolean) above.
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ Public Class ClsEncuestas
|
|||||||
Private Data As DataTable
|
Private Data As DataTable
|
||||||
|
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
|
|
||||||
Public ReadOnly Property DtResultados() As DataTable
|
Public ReadOnly Property DtResultados() As DataTable
|
||||||
Get
|
Get
|
||||||
@@ -40,7 +42,7 @@ Public Class ClsEncuestas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
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
|
||||||
@@ -51,6 +53,42 @@ Public Class ClsEncuestas
|
|||||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#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
|
||||||
@@ -673,6 +711,7 @@ Public Class ClsEncuestas
|
|||||||
Me.disposedValue = True
|
Me.disposedValue = True
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ Public Class ClsEsquemasComisiones
|
|||||||
|
|
||||||
'Atributos de la clase
|
'Atributos de la clase
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -62,7 +64,7 @@ Public Class ClsEsquemasComisiones
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
ConexionAdd()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub DataAdapter(ByVal pStrSQL As String, Optional ByVal TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub DataAdapter(ByVal pStrSQL As String, Optional ByVal TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
With SqlAdapter.SelectCommand
|
With SqlAdapter.SelectCommand
|
||||||
@@ -73,6 +75,42 @@ Public Class ClsEsquemasComisiones
|
|||||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
#Region "ESQUEMAS COMISIONES"
|
#Region "ESQUEMAS COMISIONES"
|
||||||
Public Function GetEsquemaComisiones(CveEsquemaComision As Integer, EsquemaComision As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
Public Function GetEsquemaComisiones(CveEsquemaComision As Integer, EsquemaComision As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||||
@@ -485,6 +523,7 @@ Public Class ClsEsquemasComisiones
|
|||||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ Public Class ClsEstatusFactura
|
|||||||
Private SqlTransacc As SqlTransaction
|
Private SqlTransacc As SqlTransaction
|
||||||
Private Data As DataTable
|
Private Data As DataTable
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -47,7 +49,7 @@ Public Class ClsEstatusFactura
|
|||||||
|
|
||||||
SqlCommand = New SqlCommand("", SqlConexion)
|
SqlCommand = New SqlCommand("", SqlConexion)
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
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)
|
||||||
@@ -59,7 +61,42 @@ Public Class ClsEstatusFactura
|
|||||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
Private Sub DataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub DataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
With SqlCommand
|
With SqlCommand
|
||||||
.Parameters.Clear()
|
.Parameters.Clear()
|
||||||
@@ -216,6 +253,7 @@ Public Class ClsEstatusFactura
|
|||||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ Public Class ClsEventos
|
|||||||
'Atributos de la clase
|
'Atributos de la clase
|
||||||
|
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -56,7 +58,7 @@ Public Class ClsEventos
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
End Try
|
||||||
|
ConexionAdd()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
@@ -67,6 +69,42 @@ Public Class ClsEventos
|
|||||||
End With
|
End With
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
Public Function GetEventos(TipoReferencia As String, Referencia As String, EsMesActual As Boolean, CveUsuario As Integer, CveEmpresa As Integer, EsAgenda As Boolean, CveEvento As Integer) As Boolean
|
Public Function GetEventos(TipoReferencia As String, Referencia As String, EsMesActual As Boolean, CveUsuario As Integer, CveEmpresa As Integer, EsAgenda As Boolean, CveEvento As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
@@ -209,6 +247,7 @@ Public Class ClsEventos
|
|||||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ Public Class ClsFISConfiguracion
|
|||||||
'Atributos de la clase
|
'Atributos de la clase
|
||||||
|
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
@@ -49,8 +50,52 @@ Public Class ClsFISConfiguracion
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
End Try
|
||||||
|
ConexionAdd()
|
||||||
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
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
|
||||||
|
Data = New DataTable
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
Public Function GetConfiguracion(CveEmpresa As Integer) As Boolean
|
Public Function GetConfiguracion(CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
@@ -140,6 +185,7 @@ Public Class ClsFISConfiguracion
|
|||||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ Public Class ClsFinanzas
|
|||||||
|
|
||||||
'Atributos de la clase
|
'Atributos de la clase
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -124,7 +126,7 @@ Public Class ClsFinanzas
|
|||||||
|
|
||||||
SqlCommand = New SqlCommand("", SqlConexion)
|
SqlCommand = New SqlCommand("", SqlConexion)
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
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
|
||||||
@@ -135,6 +137,42 @@ Public Class ClsFinanzas
|
|||||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
Private Sub DataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub DataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
With SqlCommand
|
With SqlCommand
|
||||||
.Parameters.Clear()
|
.Parameters.Clear()
|
||||||
@@ -174,6 +212,7 @@ Public Class ClsFinanzas
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ Public Class ClsFlotillas
|
|||||||
'Atributos de la clase
|
'Atributos de la clase
|
||||||
|
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -66,7 +68,7 @@ Public Class ClsFlotillas
|
|||||||
|
|
||||||
SqlCommand = New SqlCommand("", SqlConexion)
|
SqlCommand = New SqlCommand("", SqlConexion)
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
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)
|
||||||
@@ -78,7 +80,42 @@ Public Class ClsFlotillas
|
|||||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
Private Sub DataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub DataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
With SqlCommand
|
With SqlCommand
|
||||||
.Parameters.Clear()
|
.Parameters.Clear()
|
||||||
@@ -725,6 +762,7 @@ Public Class ClsFlotillas
|
|||||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ Public Class ClsGPS
|
|||||||
Private Dataset As DataSet
|
Private Dataset As DataSet
|
||||||
|
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
|
|
||||||
Public ReadOnly Property DtResultados() As DataTable
|
Public ReadOnly Property DtResultados() As DataTable
|
||||||
Get
|
Get
|
||||||
@@ -62,7 +64,7 @@ Public Class ClsGPS
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
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
|
||||||
@@ -73,6 +75,42 @@ Public Class ClsGPS
|
|||||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#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
|
||||||
@@ -5287,6 +5325,7 @@ Public Class ClsGPS
|
|||||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ Public Class ClsGPSHerramientas
|
|||||||
Private Data As DataTable
|
Private Data As DataTable
|
||||||
|
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
@@ -37,7 +39,7 @@ Public Class ClsGPSHerramientas
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||||
End Try
|
End Try
|
||||||
|
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)
|
||||||
@@ -48,6 +50,42 @@ Public Class ClsGPSHerramientas
|
|||||||
End With
|
End With
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
#Region "Metodos Generales"
|
#Region "Metodos Generales"
|
||||||
Public Sub EjecutarComandoSMS(CveComando As Integer, CveDispositivo As Integer, CveUsuario As Integer, Optional Valor As String = "")
|
Public Sub EjecutarComandoSMS(CveComando As Integer, CveDispositivo As Integer, CveUsuario As Integer, Optional Valor As String = "")
|
||||||
@@ -165,6 +203,7 @@ Public Class ClsGPSHerramientas
|
|||||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ Public Class ClsGenerales
|
|||||||
Private SqlTransacc As SqlTransaction
|
Private SqlTransacc As SqlTransaction
|
||||||
Private Data As DataTable
|
Private Data As DataTable
|
||||||
Private disposedValue As Boolean = False
|
Private disposedValue As Boolean = False
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
@@ -75,7 +77,7 @@ Public Class ClsGenerales
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
ConexionAdd()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub DataAdapter(ByVal pStrSQL As String, Optional ByVal TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub DataAdapter(ByVal pStrSQL As String, Optional ByVal TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
With SqlAdapter.SelectCommand
|
With SqlAdapter.SelectCommand
|
||||||
@@ -86,6 +88,42 @@ Public Class ClsGenerales
|
|||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
If SqlTransacc IsNot Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If SqlTransacc IsNot Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
Private Sub DataCommand(ByVal pStrSQL As String, Optional ByVal TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub DataCommand(ByVal pStrSQL As String, Optional ByVal TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
With SqlCommand
|
With SqlCommand
|
||||||
@@ -2882,6 +2920,7 @@ Public Class ClsGenerales
|
|||||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ Public Class ClsGralFolios
|
|||||||
Private _FechaIng As Date
|
Private _FechaIng As Date
|
||||||
|
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -73,7 +75,7 @@ Public Class ClsGralFolios
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
ConexionAdd()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
@@ -85,6 +87,42 @@ Public Class ClsGralFolios
|
|||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
If SqlTransacc IsNot Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If SqlTransacc IsNot Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
Public Function GetFolios(Optional TipoDocto As String = "-1", Optional CveEmpresa As Integer = -1) As Boolean
|
Public Function GetFolios(Optional TipoDocto As String = "-1", Optional CveEmpresa As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
@@ -257,6 +295,7 @@ Public Class ClsGralFolios
|
|||||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ Public Class ClsGralProductosServiciosCaracteristicas
|
|||||||
Private SqlTransacc As SqlTransaction
|
Private SqlTransacc As SqlTransaction
|
||||||
Private Data As DataTable
|
Private Data As DataTable
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
@@ -48,7 +50,7 @@ Public Class ClsGralProductosServiciosCaracteristicas
|
|||||||
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
|
||||||
|
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)
|
||||||
@@ -60,7 +62,42 @@ Public Class ClsGralProductosServiciosCaracteristicas
|
|||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
#Region "ProductosServiciosCaracteristicas"
|
#Region "ProductosServiciosCaracteristicas"
|
||||||
|
|
||||||
Public Function GetProductosServiciosCaracteristicas(Optional CveEmpresa As Integer = -1, Optional CveSubProyecto As Integer = -1) As Boolean
|
Public Function GetProductosServiciosCaracteristicas(Optional CveEmpresa As Integer = -1, Optional CveSubProyecto As Integer = -1) As Boolean
|
||||||
@@ -285,6 +322,7 @@ Public Class ClsGralProductosServiciosCaracteristicas
|
|||||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ Public Class ClsImpuestos
|
|||||||
Private Data As DataTable
|
Private Data As DataTable
|
||||||
|
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
@@ -45,7 +47,7 @@ Public Class ClsImpuestos
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
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
|
||||||
@@ -56,6 +58,42 @@ Public Class ClsImpuestos
|
|||||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#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()
|
||||||
@@ -118,6 +156,7 @@ Public Class ClsImpuestos
|
|||||||
Me.disposedValue = True
|
Me.disposedValue = True
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ Public Class ClsIndicadores
|
|||||||
Private Data As DataTable
|
Private Data As DataTable
|
||||||
'Atributos de la clase
|
'Atributos de la clase
|
||||||
Private disposedValue As Boolean = False
|
Private disposedValue As Boolean = False
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
@@ -49,7 +51,7 @@ Public Class ClsIndicadores
|
|||||||
SqlCommand = New SqlCommand("", SqlConexion)
|
SqlCommand = New SqlCommand("", SqlConexion)
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
StrSQL = New StringBuilder
|
StrSQL = New StringBuilder
|
||||||
|
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
|
||||||
@@ -60,6 +62,42 @@ Public Class ClsIndicadores
|
|||||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
Private Sub DataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub DataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
With SqlCommand
|
With SqlCommand
|
||||||
.Parameters.Clear()
|
.Parameters.Clear()
|
||||||
@@ -107,6 +145,7 @@ Public Class ClsIndicadores
|
|||||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -16,6 +16,9 @@ Public Class ClsInventarios
|
|||||||
Private Data As DataTable
|
Private Data As DataTable
|
||||||
|
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -147,7 +150,7 @@ Public Class ClsInventarios
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
ConexionAdd()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
@@ -159,7 +162,42 @@ Public Class ClsInventarios
|
|||||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
#Region " INVENTARIOS - CONCEPTOS "
|
#Region " INVENTARIOS - CONCEPTOS "
|
||||||
|
|
||||||
@@ -4652,6 +4690,7 @@ Public Class ClsInventarios
|
|||||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ Public Class ClsLeyendasFiscales
|
|||||||
|
|
||||||
'Atributos de la clase
|
'Atributos de la clase
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -39,8 +41,52 @@ Public Class ClsLeyendasFiscales
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
End Try
|
||||||
|
ConexionAdd()
|
||||||
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
|
With SqlAdapter.SelectCommand
|
||||||
|
.Parameters.Clear()
|
||||||
|
.CommandText = pStrSQL
|
||||||
|
.CommandType = TipoComando
|
||||||
|
End With
|
||||||
|
Data = New DataTable
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
Public Function GetLeyendasFiscales() As Boolean
|
Public Function GetLeyendasFiscales() As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
@@ -167,6 +213,7 @@ Public Class ClsLeyendasFiscales
|
|||||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ Public Class ClsMF
|
|||||||
Private SqlCommand As SqlCommand
|
Private SqlCommand As SqlCommand
|
||||||
Private SqlTransacc As SqlTransaction
|
Private SqlTransacc As SqlTransaction
|
||||||
Private Data As DataTable
|
Private Data As DataTable
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
|
|
||||||
|
|
||||||
Public ReadOnly Property DtResultados() As DataTable
|
Public ReadOnly Property DtResultados() As DataTable
|
||||||
@@ -46,7 +47,7 @@ Public Class ClsMF
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
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
|
||||||
@@ -57,6 +58,42 @@ Public Class ClsMF
|
|||||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#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
|
||||||
@@ -683,6 +720,7 @@ Public Class ClsMF
|
|||||||
Me.disposedValue = True
|
Me.disposedValue = True
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ Public Class ClsMetodosPagos
|
|||||||
|
|
||||||
'Atributos de la clase
|
'Atributos de la clase
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -41,9 +43,53 @@ Public Class ClsMetodosPagos
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
End Try
|
||||||
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
ConexionAdd()
|
||||||
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
|
With SqlAdapter.SelectCommand
|
||||||
|
.Parameters.Clear()
|
||||||
|
.CommandText = pStrSQL
|
||||||
|
.CommandType = TipoComando
|
||||||
|
End With
|
||||||
|
Data = New DataTable
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
Public Function GetMetodosPago() As Boolean
|
Public Function GetMetodosPago() As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
@@ -90,6 +136,7 @@ Public Class ClsMetodosPagos
|
|||||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ Public Class ClsModulos
|
|||||||
Private _CvePlataforma As String
|
Private _CvePlataforma As String
|
||||||
|
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
@@ -142,7 +144,7 @@ Public Class ClsModulos
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
ConexionAdd()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
@@ -154,7 +156,42 @@ Public Class ClsModulos
|
|||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
|
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
Public Function GetModulos(CveModulo As Integer, CvePadre As Integer, Descripcion As String, DescripcionLike As String) As Boolean
|
Public Function GetModulos(CveModulo As Integer, CvePadre As Integer, Descripcion As String, DescripcionLike As String) As Boolean
|
||||||
Dim OnError As Boolean = False
|
Dim OnError As Boolean = False
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
@@ -392,6 +429,7 @@ Public Class ClsModulos
|
|||||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' No cambie este código. Coloque el código de limpieza en Dispose ( que se dispone como Boolean).
|
' No cambie este código. Coloque el código de limpieza en Dispose ( que se dispone como Boolean).
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ Public Class ClsMonedas
|
|||||||
|
|
||||||
'Atributos de la clase
|
'Atributos de la clase
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -47,7 +49,7 @@ Public Class ClsMonedas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
ConexionAdd()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
@@ -59,7 +61,42 @@ Public Class ClsMonedas
|
|||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
' If SqlTransacc IsNot Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
' If SqlTransacc IsNot Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
Public Function GetMonedas() As Boolean
|
Public Function GetMonedas() As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_MonedasGet")
|
DataAdapter("PA_MonedasGet")
|
||||||
@@ -120,6 +157,7 @@ Public Class ClsMonedas
|
|||||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ Public Class ClsMovimientos
|
|||||||
|
|
||||||
'Atributos de la clase
|
'Atributos de la clase
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -42,7 +44,7 @@ Public Class ClsMovimientos
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
End Try
|
||||||
|
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)
|
||||||
@@ -54,6 +56,42 @@ Public Class ClsMovimientos
|
|||||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
Public Sub IniciaTransacSQL()
|
Public Sub IniciaTransacSQL()
|
||||||
SqlTransacc = SqlConexion.BeginTransaction()
|
SqlTransacc = SqlConexion.BeginTransaction()
|
||||||
@@ -1688,6 +1726,7 @@ Public Class ClsMovimientos
|
|||||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ Public Class ClsNominas
|
|||||||
Private SqlTransacc As SqlTransaction
|
Private SqlTransacc As SqlTransaction
|
||||||
Private Data As DataTable
|
Private Data As DataTable
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
|
Private CveConexion As Integer = 0
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Propiedades ClsNominas_Nominas"
|
#Region "Propiedades ClsNominas_Nominas"
|
||||||
@@ -96,7 +98,7 @@ Public Class ClsNominas
|
|||||||
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
|
||||||
|
ConexionAdd()
|
||||||
End Sub
|
End Sub
|
||||||
Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing)
|
Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing)
|
||||||
|
|
||||||
@@ -114,7 +116,7 @@ Public Class ClsNominas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
ConexionAdd()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
With SqlAdapter.SelectCommand
|
With SqlAdapter.SelectCommand
|
||||||
@@ -125,6 +127,42 @@ Public Class ClsNominas
|
|||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
If SqlTransacc IsNot Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
If SqlTransacc IsNot Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||||
End Sub
|
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 = HttpContext.Current.Request.Url.AbsolutePath.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
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
#Region "ClsNominas_Nominas"
|
#Region "ClsNominas_Nominas"
|
||||||
|
|
||||||
@@ -1733,6 +1771,7 @@ Public Class ClsNominas
|
|||||||
disposedValue = True
|
disposedValue = True
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ Public Class ClsRH
|
|||||||
'DataAdapter(String.Format("INSERT INTO Sis_Conexiones (Clase,Modulo) VALUES ('ClsRH','{0}')", "RH/CatMotivosBaja"), CommandType.Text) ' pendiente de terminar parra registrar el cveconexion, falta el rarámetro de módulo
|
'DataAdapter(String.Format("INSERT INTO Sis_Conexiones (Clase,Modulo) VALUES ('ClsRH','{0}')", "RH/CatMotivosBaja"), CommandType.Text) ' pendiente de terminar parra registrar el cveconexion, falta el rarámetro de módulo
|
||||||
DataAdapter("PA_Sis_RegistrarConexion")
|
DataAdapter("PA_Sis_RegistrarConexion")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@Clase", SqlDbType.VarChar).Value = "ClsRH"
|
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||||
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
|
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
End With
|
End With
|
||||||
@@ -99,7 +99,7 @@ Public Class ClsRH
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ConexionClose()
|
Private Sub ConexionClose()
|
||||||
If 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)
|
||||||
|
|
||||||
|
|||||||
@@ -83,7 +83,6 @@ Public Class ClsVentas
|
|||||||
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
|
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
|
||||||
Try
|
Try
|
||||||
SqlConexion.Open()
|
SqlConexion.Open()
|
||||||
ConexionAdd()
|
|
||||||
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
|
||||||
@@ -91,8 +90,8 @@ Public Class ClsVentas
|
|||||||
SqlConexion = TransaccionCompartida.Connection
|
SqlConexion = TransaccionCompartida.Connection
|
||||||
SqlTransacc = TransaccionCompartida
|
SqlTransacc = TransaccionCompartida
|
||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
|
ConexionAdd()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub DataAdapter(ByVal pStrSQL As String, Optional ByVal TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub DataAdapter(ByVal pStrSQL As String, Optional ByVal TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
@@ -109,16 +108,15 @@ Public Class ClsVentas
|
|||||||
|
|
||||||
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
|
||||||
|
|
||||||
DataAdapter(String.Format("INSERT INTO Sis_Conexiones (Clase,Modulo) VALUES ('ClsVentas',{0})", HttpContext.Current.Request.Url.Authority), CommandType.Text) ' pendiente de terminar parra registrar el cveconexion, falta el rarámetro de módulo
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
|
||||||
|
|
||||||
.Add("@CveConexion", SqlDbType.Int).Direction = ParameterDirection.Output
|
|
||||||
End With
|
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
DataAdapter("PA_Sis_RegistrarConexion")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||||
|
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||||
|
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
|
End With
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
CveConexion = SqlAdapter.SelectCommand.Parameters("@Opcion").Value.ToString.ToEntero
|
CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero
|
||||||
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
|
||||||
@@ -127,9 +125,9 @@ Public Class ClsVentas
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ConexionClose()
|
Private Sub ConexionClose()
|
||||||
If 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 = ", 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)
|
||||||
@@ -3963,6 +3961,7 @@ Public Class ClsVentas
|
|||||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||||
Public Sub Dispose() Implements IDisposable.Dispose
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||||
|
ConexionClose()
|
||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ Imports System.Data
|
|||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports System.Xml
|
Imports System.Xml
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
Imports GemBox.Spreadsheet
|
||||||
|
|
||||||
Partial Class Bancos_CargarConciliacionesBancarias
|
Partial Class Bancos_CargarConciliacionesBancarias
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
@@ -83,51 +85,99 @@ Partial Class Bancos_CargarConciliacionesBancarias
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable
|
||||||
|
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||||
|
Dim excelFile As ExcelFile = ExcelFile.Load(flatFilePath)
|
||||||
|
|
||||||
|
Dim unnamed As Integer = 0
|
||||||
|
Dim cols As Integer
|
||||||
|
Dim columns As String()
|
||||||
|
Dim curRow As Integer = 0
|
||||||
|
Dim curCol As Integer = 0
|
||||||
|
Dim dataTable As DataTable = New DataTable()
|
||||||
|
Dim worksheet As ExcelWorksheet = excelFile.Worksheets(0)
|
||||||
|
|
||||||
|
For cols = 0 To worksheet.Rows(0).AllocatedCells.Count - 1
|
||||||
|
|
||||||
|
If firstRowHasHeaders Then
|
||||||
|
|
||||||
|
If worksheet.Rows(0).Cells(cols).Value IsNot Nothing Then
|
||||||
|
dataTable.Columns.Add(worksheet.Rows(0).Cells(cols).Value.ToString())
|
||||||
|
Else
|
||||||
|
dataTable.Columns.Add("Unnamed Column " & (System.Threading.Interlocked.Increment(unnamed)))
|
||||||
|
End If
|
||||||
|
|
||||||
|
curRow = 1
|
||||||
|
Else
|
||||||
|
dataTable.Columns.Add("Column " & (cols + 1))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
While curRow < worksheet.Rows.Count
|
||||||
|
columns = New String(cols - 1) {}
|
||||||
|
|
||||||
|
For curCol = 0 To cols - 1
|
||||||
|
|
||||||
|
If worksheet.Rows(curRow).Cells(curCol).Value Is Nothing Then
|
||||||
|
columns(curCol) = ""
|
||||||
|
Else
|
||||||
|
columns(curCol) = worksheet.Rows(curRow).Cells(curCol).Value.ToString()
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
dataTable.Rows.Add(columns)
|
||||||
|
curRow += 1
|
||||||
|
End While
|
||||||
|
|
||||||
|
Return dataTable
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Sub CargaExcel(Ruta As String, FileName As String, Tipo As String)
|
Private Sub CargaExcel(Ruta As String, FileName As String, Tipo As String)
|
||||||
If Not DdlCuenta.SelectedValue.ToEntero > 0 Then
|
If Not DdlCuenta.SelectedValue.ToEntero > 0 Then
|
||||||
Alert("Tiene que seleccionar una cuenta", TipoMensaje.MsgAdvertencia)
|
Alert("Tiene que seleccionar una cuenta", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
Dim dt As New DataTable
|
Dim dt As New DataTable
|
||||||
Dim Conexion As Odbc.OdbcConnection = Nothing
|
dt = ReadExcelFile(Ruta + FileName, True)
|
||||||
Dim ErrorArchivo = False
|
'Dim Conexion As Odbc.OdbcConnection = Nothing
|
||||||
Dim ErrorExcel = False
|
'Dim ErrorArchivo = False
|
||||||
Dim strConnString As String = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" + Ruta + FileName + ";Extended Properties=Excel 8.0;"
|
'Dim ErrorExcel = False
|
||||||
Dim objDbFactory As Common.DbProviderFactory = Common.DbProviderFactories.GetFactory("System.Data.OleDb")
|
'Dim strConnString As String = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" + Ruta + FileName + ";Extended Properties=Excel 8.0;"
|
||||||
Dim objDbAdapter As Common.DbDataAdapter = objDbFactory.CreateDataAdapter()
|
'Dim objDbFactory As Common.DbProviderFactory = Common.DbProviderFactories.GetFactory("System.Data.OleDb")
|
||||||
Dim objDbConnection As Common.DbConnection = objDbFactory.CreateConnection()
|
'Dim objDbAdapter As Common.DbDataAdapter = objDbFactory.CreateDataAdapter()
|
||||||
objDbConnection.ConnectionString = strConnString
|
'Dim objDbConnection As Common.DbConnection = objDbFactory.CreateConnection()
|
||||||
objDbConnection.Open()
|
'objDbConnection.ConnectionString = strConnString
|
||||||
Dim objSheetNames As DataTable = objDbConnection.GetSchema("Tables")
|
'objDbConnection.Open()
|
||||||
Dim HojaExcel As String = objSheetNames.FiltroPrimeroValor("TABLE_NAME")
|
'Dim objSheetNames As DataTable = objDbConnection.GetSchema("Tables")
|
||||||
Try
|
'Dim HojaExcel As String = objSheetNames.FiltroPrimeroValor("TABLE_NAME")
|
||||||
Select Case Tipo
|
'Try
|
||||||
Case "CSV"
|
' Select Case Tipo
|
||||||
Conexion = New Odbc.OdbcConnection("Driver={Microsoft Access Text Driver (*.txt, *.csv)};Dbq=" + Ruta + ";Extensions=asc,csv,tab,txt;")
|
' Case "CSV"
|
||||||
Conexion.Open()
|
' Conexion = New Odbc.OdbcConnection("Driver={Microsoft Access Text Driver (*.txt, *.csv)};Dbq=" + Ruta + ";Extensions=asc,csv,tab,txt;")
|
||||||
Dim cmd = Conexion.CreateCommand()
|
' Conexion.Open()
|
||||||
cmd.CommandType = CommandType.Text
|
' Dim cmd = Conexion.CreateCommand()
|
||||||
cmd.CommandText = $"SELECT * FROM [{FileName}]"
|
' cmd.CommandType = CommandType.Text
|
||||||
Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
' cmd.CommandText = $"SELECT * FROM [{FileName}]"
|
||||||
DataAdapter.Fill(dt)
|
' Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
||||||
Case "EXCEL"
|
' DataAdapter.Fill(dt)
|
||||||
Conexion = New Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + Ruta + FileName + ";")
|
' Case "EXCEL"
|
||||||
Conexion.Open()
|
' Conexion = New Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + Ruta + FileName + ";")
|
||||||
Dim cmd = Conexion.CreateCommand()
|
' Conexion.Open()
|
||||||
cmd.CommandType = CommandType.Text
|
' Dim cmd = Conexion.CreateCommand()
|
||||||
cmd.CommandText = $"SELECT * FROM [{HojaExcel}]"
|
' cmd.CommandType = CommandType.Text
|
||||||
Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
' cmd.CommandText = $"SELECT * FROM [{HojaExcel}]"
|
||||||
DataAdapter.Fill(dt)
|
' Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
||||||
Case Else
|
' DataAdapter.Fill(dt)
|
||||||
Alert("El archivo no tiene el formato correcto", TipoMensaje.MsgError)
|
' Case Else
|
||||||
Exit Sub
|
' Alert("El archivo no tiene el formato correcto", TipoMensaje.MsgError)
|
||||||
End Select
|
' Exit Sub
|
||||||
Catch ex As Exception
|
' End Select
|
||||||
ErrorArchivo = True
|
'Catch ex As Exception
|
||||||
OnError("Ocurrio un error al leer el archivo <br/>" & ex.Message, ex)
|
' ErrorArchivo = True
|
||||||
End Try
|
' OnError("Ocurrio un error al leer el archivo <br/>" & ex.Message, ex)
|
||||||
Conexion.Close()
|
'End Try
|
||||||
If Not ErrorArchivo Then
|
'Conexion.Close()
|
||||||
|
If dt IsNot Nothing Then
|
||||||
dt.Columns(0).ColumnName = "FechaDocumento"
|
dt.Columns(0).ColumnName = "FechaDocumento"
|
||||||
dt.Columns(1).ColumnName = "Referencia"
|
dt.Columns(1).ColumnName = "Referencia"
|
||||||
dt.Columns(2).ColumnName = "Importe"
|
dt.Columns(2).ColumnName = "Importe"
|
||||||
@@ -166,6 +216,8 @@ Partial Class Bancos_CargarConciliacionesBancarias
|
|||||||
ObjBancos.RollBack()
|
ObjBancos.RollBack()
|
||||||
End If
|
End If
|
||||||
ObjBancos.Dispose()
|
ObjBancos.Dispose()
|
||||||
|
Else
|
||||||
|
Alert("Hubo un error al intentar leer el archivo.", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,12 @@
|
|||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LbPDF" runat="server" OnClick="LbPDF_Click"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LbExcel" runat="server" OnClick="LbExcel_Click"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||||
|
</li>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||||
Catálogo de Bancos
|
Catálogo de Bancos
|
||||||
|
|||||||
@@ -4,54 +4,67 @@ Option Strict On
|
|||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.Linq
|
Imports System.Linq
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
|
||||||
Partial Class Bancos_CatBancos
|
Partial Class Bancos_CatBancos
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Private Property DtBan As DataTable
|
||||||
If Not Page.IsPostBack Then
|
Get
|
||||||
ViewState("Orden") = ""
|
DtBan = DirectCast(ViewState("DtBan"), DataTable)
|
||||||
CargaDatos()
|
End Get
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Sub CargaDatos()
|
Set(ByVal value As DataTable)
|
||||||
Dim ObjBancos As New ClsBancos
|
ViewState("DtBan") = value
|
||||||
If ObjBancos.GetBancos() Then
|
End Set
|
||||||
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
End Property
|
||||||
GlobalDTBancos = ObjBancos.DtResultados
|
|
||||||
Else
|
|
||||||
Me.GvDatos.DataSource = Nothing
|
|
||||||
End If
|
|
||||||
|
|
||||||
ObjBancos.Dispose()
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
|
If Not Page.IsPostBack Then
|
||||||
|
ViewState("Orden") = ""
|
||||||
|
CargaDatos()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
If ViewState("Orden").ToString() <> String.Empty Then
|
Public Sub CargaDatos()
|
||||||
CargaGrid(ViewState("Orden").ToString())
|
Dim ObjBancos As New ClsBancos
|
||||||
Else
|
If ObjBancos.GetBancos() Then
|
||||||
CargaGrid("")
|
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
End If
|
DtBan = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
End Sub
|
GlobalDTBancos = ObjBancos.DtResultados
|
||||||
|
Else
|
||||||
|
Me.GvDatos.DataSource = Nothing
|
||||||
|
End If
|
||||||
|
|
||||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
ObjBancos.Dispose()
|
||||||
Dim ObjBancos As New ClsBancos
|
|
||||||
If ObjBancos.AddBancos(TxtBanco.Text.Trim, TxtEjecutivo.Text.Trim, TxtTelefono.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
If ViewState("Orden").ToString() <> String.Empty Then
|
||||||
TxtBanco.Text = ""
|
CargaGrid(ViewState("Orden").ToString())
|
||||||
TxtEjecutivo.Text = ""
|
Else
|
||||||
|
CargaGrid("")
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||||
|
Dim ObjBancos As New ClsBancos
|
||||||
|
If ObjBancos.AddBancos(TxtBanco.Text.Trim, TxtEjecutivo.Text.Trim, TxtTelefono.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
|
TxtBanco.Text = ""
|
||||||
|
TxtEjecutivo.Text = ""
|
||||||
TxtTelefono.Text = ""
|
TxtTelefono.Text = ""
|
||||||
Alert("El nuevo Banco se guardó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("El nuevo Banco se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
UpTitulos.Update()
|
UpTitulos.Update()
|
||||||
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
GlobalDTBancos = ObjBancos.DtResultados
|
DtBan = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
|
GlobalDTBancos = ObjBancos.DtResultados
|
||||||
|
|
||||||
If ViewState("Orden").ToString() <> String.Empty Then
|
If ViewState("Orden").ToString() <> String.Empty Then
|
||||||
CargaGrid(ViewState("Orden").ToString())
|
CargaGrid(ViewState("Orden").ToString())
|
||||||
Else
|
Else
|
||||||
CargaGrid("")
|
CargaGrid("")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ObjBancos.Dispose()
|
ObjBancos.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "G V D A T O S"
|
#Region "G V D A T O S"
|
||||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||||
@@ -80,6 +93,7 @@ Partial Class Bancos_CatBancos
|
|||||||
If ObjBancos.RemoveBancos(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
If ObjBancos.RemoveBancos(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||||
GvDatos.EditIndex = -1
|
GvDatos.EditIndex = -1
|
||||||
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
|
DtBan = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
GlobalDTBancos = ObjBancos.DtResultados
|
GlobalDTBancos = ObjBancos.DtResultados
|
||||||
Alert("El Banco se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("El Banco se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
End If
|
End If
|
||||||
@@ -116,6 +130,7 @@ Partial Class Bancos_CatBancos
|
|||||||
If ObjBancos.UpdateBancos(Banco, Ejecutivo, Telefono, Estatus, CveBanco) Then
|
If ObjBancos.UpdateBancos(Banco, Ejecutivo, Telefono, Estatus, CveBanco) Then
|
||||||
GvDatos.EditIndex = -1
|
GvDatos.EditIndex = -1
|
||||||
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
|
DtBan = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
GlobalDTBancos = ObjBancos.DtResultados
|
GlobalDTBancos = ObjBancos.DtResultados
|
||||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||||
End If
|
End If
|
||||||
@@ -178,4 +193,28 @@ Partial Class Bancos_CatBancos
|
|||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
Protected Sub LbPDF_Click(sender As Object, e As EventArgs)
|
||||||
|
Imprime("PDF")
|
||||||
|
End Sub
|
||||||
|
Protected Sub LbExcel_Click(sender As Object, e As EventArgs)
|
||||||
|
Imprime("Excel")
|
||||||
|
End Sub
|
||||||
|
Private Sub Imprime(Formato As String)
|
||||||
|
|
||||||
|
If DtBan IsNot Nothing AndAlso DtBan.Rows.Count > 0 Then
|
||||||
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
|
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
|
Dim params As New List(Of ReportParameter)
|
||||||
|
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||||
|
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||||
|
If Imagen.Exists Then
|
||||||
|
params.Add(New ReportParameter("LogoPath", logouri))
|
||||||
|
Else
|
||||||
|
params.Add(New ReportParameter("LogoPath", ""))
|
||||||
|
End If
|
||||||
|
ImprimirPDF("Empresas/Grales/Formatos/RepBancos.rdlc", DtBan, params, "Reporte Bancos", Formato)
|
||||||
|
Else
|
||||||
|
Alert("No hay información para mostrar.", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -6,14 +6,17 @@
|
|||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||||
<asp:UpdatePanel runat="server">
|
|
||||||
<ContentTemplate>
|
<li>
|
||||||
<li>
|
<asp:LinkButton ID="LBAdd" PostBackUrl="/Bancos/CuentasBancariasDetalle.aspx" CommandArgument="-1" runat="server"><i class="fa fa-plus-circle"></i> Agregar Cuenta Bancaria</asp:LinkButton>
|
||||||
<asp:LinkButton ID="LBAdd" PostBackUrl="/Bancos/CuentasBancariasDetalle.aspx" CommandArgument="-1" runat="server"><i class="fa fa-plus-circle"></i> Agregar Cuenta Bancaria</asp:LinkButton>
|
<%-- <img alt="Nuevo Número de Cuenta Bancaria" onclick="document.location.href='/Bancos/CuentasBancariasDetalle.aspx'" src="/Imagenes/BotonAgregar.gif" style="cursor: pointer;" />--%>
|
||||||
<%-- <img alt="Nuevo Número de Cuenta Bancaria" onclick="document.location.href='/Bancos/CuentasBancariasDetalle.aspx'" src="/Imagenes/BotonAgregar.gif" style="cursor: pointer;" />--%>
|
</li>
|
||||||
</li>
|
<li>
|
||||||
</ContentTemplate>
|
<asp:LinkButton ID="LbPDF" runat="server" OnClick="LbPDF_Click"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||||
</asp:UpdatePanel>
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LbExcel" runat="server" OnClick="LbExcel_Click"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||||
|
</li>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||||
Catálogo de Número de Cuentas Bancarias / Cajas Chicas.
|
Catálogo de Número de Cuentas Bancarias / Cajas Chicas.
|
||||||
@@ -23,10 +26,10 @@
|
|||||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCuenta" EmptyDataText="No se encontraron Números de Cuentas Registrados" ToolTip="Listado de Números de Cuentas" CssClass="table table-striped table-advance table-hover" Style=" text-align: center;" GridLines="None" Width="100%">
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCuenta" EmptyDataText="No se encontraron Números de Cuentas Registrados" ToolTip="Listado de Números de Cuentas" CssClass="table table-striped table-advance table-hover" Style="text-align: center;" GridLines="None" Width="100%">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:HyperLinkField DataTextField="TipoCuenta" HeaderText="Tipo Cuenta" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" DataNavigateUrlFormatString="/Bancos/CuentasBancariasDetalle.aspx?CveCuenta={0}" DataNavigateUrlFields="CveCuenta" Target="_blank"/>
|
<asp:HyperLinkField DataTextField="TipoCuenta" HeaderText="Tipo Cuenta" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" DataNavigateUrlFormatString="/Bancos/CuentasBancariasDetalle.aspx?CveCuenta={0}" DataNavigateUrlFields="CveCuenta" Target="_blank" />
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||||
<HeaderTemplate>Banco</HeaderTemplate>
|
<HeaderTemplate>Banco</HeaderTemplate>
|
||||||
<ItemTemplate> <asp:Literal ID="LtlBanco" runat="server" Text='<%# Eval("Banco", "{0}") %>'></asp:Literal></ItemTemplate>
|
<ItemTemplate> <asp:Literal ID="LtlBanco" runat="server" Text='<%# Eval("Banco", "{0}") %>'></asp:Literal></ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
@@ -35,7 +38,7 @@
|
|||||||
<ItemTemplate> <asp:Literal ID="LtlNumCuenta" runat="server" Text='<%# Eval("NumCuenta", "{0}") %>'></asp:Literal></ItemTemplate>
|
<ItemTemplate> <asp:Literal ID="LtlNumCuenta" runat="server" Text='<%# Eval("NumCuenta", "{0}") %>'></asp:Literal></ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Left"></ItemStyle>
|
<ItemStyle HorizontalAlign="Left"></ItemStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||||
<HeaderTemplate>CLABE</HeaderTemplate>
|
<HeaderTemplate>CLABE</HeaderTemplate>
|
||||||
<ItemTemplate> <asp:Literal ID="LtlCLABE" runat="server" Text='<%# Eval("CLABE", "{0}") %>'></asp:Literal></ItemTemplate>
|
<ItemTemplate> <asp:Literal ID="LtlCLABE" runat="server" Text='<%# Eval("CLABE", "{0}") %>'></asp:Literal></ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
@@ -47,22 +50,26 @@
|
|||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>Folio Inicial</HeaderTemplate>
|
<HeaderTemplate>Folio Inicial</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlFInicial" runat="server" Text='<%# Eval("FInicial", "{0:d}") %>'></asp:Literal></ItemTemplate>
|
<asp:Literal ID="LtlFInicial" runat="server" Text='<%# Eval("FInicial", "{0:d}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>Estatus</HeaderTemplate>
|
<HeaderTemplate>Estatus</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal></ItemTemplate>
|
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>Fecha</HeaderTemplate>
|
<HeaderTemplate>Fecha</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal></ItemTemplate>
|
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Left">
|
||||||
<HeaderTemplate>Usuario</HeaderTemplate>
|
<HeaderTemplate>Usuario</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal></ItemTemplate>
|
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
<HeaderStyle CssClass="Titulos" />
|
<HeaderStyle CssClass="Titulos" />
|
||||||
|
|||||||
@@ -4,9 +4,21 @@ Option Strict On
|
|||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.Linq
|
Imports System.Linq
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
|
||||||
Partial Class Bancos_CuentasBancarias
|
Partial Class Bancos_CuentasBancarias
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
Private Property DtBan As DataTable
|
||||||
|
Get
|
||||||
|
DtBan = DirectCast(ViewState("DtBan"), DataTable)
|
||||||
|
End Get
|
||||||
|
|
||||||
|
Set(ByVal value As DataTable)
|
||||||
|
ViewState("DtBan") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
'Configuración
|
'Configuración
|
||||||
Private ReadOnly Property CveCuenta As Integer
|
Private ReadOnly Property CveCuenta As Integer
|
||||||
Get
|
Get
|
||||||
@@ -22,7 +34,7 @@ Partial Class Bancos_CuentasBancarias
|
|||||||
Dim ObjBancos As New ClsBancos
|
Dim ObjBancos As New ClsBancos
|
||||||
If ObjBancos.GetBancosCuentas(-1) Then
|
If ObjBancos.GetBancosCuentas(-1) Then
|
||||||
ViewState("DTBancosCuentas") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTBancosCuentas") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
|
DtBan = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
Else
|
Else
|
||||||
Me.GvDatos.DataSource = Nothing
|
Me.GvDatos.DataSource = Nothing
|
||||||
End If
|
End If
|
||||||
@@ -53,6 +65,7 @@ Partial Class Bancos_CuentasBancarias
|
|||||||
If ObjBancos.RemoveBancosCuentas(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
If ObjBancos.RemoveBancosCuentas(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||||
GvDatos.EditIndex = -1
|
GvDatos.EditIndex = -1
|
||||||
ViewState("DTBancosCuentas") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTBancosCuentas") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
|
DtBan = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
If ObjBancos.GetBancosCuentasUsuarios(-1) Then
|
If ObjBancos.GetBancosCuentasUsuarios(-1) Then
|
||||||
GlobalDTBancosCuentas(-1) = ObjBancos.DtResultados
|
GlobalDTBancosCuentas(-1) = ObjBancos.DtResultados
|
||||||
End If
|
End If
|
||||||
@@ -126,4 +139,27 @@ Partial Class Bancos_CuentasBancarias
|
|||||||
GvDatos.DataBind()
|
GvDatos.DataBind()
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
Protected Sub LbPDF_Click(sender As Object, e As EventArgs)
|
||||||
|
Imprime("PDF")
|
||||||
|
End Sub
|
||||||
|
Protected Sub LbExcel_Click(sender As Object, e As EventArgs)
|
||||||
|
Imprime("Excel")
|
||||||
|
End Sub
|
||||||
|
Private Sub Imprime(Formato As String)
|
||||||
|
If DtBan IsNot Nothing AndAlso DtBan.Rows.Count > 0 Then
|
||||||
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
|
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
|
Dim params As New List(Of ReportParameter)
|
||||||
|
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||||
|
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||||
|
If Imagen.Exists Then
|
||||||
|
params.Add(New ReportParameter("LogoPath", logouri))
|
||||||
|
Else
|
||||||
|
params.Add(New ReportParameter("LogoPath", ""))
|
||||||
|
End If
|
||||||
|
ImprimirPDF("Empresas/Grales/Formatos/CuentasBancarias.rdlc", DtBan, params, "Reporte de Cuentas Bancarias", Formato)
|
||||||
|
Else
|
||||||
|
Alert("No hay información para mostrar.", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -757,6 +757,55 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
|
|
||||||
|
<ajax:TabPanel ID="TabGastos" runat="server" HeaderText="Gastos" Enabled="true">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12 ">
|
||||||
|
<div class="portlet light xspadding bordered">
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="caption font-green">
|
||||||
|
<i class="icon-pin font-green"></i>
|
||||||
|
<span class="caption-subject bold uppercase">GASTOS </span>
|
||||||
|
</div>
|
||||||
|
<%-- <div class="actions">
|
||||||
|
<div class="btn-group">
|
||||||
|
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:HyperLink ID="HyperLink2" Visible="true" Target="_blank" runat="server" data-toggle="tooltip" title="Agregar Cotizacion" class="btn btn-circle btn-sm btn-default"><i class="fa fa-plus"></i></asp:HyperLink>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>--%>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body">
|
||||||
|
<div runat="server" id="Div3" visible="false" class="row" style="margin-right: 10px; margin-top: 0px; margin-bottom: 5px;" align="right">
|
||||||
|
<input type="text" id="TxtBusquedaGastos" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaGastos','{0}')", GvCotizacion.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaGastos','{0}')", GvCotizacion.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
|
</div>
|
||||||
|
<div runat="server" id="Div4" style="padding: 0 10px 10px 10px;">
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpGastos" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:GridView ID="GvGastos" runat="server" EmptyDataText="Aún no se han registrado Gastos"
|
||||||
|
EmptyDataRowStyle-HorizontalAlign="Center" ToolTip="Listado de Cotizaciones" CssClass="table table-striped table-advance table-hover ScrollAD Widthall mysmallbtn" AlternatingRowStyle-BorderStyle="None"
|
||||||
|
GridLines="None" BorderColor="#D3D3D3" BorderWidth="1" AutoGenerateColumns="false" >
|
||||||
|
<Columns>
|
||||||
|
<%--<asp:HyperLinkField DataTextField="SerieFolio" Target="_blank" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ItemStyle-HorizontalAlign="Left" HeaderText="Serie Folio" />--%>
|
||||||
|
<asp:BoundField DataField="Descripcion" HeaderText="Descripción" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:BoundField DataField="Importe" ItemStyle-HorizontalAlign="Right" HeaderText="Importe" DataFormatString="{0:N2}" />
|
||||||
|
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:BoundField DataField="FechaIng" HeaderText="Fecha" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" />
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</ajax:TabPanel>
|
||||||
|
|
||||||
</ajax:TabContainer>
|
</ajax:TabContainer>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|||||||
@@ -219,8 +219,15 @@ public partial class CRM_Acercamiento : ClsPaginas
|
|||||||
InicializaDatos();
|
InicializaDatos();
|
||||||
CargaDatos();
|
CargaDatos();
|
||||||
CargaCotizaciones();
|
CargaCotizaciones();
|
||||||
|
CargaGastos();
|
||||||
CargaRechazosMotivos();
|
CargaRechazosMotivos();
|
||||||
|
|
||||||
|
if (UsuarioActual.CveEmpresa == 72)
|
||||||
|
{
|
||||||
|
TabDatosTecnicos.Visible = false;
|
||||||
|
TabImagenes.Visible = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (CveAcercamiento > 0)
|
if (CveAcercamiento > 0)
|
||||||
{
|
{
|
||||||
CargaEtapasBitacora();
|
CargaEtapasBitacora();
|
||||||
@@ -502,7 +509,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DdlEtapaProceso.DataSource = DTEtapasProceso.FiltraParametros(String.Format("( Orden >= {0} ) AND ( Orden <= {1} )", (OrdenEtapaActual - 1), (OrdenEtapaActual + 1)));
|
DdlEtapaProceso.DataSource = DTEtapasProceso.FiltraParametros(String.Format("(( Orden >= {0} ) AND ( Orden <= {1} )) OR (Orden = 6)", (OrdenEtapaActual - 1), (OrdenEtapaActual + 1)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ObjCRM.Dispose();
|
ObjCRM.Dispose();
|
||||||
@@ -1473,4 +1480,18 @@ public partial class CRM_Acercamiento : ClsPaginas
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region "TAB GASTOS"
|
||||||
|
protected void CargaGastos()
|
||||||
|
{
|
||||||
|
ClsCRM ObjCRM = new ClsCRM();
|
||||||
|
if (ObjCRM.GetAcercamientosGastos(CveAcercamiento))
|
||||||
|
{
|
||||||
|
GvGastos.DataSource = ObjCRM.DtResultados;
|
||||||
|
}
|
||||||
|
ObjCRM.Dispose();
|
||||||
|
GvGastos.DataBind();
|
||||||
|
UpGastos.Update();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
@@ -8829,6 +8829,16 @@ Partial Class Compras_Compras
|
|||||||
'Revisamos que los cambios hechos mantengan la interidad de los numeros
|
'Revisamos que los cambios hechos mantengan la interidad de los numeros
|
||||||
If HFDiferenciaCompra.Value = TxtTotal.Text Or CveFactura < 1 Or CveCompra < 1 Then
|
If HFDiferenciaCompra.Value = TxtTotal.Text Or CveFactura < 1 Or CveCompra < 1 Then
|
||||||
|
|
||||||
|
If IdPoliza > 0 Then
|
||||||
|
If Not ObjContabilidad.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
|
||||||
|
Retorno = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ObjContabilidad.UpdatePrePoliza(MinFecha, -1, -1, Nothing, CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||||
|
Retorno = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
'PORCENTAJE IVA
|
'PORCENTAJE IVA
|
||||||
Dim PorcentajeIVA As Decimal = TmpDT.MAX("IVAPorcentaje").ToDecimal
|
Dim PorcentajeIVA As Decimal = TmpDT.MAX("IVAPorcentaje").ToDecimal
|
||||||
|
|
||||||
@@ -8846,11 +8856,7 @@ Partial Class Compras_Compras
|
|||||||
' End If
|
' End If
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
If IdPoliza > 0 Then
|
|
||||||
If Not ObjContabilidad.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
|
|
||||||
Retorno = False
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'If UsuarioActual.Empresa.Funcionalidad(207) = "1" Then
|
'If UsuarioActual.Empresa.Funcionalidad(207) = "1" Then
|
||||||
If Not ActualizarPrePoliza(ObjContabilidad, ObjCompra) Then
|
If Not ActualizarPrePoliza(ObjContabilidad, ObjCompra) Then
|
||||||
@@ -8859,7 +8865,7 @@ Partial Class Compras_Compras
|
|||||||
'End If
|
'End If
|
||||||
|
|
||||||
''EMPIEZA: SI USA AC
|
''EMPIEZA: SI USA AC
|
||||||
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1") AndAlso IdPoliza > 0 Then
|
If UsuarioActual.Empresa.UsaAC AndAlso IdPoliza > 0 Then
|
||||||
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
ObjContaAC.IniciaTransacSQL()
|
ObjContaAC.IniciaTransacSQL()
|
||||||
|
|
||||||
@@ -9242,9 +9248,11 @@ Partial Class Compras_Compras
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
If Retorno Then
|
If Retorno Then
|
||||||
If ViewState("IdPoliza").ToString.ToEntero > 0 Then
|
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1") AndAlso IdPoliza > 0 Then
|
||||||
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
If ObjContaAC Is Nothing Then
|
||||||
ObjContaAC.IniciaTransacSQL()
|
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
|
ObjContaAC.IniciaTransacSQL()
|
||||||
|
End If
|
||||||
|
|
||||||
If Not ObjContabilidad.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveEmpresa, UsuarioActual.Empresa, MinFecha, String.Format("{0}-{1}", Serie, Folio), ObjContaAC, pIDPoliza:=ViewState("IdPoliza").ToString.ToEntero) Then
|
If Not ObjContabilidad.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveEmpresa, UsuarioActual.Empresa, MinFecha, String.Format("{0}-{1}", Serie, Folio), ObjContaAC, pIDPoliza:=ViewState("IdPoliza").ToString.ToEntero) Then
|
||||||
Retorno = False
|
Retorno = False
|
||||||
@@ -9261,6 +9269,18 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
'Retorno = True
|
'Retorno = True
|
||||||
'Alert("La Compra se actualizó correctamente.")
|
'Alert("La Compra se actualizó correctamente.")
|
||||||
|
Else
|
||||||
|
|
||||||
|
If IdPoliza > 0 Then
|
||||||
|
If Not ObjContabilidad.UpdatePrePolizasDetalleBloquear(CvePrePoliza, True) Then
|
||||||
|
Retorno = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ObjContabilidad.UpdatePrePoliza(MinFecha, -1, -1, IdPoliza, CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||||
|
Retorno = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
@@ -9275,7 +9295,7 @@ Partial Class Compras_Compras
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Alert("Ocurrió un error al actualizar la compra", TipoMensaje.MsgError)
|
Alert("Ocurrió un error al actualizar la compra", TipoMensaje.MsgError)
|
||||||
ObjCompra.RollBack()
|
ObjCompra.RollBack()
|
||||||
ObjContaAC.RollBack()
|
If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack()
|
||||||
|
|
||||||
Finally
|
Finally
|
||||||
If Retorno Then
|
If Retorno Then
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ Imports System.IO
|
|||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
Imports System.Globalization
|
Imports System.Globalization
|
||||||
|
Imports GemBox.Spreadsheet
|
||||||
|
|
||||||
Partial Class Contratos_Default
|
Partial Class Contratos_Default
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -3185,32 +3186,79 @@ Partial Class Contratos_Default
|
|||||||
Public Sub LbDescargarExcel_Click(sender As Object, e As EventArgs) Handles LbDescargarExcel.Click
|
Public Sub LbDescargarExcel_Click(sender As Object, e As EventArgs) Handles LbDescargarExcel.Click
|
||||||
DescargarFormato()
|
DescargarFormato()
|
||||||
End Sub
|
End Sub
|
||||||
|
Private Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable
|
||||||
|
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||||
|
Dim excelFile As ExcelFile = ExcelFile.Load(flatFilePath)
|
||||||
|
|
||||||
|
Dim unnamed As Integer = 0
|
||||||
|
Dim cols As Integer
|
||||||
|
Dim columns As String()
|
||||||
|
Dim curRow As Integer = 0
|
||||||
|
Dim curCol As Integer = 0
|
||||||
|
Dim dataTable As DataTable = New DataTable()
|
||||||
|
Dim worksheet As ExcelWorksheet = excelFile.Worksheets(0)
|
||||||
|
|
||||||
|
For cols = 0 To worksheet.Rows(0).AllocatedCells.Count - 1
|
||||||
|
|
||||||
|
If firstRowHasHeaders Then
|
||||||
|
|
||||||
|
If worksheet.Rows(0).Cells(cols).Value IsNot Nothing Then
|
||||||
|
dataTable.Columns.Add(worksheet.Rows(0).Cells(cols).Value.ToString())
|
||||||
|
Else
|
||||||
|
dataTable.Columns.Add("Unnamed Column " & (System.Threading.Interlocked.Increment(unnamed)))
|
||||||
|
End If
|
||||||
|
|
||||||
|
curRow = 1
|
||||||
|
Else
|
||||||
|
dataTable.Columns.Add("Column " & (cols + 1))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
While curRow < worksheet.Rows.Count
|
||||||
|
columns = New String(cols - 1) {}
|
||||||
|
|
||||||
|
For curCol = 0 To cols - 1
|
||||||
|
|
||||||
|
If worksheet.Rows(curRow).Cells(curCol).Value Is Nothing Then
|
||||||
|
columns(curCol) = ""
|
||||||
|
Else
|
||||||
|
columns(curCol) = worksheet.Rows(curRow).Cells(curCol).Value.ToString()
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
dataTable.Rows.Add(columns)
|
||||||
|
curRow += 1
|
||||||
|
End While
|
||||||
|
|
||||||
|
Return dataTable
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Sub CargarArchivo(Ruta As String, FileName As String, Tipo As String)
|
Private Sub CargarArchivo(Ruta As String, FileName As String, Tipo As String)
|
||||||
Dim dt As New DataTable
|
Dim dt As New DataTable
|
||||||
Dim Conexion As Odbc.OdbcConnection = Nothing
|
dt = ReadExcelFile(Ruta + FileName, True)
|
||||||
Dim ErrorArchivo = False
|
Dim ErrorArchivo = False
|
||||||
|
|
||||||
Try
|
'Dim Conexion As Odbc.OdbcConnection = Nothing
|
||||||
Select Case Tipo
|
'Try
|
||||||
Case "EXCEL"
|
' Select Case Tipo
|
||||||
Conexion = New Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + Ruta + FileName + ";")
|
' Case "EXCEL"
|
||||||
Conexion.Open()
|
' Conexion = New Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + Ruta + FileName + ";")
|
||||||
Dim cmd = Conexion.CreateCommand()
|
' Conexion.Open()
|
||||||
cmd.CommandType = CommandType.Text
|
' Dim cmd = Conexion.CreateCommand()
|
||||||
cmd.CommandText = "SELECT * FROM [Hoja1$]"
|
' cmd.CommandType = CommandType.Text
|
||||||
Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
' cmd.CommandText = "SELECT * FROM [Hoja1$]"
|
||||||
DataAdapter.Fill(dt)
|
' Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
||||||
Case Else
|
' DataAdapter.Fill(dt)
|
||||||
Alert("El archivo no tiene el formato correcto", TipoMensaje.MsgError)
|
' Case Else
|
||||||
Exit Sub
|
' Alert("El archivo no tiene el formato correcto", TipoMensaje.MsgError)
|
||||||
End Select
|
' Exit Sub
|
||||||
Catch ex As Exception
|
' End Select
|
||||||
ErrorArchivo = True
|
'Catch ex As Exception
|
||||||
OnError("Ocurrio un error al leer el archivo <br/>" & ex.Message, ex)
|
' ErrorArchivo = True
|
||||||
End Try
|
' OnError("Ocurrio un error al leer el archivo <br/>" & ex.Message, ex)
|
||||||
Conexion.Close()
|
'End Try
|
||||||
If Not ErrorArchivo Then
|
'Conexion.Close()
|
||||||
|
If Not ErrorArchivo AndAlso dt IsNot Nothing Then
|
||||||
If Not dt.Columns(0).ColumnName = "OC Interna" Then
|
If Not dt.Columns(0).ColumnName = "OC Interna" Then
|
||||||
Alert("El nombre de la primera columna debe ser 'OC Interna'. Favor de corregirlo", TipoMensaje.MsgError)
|
Alert("El nombre de la primera columna debe ser 'OC Interna'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
|
|||||||
1236
Empresas/Grales/Formatos/CuentasBancarias.rdlc
Normal file
1236
Empresas/Grales/Formatos/CuentasBancarias.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
975
Empresas/Grales/Formatos/RepBancos.rdlc
Normal file
975
Empresas/Grales/Formatos/RepBancos.rdlc
Normal file
@@ -0,0 +1,975 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
||||||
|
<Body>
|
||||||
|
<ReportItems>
|
||||||
|
<Line Name="Line1">
|
||||||
|
<Top>0.08792cm</Top>
|
||||||
|
<Height>0cm</Height>
|
||||||
|
<Width>20.06868cm</Width>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
</Border>
|
||||||
|
</Style>
|
||||||
|
</Line>
|
||||||
|
<Tablix Name="Tablix2">
|
||||||
|
<TablixBody>
|
||||||
|
<TablixColumns>
|
||||||
|
<TablixColumn>
|
||||||
|
<Width>5.32348cm</Width>
|
||||||
|
</TablixColumn>
|
||||||
|
<TablixColumn>
|
||||||
|
<Width>6.48486cm</Width>
|
||||||
|
</TablixColumn>
|
||||||
|
<TablixColumn>
|
||||||
|
<Width>2.5cm</Width>
|
||||||
|
</TablixColumn>
|
||||||
|
<TablixColumn>
|
||||||
|
<Width>1.42176cm</Width>
|
||||||
|
</TablixColumn>
|
||||||
|
<TablixColumn>
|
||||||
|
<Width>1.83034cm</Width>
|
||||||
|
</TablixColumn>
|
||||||
|
<TablixColumn>
|
||||||
|
<Width>2.5cm</Width>
|
||||||
|
</TablixColumn>
|
||||||
|
</TablixColumns>
|
||||||
|
<TablixRows>
|
||||||
|
<TablixRow>
|
||||||
|
<Height>0.46771cm</Height>
|
||||||
|
<TablixCells>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="Textbox3">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Banco</Value>
|
||||||
|
<Style>
|
||||||
|
<FontSize>9pt</FontSize>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style>
|
||||||
|
<TextAlign>Center</TextAlign>
|
||||||
|
</Style>
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox3</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Color>LightGrey</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
</Border>
|
||||||
|
<TopBorder>
|
||||||
|
<Color>Black</Color>
|
||||||
|
</TopBorder>
|
||||||
|
<BottomBorder>
|
||||||
|
<Color>Black</Color>
|
||||||
|
</BottomBorder>
|
||||||
|
<LeftBorder>
|
||||||
|
<Style>None</Style>
|
||||||
|
</LeftBorder>
|
||||||
|
<RightBorder>
|
||||||
|
<Style>None</Style>
|
||||||
|
</RightBorder>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="Textbox5">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Ejecutivo</Value>
|
||||||
|
<Style>
|
||||||
|
<FontSize>9pt</FontSize>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style>
|
||||||
|
<TextAlign>Center</TextAlign>
|
||||||
|
</Style>
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Color>LightGrey</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
</Border>
|
||||||
|
<TopBorder>
|
||||||
|
<Color>Black</Color>
|
||||||
|
</TopBorder>
|
||||||
|
<BottomBorder>
|
||||||
|
<Color>Black</Color>
|
||||||
|
</BottomBorder>
|
||||||
|
<LeftBorder>
|
||||||
|
<Style>None</Style>
|
||||||
|
</LeftBorder>
|
||||||
|
<RightBorder>
|
||||||
|
<Style>None</Style>
|
||||||
|
</RightBorder>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="Textbox21">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Telefono</Value>
|
||||||
|
<Style>
|
||||||
|
<FontSize>9pt</FontSize>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style>
|
||||||
|
<TextAlign>Center</TextAlign>
|
||||||
|
</Style>
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox21</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Color>LightGrey</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
</Border>
|
||||||
|
<TopBorder>
|
||||||
|
<Color>Black</Color>
|
||||||
|
</TopBorder>
|
||||||
|
<BottomBorder>
|
||||||
|
<Color>Black</Color>
|
||||||
|
</BottomBorder>
|
||||||
|
<LeftBorder>
|
||||||
|
<Style>None</Style>
|
||||||
|
</LeftBorder>
|
||||||
|
<RightBorder>
|
||||||
|
<Style>None</Style>
|
||||||
|
</RightBorder>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="Textbox19">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Estado</Value>
|
||||||
|
<Style>
|
||||||
|
<FontSize>9pt</FontSize>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style>
|
||||||
|
<TextAlign>Center</TextAlign>
|
||||||
|
</Style>
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox19</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Color>LightGrey</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
</Border>
|
||||||
|
<TopBorder>
|
||||||
|
<Color>Black</Color>
|
||||||
|
</TopBorder>
|
||||||
|
<BottomBorder>
|
||||||
|
<Color>Black</Color>
|
||||||
|
</BottomBorder>
|
||||||
|
<LeftBorder>
|
||||||
|
<Style>None</Style>
|
||||||
|
</LeftBorder>
|
||||||
|
<RightBorder>
|
||||||
|
<Style>None</Style>
|
||||||
|
</RightBorder>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="Textbox27">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Fecha</Value>
|
||||||
|
<Style>
|
||||||
|
<FontSize>9pt</FontSize>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style>
|
||||||
|
<TextAlign>Center</TextAlign>
|
||||||
|
</Style>
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox27</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Color>LightGrey</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
</Border>
|
||||||
|
<TopBorder>
|
||||||
|
<Color>Black</Color>
|
||||||
|
</TopBorder>
|
||||||
|
<BottomBorder>
|
||||||
|
<Color>Black</Color>
|
||||||
|
</BottomBorder>
|
||||||
|
<LeftBorder>
|
||||||
|
<Style>None</Style>
|
||||||
|
</LeftBorder>
|
||||||
|
<RightBorder>
|
||||||
|
<Style>None</Style>
|
||||||
|
</RightBorder>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="Textbox31">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Usuario</Value>
|
||||||
|
<Style>
|
||||||
|
<FontSize>9pt</FontSize>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style>
|
||||||
|
<TextAlign>Center</TextAlign>
|
||||||
|
</Style>
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox31</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Color>LightGrey</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
</Border>
|
||||||
|
<TopBorder>
|
||||||
|
<Color>Black</Color>
|
||||||
|
</TopBorder>
|
||||||
|
<BottomBorder>
|
||||||
|
<Color>Black</Color>
|
||||||
|
</BottomBorder>
|
||||||
|
<LeftBorder>
|
||||||
|
<Style>None</Style>
|
||||||
|
</LeftBorder>
|
||||||
|
<RightBorder>
|
||||||
|
<Style>None</Style>
|
||||||
|
</RightBorder>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
|
</TablixCells>
|
||||||
|
</TablixRow>
|
||||||
|
<TablixRow>
|
||||||
|
<Height>0.6cm</Height>
|
||||||
|
<TablixCells>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="Banco">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Fields!Banco.Value</Value>
|
||||||
|
<Style>
|
||||||
|
<FontSize>8pt</FontSize>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Banco</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="Ejecutivo">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Fields!Ejecutivo.Value</Value>
|
||||||
|
<Style>
|
||||||
|
<FontSize>8pt</FontSize>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Ejecutivo</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="Telefono1">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Fields!Telefono.Value</Value>
|
||||||
|
<Style>
|
||||||
|
<FontSize>8pt</FontSize>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Telefono1</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="Estatus">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Fields!Estatus.Value</Value>
|
||||||
|
<Style>
|
||||||
|
<FontSize>8pt</FontSize>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Estatus</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="Fecha1">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Fields!Fecha.Value</Value>
|
||||||
|
<Style>
|
||||||
|
<FontSize>8pt</FontSize>
|
||||||
|
<Format>dd/MM/yyyy</Format>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Fecha1</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="Usuario1">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Fields!Usuario.Value</Value>
|
||||||
|
<Style>
|
||||||
|
<FontSize>8pt</FontSize>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Usuario1</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
|
</TablixCells>
|
||||||
|
</TablixRow>
|
||||||
|
</TablixRows>
|
||||||
|
</TablixBody>
|
||||||
|
<TablixColumnHierarchy>
|
||||||
|
<TablixMembers>
|
||||||
|
<TablixMember />
|
||||||
|
<TablixMember />
|
||||||
|
<TablixMember />
|
||||||
|
<TablixMember />
|
||||||
|
<TablixMember />
|
||||||
|
<TablixMember />
|
||||||
|
</TablixMembers>
|
||||||
|
</TablixColumnHierarchy>
|
||||||
|
<TablixRowHierarchy>
|
||||||
|
<TablixMembers>
|
||||||
|
<TablixMember>
|
||||||
|
<KeepWithGroup>After</KeepWithGroup>
|
||||||
|
</TablixMember>
|
||||||
|
<TablixMember>
|
||||||
|
<Group Name="Details1" />
|
||||||
|
</TablixMember>
|
||||||
|
</TablixMembers>
|
||||||
|
</TablixRowHierarchy>
|
||||||
|
<DataSetName>DataSet1</DataSetName>
|
||||||
|
<Top>0.36336cm</Top>
|
||||||
|
<Left>0.06868cm</Left>
|
||||||
|
<Height>1.06771cm</Height>
|
||||||
|
<Width>20.06044cm</Width>
|
||||||
|
<ZIndex>1</ZIndex>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
</Style>
|
||||||
|
</Tablix>
|
||||||
|
</ReportItems>
|
||||||
|
<Height>0.60091in</Height>
|
||||||
|
<Style />
|
||||||
|
</Body>
|
||||||
|
<Width>7.92485in</Width>
|
||||||
|
<Page>
|
||||||
|
<PageHeader>
|
||||||
|
<Height>2.52828cm</Height>
|
||||||
|
<PrintOnFirstPage>true</PrintOnFirstPage>
|
||||||
|
<PrintOnLastPage>true</PrintOnLastPage>
|
||||||
|
<ReportItems>
|
||||||
|
<Image Name="Logo">
|
||||||
|
<Source>External</Source>
|
||||||
|
<Value>=Parameters!LogoPath.Value</Value>
|
||||||
|
<Sizing>FitProportional</Sizing>
|
||||||
|
<Top>0.11854cm</Top>
|
||||||
|
<Left>0.10583cm</Left>
|
||||||
|
<Height>2.22362cm</Height>
|
||||||
|
<Width>2.33715cm</Width>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
</Style>
|
||||||
|
</Image>
|
||||||
|
<Textbox Name="Textbox1">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Parameters!NombreEmpresa.Value</Value>
|
||||||
|
<Style>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style>
|
||||||
|
<TextAlign>Center</TextAlign>
|
||||||
|
</Style>
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||||
|
<Top>0.11854cm</Top>
|
||||||
|
<Left>2.56328cm</Left>
|
||||||
|
<Height>0.6cm</Height>
|
||||||
|
<Width>14.35806cm</Width>
|
||||||
|
<ZIndex>1</ZIndex>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
<Textbox Name="Textbox2">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>REPORTE DE BANCOS</Value>
|
||||||
|
<Style>
|
||||||
|
<FontSize>10.5pt</FontSize>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style>
|
||||||
|
<TextAlign>Center</TextAlign>
|
||||||
|
</Style>
|
||||||
|
</Paragraph>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value />
|
||||||
|
<Style>
|
||||||
|
<FontSize>10.5pt</FontSize>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style>
|
||||||
|
<TextAlign>Center</TextAlign>
|
||||||
|
</Style>
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||||
|
<Top>1.03604cm</Top>
|
||||||
|
<Left>3.80683cm</Left>
|
||||||
|
<Height>0.52945cm</Height>
|
||||||
|
<Width>11.89976cm</Width>
|
||||||
|
<ZIndex>2</ZIndex>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</ReportItems>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
</Style>
|
||||||
|
</PageHeader>
|
||||||
|
<PageFooter>
|
||||||
|
<Height>1.19061cm</Height>
|
||||||
|
<PrintOnFirstPage>true</PrintOnFirstPage>
|
||||||
|
<PrintOnLastPage>true</PrintOnLastPage>
|
||||||
|
<ReportItems>
|
||||||
|
<Line Name="Line2">
|
||||||
|
<Top>0.11437cm</Top>
|
||||||
|
<Left>0.10583cm</Left>
|
||||||
|
<Height>0cm</Height>
|
||||||
|
<Width>19.96285cm</Width>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
</Border>
|
||||||
|
</Style>
|
||||||
|
</Line>
|
||||||
|
<Textbox Name="Textbox9">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Usuario:</Value>
|
||||||
|
<Style>
|
||||||
|
<FontSize>9pt</FontSize>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox8</rd:DefaultName>
|
||||||
|
<Top>0.22726cm</Top>
|
||||||
|
<Left>0.10583cm</Left>
|
||||||
|
<Height>0.36335cm</Height>
|
||||||
|
<Width>1.60042cm</Width>
|
||||||
|
<ZIndex>1</ZIndex>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
<Textbox Name="Textbox10">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Parameters!UsuarioImprimio.Value</Value>
|
||||||
|
<Style>
|
||||||
|
<FontSize>9pt</FontSize>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox9</rd:DefaultName>
|
||||||
|
<Top>0.22726cm</Top>
|
||||||
|
<Left>1.65016cm</Left>
|
||||||
|
<Height>0.36335cm</Height>
|
||||||
|
<Width>5.14936cm</Width>
|
||||||
|
<ZIndex>2</ZIndex>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
<Textbox Name="Textbox11">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Fecha Impresión:</Value>
|
||||||
|
<Style>
|
||||||
|
<FontSize>9pt</FontSize>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style>
|
||||||
|
<TextAlign>Right</TextAlign>
|
||||||
|
</Style>
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox10</rd:DefaultName>
|
||||||
|
<Top>0.22726cm</Top>
|
||||||
|
<Left>6.97591cm</Left>
|
||||||
|
<Height>0.36335cm</Height>
|
||||||
|
<Width>2.92333cm</Width>
|
||||||
|
<ZIndex>3</ZIndex>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
<Textbox Name="Textbox12">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Globals!ExecutionTime</Value>
|
||||||
|
<Style>
|
||||||
|
<FontSize>9pt</FontSize>
|
||||||
|
<Format>g</Format>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style>
|
||||||
|
<TextAlign>Left</TextAlign>
|
||||||
|
</Style>
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox11</rd:DefaultName>
|
||||||
|
<Top>0.22726cm</Top>
|
||||||
|
<Left>9.88513cm</Left>
|
||||||
|
<Height>0.36335cm</Height>
|
||||||
|
<Width>4.32745cm</Width>
|
||||||
|
<ZIndex>4</ZIndex>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
<Textbox Name="Textbox7">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>="Página " & Globals.PageNumber & " de " & Globals.TotalPages</Value>
|
||||||
|
<Style>
|
||||||
|
<FontStyle>Italic</FontStyle>
|
||||||
|
<FontSize>8pt</FontSize>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style>
|
||||||
|
<TextAlign>Right</TextAlign>
|
||||||
|
</Style>
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox3</rd:DefaultName>
|
||||||
|
<Top>0.22726cm</Top>
|
||||||
|
<Left>18.00281cm</Left>
|
||||||
|
<Height>0.36335cm</Height>
|
||||||
|
<Width>2.06587cm</Width>
|
||||||
|
<ZIndex>5</ZIndex>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
<Textbox Name="Textbox13">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>IMPRESO EN SIG, Bancos</Value>
|
||||||
|
<Style>
|
||||||
|
<FontSize>9pt</FontSize>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox9</rd:DefaultName>
|
||||||
|
<Top>0.59061cm</Top>
|
||||||
|
<Left>0.10583cm</Left>
|
||||||
|
<Height>0.36335cm</Height>
|
||||||
|
<Width>5.14936cm</Width>
|
||||||
|
<ZIndex>6</ZIndex>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</ReportItems>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
</Style>
|
||||||
|
</PageFooter>
|
||||||
|
<PageHeight>27.94cm</PageHeight>
|
||||||
|
<PageWidth>21.59cm</PageWidth>
|
||||||
|
<LeftMargin>0.5cm</LeftMargin>
|
||||||
|
<RightMargin>0.5cm</RightMargin>
|
||||||
|
<TopMargin>0.5cm</TopMargin>
|
||||||
|
<BottomMargin>0.5cm</BottomMargin>
|
||||||
|
<ColumnSpacing>0.13cm</ColumnSpacing>
|
||||||
|
<Style />
|
||||||
|
</Page>
|
||||||
|
<AutoRefresh>0</AutoRefresh>
|
||||||
|
<DataSources>
|
||||||
|
<DataSource Name="DataSet3">
|
||||||
|
<ConnectionProperties>
|
||||||
|
<DataProvider>System.Data.DataSet</DataProvider>
|
||||||
|
<ConnectString>/* Local Connection */</ConnectString>
|
||||||
|
</ConnectionProperties>
|
||||||
|
<rd:DataSourceID>74f8a171-24f1-4404-809e-ec2e098f1907</rd:DataSourceID>
|
||||||
|
</DataSource>
|
||||||
|
</DataSources>
|
||||||
|
<DataSets>
|
||||||
|
<DataSet Name="DataSet1">
|
||||||
|
<Query>
|
||||||
|
<DataSourceName>DataSet3</DataSourceName>
|
||||||
|
<CommandText>/* Local Query */</CommandText>
|
||||||
|
</Query>
|
||||||
|
<Fields>
|
||||||
|
<Field Name="Banco">
|
||||||
|
<DataField>Banco</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="Ejecutivo">
|
||||||
|
<DataField>Ejecutivo</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="Telefono">
|
||||||
|
<DataField>Telefono</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="Estatus">
|
||||||
|
<DataField>Estatus</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="Fecha">
|
||||||
|
<DataField>Fecha</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="Usuario">
|
||||||
|
<DataField>Usuario</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
</Fields>
|
||||||
|
<rd:DataSetInfo>
|
||||||
|
<rd:DataSetName>DataSet3</rd:DataSetName>
|
||||||
|
<rd:SchemaPath>C:\Users\jesus\Documents\Visual Studio 2015\WebSites\WebSite2\App_Code\DataSet3.xsd</rd:SchemaPath>
|
||||||
|
<rd:TableName>DataTable1</rd:TableName>
|
||||||
|
<rd:TableAdapterFillMethod />
|
||||||
|
<rd:TableAdapterGetDataMethod />
|
||||||
|
<rd:TableAdapterName />
|
||||||
|
</rd:DataSetInfo>
|
||||||
|
</DataSet>
|
||||||
|
</DataSets>
|
||||||
|
<ReportParameters>
|
||||||
|
<ReportParameter Name="LogoPath">
|
||||||
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
|
<AllowBlank>true</AllowBlank>
|
||||||
|
<Prompt>ReportParameter1</Prompt>
|
||||||
|
</ReportParameter>
|
||||||
|
<ReportParameter Name="NombreEmpresa">
|
||||||
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
|
<AllowBlank>true</AllowBlank>
|
||||||
|
<Prompt>ReportParameter1</Prompt>
|
||||||
|
</ReportParameter>
|
||||||
|
<ReportParameter Name="UsuarioImprimio">
|
||||||
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
|
<AllowBlank>true</AllowBlank>
|
||||||
|
<Prompt>ReportParameter1</Prompt>
|
||||||
|
</ReportParameter>
|
||||||
|
</ReportParameters>
|
||||||
|
<Language>es-MX</Language>
|
||||||
|
<rd:ReportUnitType>Cm</rd:ReportUnitType>
|
||||||
|
<rd:ReportID>2ec96151-d7c1-4609-bfdd-795b02d33b5a</rd:ReportID>
|
||||||
|
</Report>
|
||||||
@@ -4,6 +4,7 @@ Option Strict On
|
|||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
|
Imports GemBox.Spreadsheet
|
||||||
|
|
||||||
Partial Class OC
|
Partial Class OC
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -5831,31 +5832,80 @@ Partial Class OC
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable
|
||||||
|
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||||
|
Dim excelFile As ExcelFile = ExcelFile.Load(flatFilePath)
|
||||||
|
|
||||||
|
Dim unnamed As Integer = 0
|
||||||
|
Dim cols As Integer
|
||||||
|
Dim columns As String()
|
||||||
|
Dim curRow As Integer = 0
|
||||||
|
Dim curCol As Integer = 0
|
||||||
|
Dim dataTable As DataTable = New DataTable()
|
||||||
|
Dim worksheet As ExcelWorksheet = excelFile.Worksheets(0)
|
||||||
|
|
||||||
|
For cols = 0 To worksheet.Rows(0).AllocatedCells.Count - 1
|
||||||
|
|
||||||
|
If firstRowHasHeaders Then
|
||||||
|
|
||||||
|
If worksheet.Rows(0).Cells(cols).Value IsNot Nothing Then
|
||||||
|
dataTable.Columns.Add(worksheet.Rows(0).Cells(cols).Value.ToString())
|
||||||
|
Else
|
||||||
|
dataTable.Columns.Add("Unnamed Column " & (System.Threading.Interlocked.Increment(unnamed)))
|
||||||
|
End If
|
||||||
|
|
||||||
|
curRow = 1
|
||||||
|
Else
|
||||||
|
dataTable.Columns.Add("Column " & (cols + 1))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
While curRow < worksheet.Rows.Count
|
||||||
|
columns = New String(cols - 1) {}
|
||||||
|
|
||||||
|
For curCol = 0 To cols - 1
|
||||||
|
|
||||||
|
If worksheet.Rows(curRow).Cells(curCol).Value Is Nothing Then
|
||||||
|
columns(curCol) = ""
|
||||||
|
Else
|
||||||
|
columns(curCol) = worksheet.Rows(curRow).Cells(curCol).Value.ToString()
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
dataTable.Rows.Add(columns)
|
||||||
|
curRow += 1
|
||||||
|
End While
|
||||||
|
|
||||||
|
Return dataTable
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Sub CargarArchivo(Ruta As String, FileName As String, Tipo As String)
|
Private Sub CargarArchivo(Ruta As String, FileName As String, Tipo As String)
|
||||||
|
|
||||||
Dim dt As New DataTable
|
Dim dt As New DataTable
|
||||||
Dim Conexion As Odbc.OdbcConnection = Nothing
|
dt = ReadExcelFile(Ruta + FileName, True)
|
||||||
Dim ErrorArchivo = False
|
Dim ErrorArchivo = False
|
||||||
Try
|
|
||||||
Select Case Tipo
|
'Dim Conexion As Odbc.OdbcConnection = Nothing
|
||||||
Case "EXCEL"
|
'Try
|
||||||
Conexion = New Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + Ruta + FileName + ";")
|
' Select Case Tipo
|
||||||
Conexion.Open()
|
' Case "EXCEL"
|
||||||
Dim cmd = Conexion.CreateCommand()
|
' Conexion = New Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + Ruta + FileName + ";")
|
||||||
cmd.CommandType = CommandType.Text
|
' Conexion.Open()
|
||||||
cmd.CommandText = "SELECT * FROM [Hoja1$]"
|
' Dim cmd = Conexion.CreateCommand()
|
||||||
Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
' cmd.CommandType = CommandType.Text
|
||||||
DataAdapter.Fill(dt)
|
' cmd.CommandText = "SELECT * FROM [Hoja1$]"
|
||||||
Case Else
|
' Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
||||||
Alert("El archivo no tiene el formato correcto", TipoMensaje.MsgError)
|
' DataAdapter.Fill(dt)
|
||||||
Exit Sub
|
' Case Else
|
||||||
End Select
|
' Alert("El archivo no tiene el formato correcto", TipoMensaje.MsgError)
|
||||||
Catch ex As Exception
|
' Exit Sub
|
||||||
ErrorArchivo = True
|
' End Select
|
||||||
OnError("Ocurrio un error al leer el archivo <br/>" & ex.Message, ex)
|
'Catch ex As Exception
|
||||||
End Try
|
' ErrorArchivo = True
|
||||||
Conexion.Close()
|
' OnError("Ocurrio un error al leer el archivo <br/>" & ex.Message, ex)
|
||||||
If Not ErrorArchivo Then
|
'End Try
|
||||||
|
'Conexion.Close()
|
||||||
|
If Not ErrorArchivo AndAlso dt IsNot Nothing Then
|
||||||
If Not dt.Columns(0).ColumnName = "Cantidad" Then
|
If Not dt.Columns(0).ColumnName = "Cantidad" Then
|
||||||
Alert("El nombre de la primera columna debe ser 'Cantidad'.Favor de corregirlo", TipoMensaje.MsgError)
|
Alert("El nombre de la primera columna debe ser 'Cantidad'.Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
</asp:RadioButtonList>
|
</asp:RadioButtonList>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<asp:DropDownList ID="DdlCtaContableClientes" CssClass="form-control input-medium" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id">
|
<asp:DropDownList ID="DdlCtaContableClientes" class="select2me" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="200px">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
</asp:RadioButtonList>
|
</asp:RadioButtonList>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<asp:DropDownList ID="DropDownList1" CssClass="form-control input-medium" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id">
|
<asp:DropDownList ID="DropDownList1" class="select2me" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="200px">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
</asp:RadioButtonList>
|
</asp:RadioButtonList>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<asp:DropDownList ID="DropDownList2" CssClass="form-control input-medium" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id">
|
<asp:DropDownList ID="DropDownList2" class="select2me" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="200px">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
</asp:RadioButtonList>
|
</asp:RadioButtonList>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<asp:DropDownList ID="DropDownList3" CssClass="form-control input-medium" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id">
|
<asp:DropDownList ID="DropDownList3" class="select2me" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="200px">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
@@ -111,12 +111,12 @@
|
|||||||
</asp:RadioButtonList>
|
</asp:RadioButtonList>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<asp:DropDownList ID="DropDownList4" CssClass="form-control input-medium" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id">
|
<asp:DropDownList ID="DropDownList4" class="select2me" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="200px">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<%-- <tr>
|
<%-- <tr>
|
||||||
<td>Clave de Empresa:</td>
|
<td>Clave de Empresa:</td>
|
||||||
<td>
|
<td>
|
||||||
<asp:TextBox ID="TxtCveEmpresa" runat="server" MaxLength="50" Width="60px"></asp:TextBox>
|
<asp:TextBox ID="TxtCveEmpresa" runat="server" MaxLength="50" Width="60px"></asp:TextBox>
|
||||||
@@ -195,6 +195,53 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="DvServidorConta" class="portlet light smmallpadding bordered" runat="server" visible="false">
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="caption font-green">
|
||||||
|
<i class="icon-pin font-green"></i>
|
||||||
|
<span class="caption-subject bold uppercase">Configuración del Servidor de Contabilidad</span>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<div class="btn-group">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tools">
|
||||||
|
<a href="javascript:;" class="collapse"></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body">
|
||||||
|
<table border="0">
|
||||||
|
<tr>
|
||||||
|
<td>BDContPAQi: </td>
|
||||||
|
<td>
|
||||||
|
<asp:TextBox ID="TxtBDContPAQi" runat="server" MaxLength="50" Width="200px"></asp:TextBox>
|
||||||
|
<%-- <asp:RequiredFieldValidator ID="RFVBDContPAQi" runat="server" ControlToValidate="TxtBDContPAQi" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''BDContPAQi'</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEBDContPAQi" runat="server" HighlightCssClass="vco" TargetControlID="RFVBDContPAQi" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Server ContPAQi:</td>
|
||||||
|
<td>
|
||||||
|
<asp:TextBox ID="TxtServerContPAQi" runat="server" MaxLength="50" Width="200px"></asp:TextBox>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Usuario ContPAQi:</td>
|
||||||
|
<td>
|
||||||
|
<asp:TextBox ID="TxtUsrContPAQi" runat="server" MaxLength="50" Width="200px"></asp:TextBox>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Password ContPAQi:</td>
|
||||||
|
<td>
|
||||||
|
<asp:TextBox ID="TxtPwdContPAQi" runat="server" MaxLength="50" Width="200px"></asp:TextBox>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -17,35 +17,135 @@ Partial Class Sistemas_ConfiguracionEmpresa
|
|||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
|
|
||||||
CargaCuentaClIente()
|
CargaCuentasClientesSIG()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
#Region "Carga Cuentas"
|
||||||
Private Sub CargaCuentaCliente()
|
Private Sub CargaCuentasClientesSIG()
|
||||||
Dim ObjCompaq As New ClsContPAQi(UsuarioActual.Empresa)
|
|
||||||
Dim ObjContabilidad As New ClsContabilidad
|
Dim ObjContabilidad As New ClsContabilidad
|
||||||
|
|
||||||
If RblTipo.SelectedValue = "SIG" Then
|
If ObjContabilidad.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
|
||||||
If ObjContabilidad.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
|
DdlCtaContableClientes.Items.Clear()
|
||||||
DdlCtaContableClientes.Items.Clear()
|
DdlCtaContableClientes.Items.Add(New ListItem("Seleccione", "0"))
|
||||||
DdlCtaContableClientes.Items.Add(New ListItem("Seleccione", "0"))
|
DdlCtaContableClientes.DataSource = ObjContabilidad.DtResultados
|
||||||
DdlCtaContableClientes.DataSource = ObjContabilidad.DtResultados
|
DdlCtaContableClientes.DataBind()
|
||||||
DdlCtaContableClientes.DataBind()
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
If ObjCompaq.GetCuentas(-1, "-1", 1) Then
|
|
||||||
DdlCtaContableClientes.Items.Clear()
|
|
||||||
DdlCtaContableClientes.Items.Add(New ListItem("Seleccione", "0"))
|
|
||||||
DdlCtaContableClientes.DataSource = ObjCompaq.DtResultados
|
|
||||||
DdlCtaContableClientes.DataBind()
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
ObjContabilidad.Dispose()
|
||||||
|
End Sub
|
||||||
|
Private Sub CargaCuentasClientesCompaq()
|
||||||
|
Dim ObjCompaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
|
|
||||||
|
If ObjCompaq.GetCuentas(-1, "-1", 1) Then
|
||||||
|
DdlCtaContableClientes.Items.Clear()
|
||||||
|
DdlCtaContableClientes.Items.Add(New ListItem("Seleccione", "0"))
|
||||||
|
DdlCtaContableClientes.DataSource = ObjCompaq.DtResultados
|
||||||
|
DdlCtaContableClientes.DataBind()
|
||||||
|
End If
|
||||||
|
ObjCompaq.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaCuentasProveedoresSIG()
|
||||||
|
Dim ObjContabilidad As New ClsContabilidad
|
||||||
|
|
||||||
|
If ObjContabilidad.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
|
||||||
|
DdlCtaContableClientes.Items.Clear()
|
||||||
|
DdlCtaContableClientes.Items.Add(New ListItem("Seleccione", "0"))
|
||||||
|
DdlCtaContableClientes.DataSource = ObjContabilidad.DtResultados
|
||||||
|
DdlCtaContableClientes.DataBind()
|
||||||
|
End If
|
||||||
|
ObjContabilidad.Dispose()
|
||||||
|
End Sub
|
||||||
|
Private Sub CargaCuentasProveedoresCompaq()
|
||||||
|
Dim ObjCompaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
|
|
||||||
|
If ObjCompaq.GetCuentas(-1, "-1", 1) Then
|
||||||
|
DdlCtaContableClientes.Items.Clear()
|
||||||
|
DdlCtaContableClientes.Items.Add(New ListItem("Seleccione", "0"))
|
||||||
|
DdlCtaContableClientes.DataSource = ObjCompaq.DtResultados
|
||||||
|
DdlCtaContableClientes.DataBind()
|
||||||
|
End If
|
||||||
|
ObjCompaq.Dispose()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaCuentasDeudoresSIG()
|
||||||
|
Dim ObjContabilidad As New ClsContabilidad
|
||||||
|
|
||||||
|
If ObjContabilidad.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
|
||||||
|
DdlCtaContableClientes.Items.Clear()
|
||||||
|
DdlCtaContableClientes.Items.Add(New ListItem("Seleccione", "0"))
|
||||||
|
DdlCtaContableClientes.DataSource = ObjContabilidad.DtResultados
|
||||||
|
DdlCtaContableClientes.DataBind()
|
||||||
|
End If
|
||||||
|
ObjContabilidad.Dispose()
|
||||||
|
End Sub
|
||||||
|
Private Sub CargaCuentassDeudoresCompaq()
|
||||||
|
Dim ObjCompaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
|
|
||||||
|
If ObjCompaq.GetCuentas(-1, "-1", 1) Then
|
||||||
|
DdlCtaContableClientes.Items.Clear()
|
||||||
|
DdlCtaContableClientes.Items.Add(New ListItem("Seleccione", "0"))
|
||||||
|
DdlCtaContableClientes.DataSource = ObjCompaq.DtResultados
|
||||||
|
DdlCtaContableClientes.DataBind()
|
||||||
|
End If
|
||||||
|
ObjCompaq.Dispose()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaCuentasAlmacenSIG()
|
||||||
|
Dim ObjContabilidad As New ClsContabilidad
|
||||||
|
|
||||||
|
If ObjContabilidad.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
|
||||||
|
DdlCtaContableClientes.Items.Clear()
|
||||||
|
DdlCtaContableClientes.Items.Add(New ListItem("Seleccione", "0"))
|
||||||
|
DdlCtaContableClientes.DataSource = ObjContabilidad.DtResultados
|
||||||
|
DdlCtaContableClientes.DataBind()
|
||||||
|
End If
|
||||||
|
ObjContabilidad.Dispose()
|
||||||
|
End Sub
|
||||||
|
Private Sub CargaCuentasAlmacenCompaq()
|
||||||
|
Dim ObjCompaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
|
|
||||||
|
If ObjCompaq.GetCuentas(-1, "-1", 1) Then
|
||||||
|
DdlCtaContableClientes.Items.Clear()
|
||||||
|
DdlCtaContableClientes.Items.Add(New ListItem("Seleccione", "0"))
|
||||||
|
DdlCtaContableClientes.DataSource = ObjCompaq.DtResultados
|
||||||
|
DdlCtaContableClientes.DataBind()
|
||||||
|
End If
|
||||||
|
ObjCompaq.Dispose()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaCuentasCostoSIG()
|
||||||
|
Dim ObjContabilidad As New ClsContabilidad
|
||||||
|
|
||||||
|
If ObjContabilidad.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
|
||||||
|
DdlCtaContableClientes.Items.Clear()
|
||||||
|
DdlCtaContableClientes.Items.Add(New ListItem("Seleccione", "0"))
|
||||||
|
DdlCtaContableClientes.DataSource = ObjContabilidad.DtResultados
|
||||||
|
DdlCtaContableClientes.DataBind()
|
||||||
|
End If
|
||||||
|
ObjContabilidad.Dispose()
|
||||||
|
End Sub
|
||||||
|
Private Sub CargaCuentasCostoCompaq()
|
||||||
|
Dim ObjCompaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
|
|
||||||
|
If ObjCompaq.GetCuentas(-1, "-1", 1) Then
|
||||||
|
DdlCtaContableClientes.Items.Clear()
|
||||||
|
DdlCtaContableClientes.Items.Add(New ListItem("Seleccione", "0"))
|
||||||
|
DdlCtaContableClientes.DataSource = ObjCompaq.DtResultados
|
||||||
|
DdlCtaContableClientes.DataBind()
|
||||||
|
End If
|
||||||
|
ObjCompaq.Dispose()
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
Protected Sub RblTipo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipo.SelectedIndexChanged
|
Protected Sub RblTipo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipo.SelectedIndexChanged
|
||||||
CargaCuentaCliente()
|
If RblTipo.SelectedValue = "SIG" Then
|
||||||
|
DvServidorConta.Visible = False
|
||||||
|
CargaCuentasClientesSIG()
|
||||||
|
Else
|
||||||
|
DvServidorConta.Visible = True
|
||||||
|
CargaCuentasClientesCompaq()
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click
|
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click
|
||||||
|
|||||||
@@ -12650,8 +12650,12 @@ Partial Class Ventas
|
|||||||
DdlUnidadMedida.SelectedValue = "-1"
|
DdlUnidadMedida.SelectedValue = "-1"
|
||||||
DdlUnidadMedida.DataBind()
|
DdlUnidadMedida.DataBind()
|
||||||
DdlUnidadMedida.SelectedValueExist(drPS("CveUnidadMedida").ToString)
|
DdlUnidadMedida.SelectedValueExist(drPS("CveUnidadMedida").ToString)
|
||||||
DdlMoneda.SelectedValueExist(drPS("CveMoneda").ToString)
|
|
||||||
CambiaMoneda()
|
If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count = 0 Then
|
||||||
|
DdlMoneda.SelectedValueExist(drPS("CveMoneda").ToString)
|
||||||
|
CambiaMoneda()
|
||||||
|
End If
|
||||||
|
|
||||||
'SUGIERE PRECIO
|
'SUGIERE PRECIO
|
||||||
Dim PrecioSugerido = 0.0
|
Dim PrecioSugerido = 0.0
|
||||||
PrecioSugerido = drPS("Precio").ToString.ToDouble
|
PrecioSugerido = drPS("Precio").ToString.ToDouble
|
||||||
@@ -13239,6 +13243,15 @@ Partial Class Ventas
|
|||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count >= 1 Then
|
||||||
|
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).Rows(0)
|
||||||
|
If DrPS IsNot Nothing Then
|
||||||
|
If DrPS("CveMoneda").ToString.ToEntero <> DdlMoneda.SelectedValue.ToEntero Then
|
||||||
|
Alert("No puede agregar un producto de diferente moneda a la ya seleccionada", TipoMensaje.MsgAdvertencia)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If Not UsuarioActual.TienePermisoProceso(169) Then ' NO VALIDA EXISTENCIAS NI COSTO - PERMISO PARA NO VALIDAR
|
If Not UsuarioActual.TienePermisoProceso(169) Then ' NO VALIDA EXISTENCIAS NI COSTO - PERMISO PARA NO VALIDAR
|
||||||
'SOLO VALIDA EXISTENCIAS Y COSTO: SI USA INVENTARIOS, SOLO PRODUCTOS TIPO PRODUCTO, SOLO REMISIONES E INGRESOS
|
'SOLO VALIDA EXISTENCIAS Y COSTO: SI USA INVENTARIOS, SOLO PRODUCTOS TIPO PRODUCTO, SOLO REMISIONES E INGRESOS
|
||||||
|
|||||||
Reference in New Issue
Block a user