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 disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIÓN
|
||||
Private CveConexion As Integer = 0
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades"
|
||||
@@ -53,7 +55,7 @@ Public Class ClsAC
|
||||
End If
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
@@ -65,6 +67,42 @@ Public Class ClsAC
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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
|
||||
If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction()
|
||||
Return SqlTransacc
|
||||
@@ -3217,6 +3255,7 @@ Public Class ClsAC
|
||||
Me.disposedValue = True
|
||||
End Sub
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -22,6 +22,8 @@ Public Class ClsAC2
|
||||
Private _CveProgramaOperativo As Integer
|
||||
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIÓN
|
||||
Private CveConexion As Integer = 0
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades"
|
||||
@@ -49,7 +51,7 @@ Public Class ClsAC2
|
||||
End If
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
@@ -60,7 +62,42 @@ Public Class ClsAC2
|
||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_PresupuestosEgresosSaldosRep")
|
||||
@@ -125,6 +162,7 @@ Public Class ClsAC2
|
||||
Me.disposedValue = True
|
||||
End Sub
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -19,6 +19,8 @@ Public Class ClsAF
|
||||
Private Data As DataTable
|
||||
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIÓN
|
||||
Private CveConexion As Integer = 0
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades"
|
||||
@@ -96,7 +98,7 @@ Public Class ClsAF
|
||||
End If
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
@@ -107,6 +109,42 @@ Public Class ClsAF
|
||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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
|
||||
If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction()
|
||||
Return SqlTransacc
|
||||
@@ -3225,6 +3263,7 @@ Public Class ClsAF
|
||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||
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).
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -16,6 +16,8 @@ Public Class ClsAIMMGM
|
||||
Private SqlTransacc As SqlTransaction
|
||||
Private Data As DataTable
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIÓN
|
||||
Private CveConexion As Integer = 0
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades"
|
||||
@@ -61,7 +63,7 @@ Public Class ClsAIMMGM
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
SqlCommand = New SqlCommand("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
|
||||
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
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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)
|
||||
|
||||
With SqlCommand
|
||||
@@ -726,6 +763,7 @@ Public Class ClsAIMMGM
|
||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||
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).
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -17,7 +17,8 @@ Public Class ClsAcarreos
|
||||
Private Data As DataTable
|
||||
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
|
||||
'REGISTRAR CONEXIÓN
|
||||
Private CveConexion As Integer = 0
|
||||
Public ReadOnly Property DtResultados() As DataTable
|
||||
Get
|
||||
DtResultados = Data
|
||||
@@ -48,7 +49,7 @@ Public Class ClsAcarreos
|
||||
End If
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
@@ -59,6 +60,42 @@ Public Class ClsAcarreos
|
||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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
|
||||
If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction()
|
||||
Return SqlTransacc
|
||||
@@ -1300,6 +1337,7 @@ Public Class ClsAcarreos
|
||||
Me.disposedValue = True
|
||||
End Sub
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -17,6 +17,8 @@ Public Class ClsAcumuladores
|
||||
Private Data As DataTable
|
||||
Private DSet As New DataSet
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIÓN
|
||||
Private CveConexion As Integer = 0
|
||||
|
||||
Private Sub SqlDataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
@@ -63,9 +65,44 @@ Public Class ClsAcumuladores
|
||||
End If
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
Get
|
||||
DtResultados = Data
|
||||
@@ -810,6 +847,7 @@ Public Class ClsAcumuladores
|
||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||
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).
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -9,6 +9,7 @@ Imports System.Configuration
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Xml
|
||||
Imports System.IO
|
||||
Imports System.Web
|
||||
|
||||
Public Class ClsBancos
|
||||
Implements IDisposable
|
||||
@@ -47,10 +48,12 @@ Public Class ClsBancos
|
||||
Public Property CveUsuarioCancelacion As Integer
|
||||
Public Property UsuarioCancelacion As String
|
||||
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
|
||||
|
||||
|
||||
#Region " P R O P I E D A D E S - B A N C O S - I E"
|
||||
Public Property CveIE As Integer
|
||||
Public Property CveCuenta As Integer
|
||||
@@ -178,16 +181,17 @@ Public Class ClsBancos
|
||||
Try
|
||||
SqlConexion.Open()
|
||||
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
|
||||
Else
|
||||
SqlConexion = TransaccionCompartida.Connection
|
||||
SqlTransacc = TransaccionCompartida
|
||||
SqlTransacc = TransaccionCompartida
|
||||
End If
|
||||
|
||||
SqlCommand = New SqlCommand("", SqlConexion)
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
ConexionAdd()
|
||||
|
||||
End Sub
|
||||
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
@@ -197,7 +201,45 @@ Public Class ClsBancos
|
||||
End With
|
||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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)
|
||||
With SqlCommand
|
||||
.Parameters.Clear()
|
||||
@@ -4066,8 +4108,9 @@ Public Class ClsBancos
|
||||
'End Sub
|
||||
|
||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -21,6 +21,8 @@ Public Class ClsBase
|
||||
Protected Data As DataTable
|
||||
Protected disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
Protected EsTransaccion As Boolean = False
|
||||
'REGISTRAR CONEXIÓN
|
||||
Private CveConexion As Integer = 0
|
||||
#End Region
|
||||
|
||||
Public Sub IniciaTransacSQL()
|
||||
@@ -44,6 +46,7 @@ Public Class ClsBase
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||
End Try
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
|
||||
Protected Sub AbrirConexion()
|
||||
@@ -103,6 +106,42 @@ Public Class ClsBase
|
||||
End With
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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)
|
||||
If sqlCommand Is Nothing Then
|
||||
sqlCommand = New SqlCommand
|
||||
@@ -161,6 +200,7 @@ Public Class ClsBase
|
||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||
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).
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -17,6 +17,8 @@ Public Class ClsCGame
|
||||
Private Data As DataTable
|
||||
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIÓN
|
||||
Private CveConexion As Integer = 0
|
||||
|
||||
Public ReadOnly Property DtResultados() As DataTable
|
||||
Get
|
||||
@@ -55,7 +57,7 @@ Public Class ClsCGame
|
||||
End If
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
@@ -66,6 +68,42 @@ Public Class ClsCGame
|
||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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
|
||||
If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction()
|
||||
Return SqlTransacc
|
||||
@@ -3365,6 +3403,7 @@ Public Class ClsCGame
|
||||
Me.disposedValue = True
|
||||
End Sub
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -18,7 +18,8 @@ Public Class ClsCRM
|
||||
Private DSet As New DataSet
|
||||
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -52,7 +53,7 @@ Public Class ClsCRM
|
||||
End If
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
@@ -63,6 +64,42 @@ Public Class ClsCRM
|
||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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
|
||||
If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction()
|
||||
Return SqlTransacc
|
||||
@@ -822,6 +859,20 @@ Public Class ClsCRM
|
||||
End Try
|
||||
Return Retorno
|
||||
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
|
||||
|
||||
@@ -983,6 +1034,7 @@ Public Class ClsCRM
|
||||
Me.disposedValue = True
|
||||
End Sub
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -23,6 +23,8 @@ Public Class ClsClaseBase
|
||||
Protected disposedValue As Boolean = False
|
||||
Protected EsTransaccion As Boolean = False
|
||||
Public MyCurrentError As String
|
||||
'REGISTRAR CONEXIÓN
|
||||
Private CveConexion As Integer = 0
|
||||
#End Region
|
||||
|
||||
Public Sub New(Optional adsObj As ClsClaseBase = Nothing)
|
||||
@@ -36,6 +38,7 @@ Public Class ClsClaseBase
|
||||
Try
|
||||
SqlConexion.Open()
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
ConexionAdd()
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||
|
||||
@@ -75,7 +78,42 @@ Public Class ClsClaseBase
|
||||
DTSet = New DataSet()
|
||||
End If
|
||||
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)
|
||||
|
||||
If SqlConexion.State = ConnectionState.Open Then
|
||||
@@ -133,6 +171,7 @@ Public Class ClsClaseBase
|
||||
End Sub
|
||||
#End Region
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
ConexionClose()
|
||||
If (SqlConexion IsNot Nothing) Then
|
||||
If SqlConexion.State = ConnectionState.Open Then
|
||||
Try
|
||||
|
||||
@@ -20,7 +20,8 @@ Public Class ClsClasificaciones
|
||||
Private StrSQL As StringBuilder
|
||||
Private Data As DataTable
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
|
||||
'REGISTRAR CONEXIÓN
|
||||
Private CveConexion As Integer = 0
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades"
|
||||
@@ -51,7 +52,7 @@ Public Class ClsClasificaciones
|
||||
SqlCommand = New SqlCommand("", SqlConexion)
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
StrSQL = New StringBuilder
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
|
||||
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
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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
|
||||
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.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -22,7 +22,8 @@ Public Class ClsClientes
|
||||
|
||||
'Atributos de la clase
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
|
||||
'REGISTRAR CONEXIÓN
|
||||
Private CveConexion As Integer = 0
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades"
|
||||
@@ -187,7 +188,7 @@ Public Class ClsClientes
|
||||
|
||||
SqlCommand = New SqlCommand("", SqlConexion)
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
@@ -198,6 +199,42 @@ Public Class ClsClientes
|
||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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)
|
||||
With SqlCommand
|
||||
.Parameters.Clear()
|
||||
@@ -1586,6 +1623,7 @@ Public Class ClsClientes
|
||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -17,6 +17,8 @@ Public Class ClsCompEstatusFactura
|
||||
Private SqlTransacc As SqlTransaction
|
||||
Private Data As DataTable
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIÓN
|
||||
Private CveConexion As Integer = 0
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -47,7 +49,7 @@ Public Class ClsCompEstatusFactura
|
||||
|
||||
SqlCommand = New SqlCommand("", SqlConexion)
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
|
||||
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
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -189,6 +226,7 @@ Public Class ClsCompEstatusFactura
|
||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -19,6 +19,8 @@ Public Class ClsCompProveedores
|
||||
|
||||
'Atributos de la clase
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIÓN
|
||||
Private CveConexion As Integer = 0
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades"
|
||||
@@ -171,7 +173,7 @@ Public Class ClsCompProveedores
|
||||
End If
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
Private Sub DataAdapter(ByVal pStrSQL As String, Optional ByVal TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
@@ -182,7 +184,42 @@ Public Class ClsCompProveedores
|
||||
Data = New DataTable
|
||||
If SqlTransacc IsNot Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
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
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -1534,6 +1571,7 @@ Public Class ClsCompProveedores
|
||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||
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).
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -19,10 +19,12 @@ Public Class ClsCompras
|
||||
Private StrSQL As StringBuilder
|
||||
|
||||
'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
|
||||
|
||||
|
||||
#Region "Propiedades"
|
||||
Public ReadOnly Property DtResultados() As DataTable
|
||||
Get
|
||||
@@ -57,13 +59,14 @@ Public Class ClsCompras
|
||||
SqlConexion.Open()
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||
End Try
|
||||
End Try
|
||||
Else
|
||||
SqlConexion = TransaccionCompartida.Connection
|
||||
SqlTransacc = TransaccionCompartida
|
||||
End If
|
||||
End If
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
ConexionAdd()
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -75,10 +78,45 @@ Public Class ClsCompras
|
||||
End With
|
||||
Data = New DataTable
|
||||
If SqlTransacc IsNot Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
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
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Comp_ComprasGet")
|
||||
@@ -1838,6 +1876,7 @@ Public Class ClsCompras
|
||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -21,7 +21,8 @@ Public Class ClsContPAQi
|
||||
Private DSet As New DataSet
|
||||
Private StrSQL As StringBuilder
|
||||
Public FolioNuevo As Integer
|
||||
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
|
||||
Public Enum TipoPoliza
|
||||
@@ -65,7 +66,7 @@ Public Class ClsContPAQi
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||
End Try
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -88,7 +89,7 @@ Public Class ClsContPAQi
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||
End Try
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
Private Sub SetTimeOut(Optional Tiempo As Integer = 30)
|
||||
SqlCommand.CommandTimeout = Tiempo
|
||||
@@ -105,7 +106,42 @@ Public Class ClsContPAQi
|
||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
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)
|
||||
With SqlCommand
|
||||
.Parameters.Clear()
|
||||
@@ -11164,6 +11200,7 @@ Public Class ClsContPAQi
|
||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||
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).
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -18,7 +18,8 @@ Public Class ClsContPAQi2
|
||||
Private Data As DataTable
|
||||
Private StrSQL As StringBuilder
|
||||
Public FolioNuevo As Integer
|
||||
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
|
||||
Public Enum TipoPoliza
|
||||
@@ -55,7 +56,7 @@ Public Class ClsContPAQi2
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||
End Try
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
|
||||
Sub New(Empresa As Empresa)
|
||||
@@ -72,7 +73,7 @@ Public Class ClsContPAQi2
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||
End Try
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
|
||||
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
|
||||
Data = New DataTable
|
||||
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)
|
||||
With SqlCommand
|
||||
.Parameters.Clear()
|
||||
@@ -999,6 +1035,7 @@ Public Class ClsContPAQi2
|
||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||
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).
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -23,7 +23,8 @@ Public Class ClsContabilidad
|
||||
'Atributos de la clase
|
||||
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
#End Region
|
||||
|
||||
#Region " P R O P I E D A D E S"
|
||||
@@ -98,7 +99,7 @@ Public Class ClsContabilidad
|
||||
End If
|
||||
Mensaje = New StringBuilder
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
|
||||
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
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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"
|
||||
@@ -5788,6 +5825,7 @@ Public Class ClsContabilidad
|
||||
Me.disposedValue = True
|
||||
End Sub
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -16,6 +16,8 @@ Public Class ClsContratos
|
||||
Private Dataset As DataSet
|
||||
Private SqlTransacc As SqlTransaction
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades"
|
||||
@@ -66,7 +68,7 @@ Public Class ClsContratos
|
||||
End If
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
|
||||
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
@@ -80,7 +82,42 @@ Public Class ClsContratos
|
||||
End Sub
|
||||
|
||||
#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"
|
||||
Public Property CveContrato As Integer
|
||||
@@ -2774,6 +2811,7 @@ Public Class ClsContratos
|
||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||
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).
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -20,6 +20,8 @@ Public Class ClsDG
|
||||
Private Data As DataTable
|
||||
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades"
|
||||
@@ -47,7 +49,7 @@ Public Class ClsDG
|
||||
End If
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
@@ -58,7 +60,42 @@ Public Class ClsDG
|
||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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
|
||||
If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction()
|
||||
Return SqlTransacc
|
||||
@@ -611,6 +648,7 @@ Public Class ClsDG
|
||||
Me.disposedValue = True
|
||||
End Sub
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -21,7 +21,8 @@ Public Class ClsDesarrollo
|
||||
'Atributos de la clase
|
||||
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades"
|
||||
@@ -44,7 +45,7 @@ Public Class ClsDesarrollo
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
|
||||
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
@@ -57,7 +58,42 @@ Public Class ClsDesarrollo
|
||||
End With
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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,
|
||||
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
|
||||
@@ -535,6 +571,7 @@ Public Class ClsDesarrollo
|
||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -17,6 +17,8 @@ Public Class ClsEdoc
|
||||
Private Data As DataTable
|
||||
Private DSet As New DataSet
|
||||
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)
|
||||
With SqlAdapter.SelectCommand
|
||||
@@ -29,7 +31,42 @@ Public Class ClsEdoc
|
||||
End If
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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
|
||||
If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction()
|
||||
Return SqlTransacc
|
||||
@@ -62,7 +99,7 @@ Public Class ClsEdoc
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||
End Try
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
@@ -285,6 +322,7 @@ Public Class ClsEdoc
|
||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||
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).
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -17,6 +17,8 @@ Public Class ClsEdocumentacion
|
||||
Private Data As DataTable
|
||||
Private DSet As New DataSet
|
||||
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)
|
||||
With SqlAdapter.SelectCommand
|
||||
@@ -57,7 +59,7 @@ Public Class ClsEdocumentacion
|
||||
End If
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
@@ -68,7 +70,42 @@ Public Class ClsEdocumentacion
|
||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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
|
||||
If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction()
|
||||
Return SqlTransacc
|
||||
@@ -464,6 +501,7 @@ Public Class ClsEdocumentacion
|
||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||
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).
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -14,6 +14,8 @@ Public Class ClsEdosFinancieros
|
||||
Private SqlAdapter As SqlDataAdapter = Nothing
|
||||
Private SqlCommand As SqlCommand = Nothing
|
||||
Private disposedValue As Boolean = False ' To detect redundant calls
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
|
||||
Public ReadOnly Property Data As DataTable
|
||||
Get
|
||||
@@ -37,7 +39,7 @@ Public Class ClsEdosFinancieros
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||
End Try
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
|
||||
Sub New(Empresa As Empresa)
|
||||
@@ -54,9 +56,52 @@ Public Class ClsEdosFinancieros
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||
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
|
||||
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)
|
||||
With SqlAdapter.SelectCommand
|
||||
.Parameters.Clear()
|
||||
@@ -854,6 +899,7 @@ Public Class ClsEdosFinancieros
|
||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' Do not change this code. Put cleanup code in Dispose(ByVal disposing As Boolean) above.
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -15,6 +15,8 @@ Public Class ClsEncuestas
|
||||
Private Data As DataTable
|
||||
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
|
||||
Public ReadOnly Property DtResultados() As DataTable
|
||||
Get
|
||||
@@ -40,7 +42,7 @@ Public Class ClsEncuestas
|
||||
End If
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
@@ -51,6 +53,42 @@ Public Class ClsEncuestas
|
||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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
|
||||
If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction()
|
||||
Return SqlTransacc
|
||||
@@ -673,6 +711,7 @@ Public Class ClsEncuestas
|
||||
Me.disposedValue = True
|
||||
End Sub
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -30,6 +30,8 @@ Public Class ClsEsquemasComisiones
|
||||
|
||||
'Atributos de la clase
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -62,7 +64,7 @@ Public Class ClsEsquemasComisiones
|
||||
End If
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
Private Sub DataAdapter(ByVal pStrSQL As String, Optional ByVal TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
@@ -73,6 +75,42 @@ Public Class ClsEsquemasComisiones
|
||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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"
|
||||
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.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -17,6 +17,8 @@ Public Class ClsEstatusFactura
|
||||
Private SqlTransacc As SqlTransaction
|
||||
Private Data As DataTable
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -47,7 +49,7 @@ Public Class ClsEstatusFactura
|
||||
|
||||
SqlCommand = New SqlCommand("", SqlConexion)
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
|
||||
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
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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)
|
||||
With SqlCommand
|
||||
.Parameters.Clear()
|
||||
@@ -216,6 +253,7 @@ Public Class ClsEstatusFactura
|
||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -21,6 +21,8 @@ Public Class ClsEventos
|
||||
'Atributos de la clase
|
||||
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -56,7 +58,7 @@ Public Class ClsEventos
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
|
||||
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
@@ -67,6 +69,42 @@ Public Class ClsEventos
|
||||
End With
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -209,6 +247,7 @@ Public Class ClsEventos
|
||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -21,7 +21,8 @@ Public Class ClsFISConfiguracion
|
||||
'Atributos de la clase
|
||||
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades"
|
||||
@@ -49,8 +50,52 @@ Public Class ClsFISConfiguracion
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
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
|
||||
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
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -140,6 +185,7 @@ Public Class ClsFISConfiguracion
|
||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -21,6 +21,8 @@ Public Class ClsFinanzas
|
||||
|
||||
'Atributos de la clase
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -124,7 +126,7 @@ Public Class ClsFinanzas
|
||||
|
||||
SqlCommand = New SqlCommand("", SqlConexion)
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
@@ -135,6 +137,42 @@ Public Class ClsFinanzas
|
||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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)
|
||||
With SqlCommand
|
||||
.Parameters.Clear()
|
||||
@@ -174,6 +212,7 @@ Public Class ClsFinanzas
|
||||
End Sub
|
||||
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -22,6 +22,8 @@ Public Class ClsFlotillas
|
||||
'Atributos de la clase
|
||||
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -66,7 +68,7 @@ Public Class ClsFlotillas
|
||||
|
||||
SqlCommand = New SqlCommand("", SqlConexion)
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
|
||||
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
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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)
|
||||
With SqlCommand
|
||||
.Parameters.Clear()
|
||||
@@ -725,6 +762,7 @@ Public Class ClsFlotillas
|
||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -21,6 +21,8 @@ Public Class ClsGPS
|
||||
Private Dataset As DataSet
|
||||
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
|
||||
Public ReadOnly Property DtResultados() As DataTable
|
||||
Get
|
||||
@@ -62,7 +64,7 @@ Public Class ClsGPS
|
||||
End If
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
@@ -73,6 +75,42 @@ Public Class ClsGPS
|
||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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
|
||||
If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction()
|
||||
Return SqlTransacc
|
||||
@@ -5287,6 +5325,7 @@ Public Class ClsGPS
|
||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||
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).
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -16,6 +16,8 @@ Public Class ClsGPSHerramientas
|
||||
Private Data As DataTable
|
||||
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades"
|
||||
@@ -37,7 +39,7 @@ Public Class ClsGPSHerramientas
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||
End Try
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
|
||||
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
@@ -48,6 +50,42 @@ Public Class ClsGPSHerramientas
|
||||
End With
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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"
|
||||
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.
|
||||
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).
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -17,6 +17,8 @@ Public Class ClsGenerales
|
||||
Private SqlTransacc As SqlTransaction
|
||||
Private Data As DataTable
|
||||
Private disposedValue As Boolean = False
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades"
|
||||
@@ -75,7 +77,7 @@ Public Class ClsGenerales
|
||||
End If
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
Private Sub DataAdapter(ByVal pStrSQL As String, Optional ByVal TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
@@ -86,6 +88,42 @@ Public Class ClsGenerales
|
||||
Data = New DataTable
|
||||
If SqlTransacc IsNot Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
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)
|
||||
With SqlCommand
|
||||
@@ -2882,6 +2920,7 @@ Public Class ClsGenerales
|
||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||
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).
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -32,6 +32,8 @@ Public Class ClsGralFolios
|
||||
Private _FechaIng As Date
|
||||
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -73,7 +75,7 @@ Public Class ClsGralFolios
|
||||
End If
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
|
||||
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
@@ -85,6 +87,42 @@ Public Class ClsGralFolios
|
||||
Data = New DataTable
|
||||
If SqlTransacc IsNot Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
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
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -257,6 +295,7 @@ Public Class ClsGralFolios
|
||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -16,6 +16,8 @@ Public Class ClsGralProductosServiciosCaracteristicas
|
||||
Private SqlTransacc As SqlTransaction
|
||||
Private Data As DataTable
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades"
|
||||
@@ -48,7 +50,7 @@ Public Class ClsGralProductosServiciosCaracteristicas
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||
End Try
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
|
||||
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
@@ -60,7 +62,42 @@ Public Class ClsGralProductosServiciosCaracteristicas
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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"
|
||||
|
||||
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.
|
||||
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).
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -20,6 +20,8 @@ Public Class ClsImpuestos
|
||||
Private Data As DataTable
|
||||
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades"
|
||||
@@ -45,7 +47,7 @@ Public Class ClsImpuestos
|
||||
End If
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
@@ -56,6 +58,42 @@ Public Class ClsImpuestos
|
||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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
|
||||
If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction()
|
||||
@@ -118,6 +156,7 @@ Public Class ClsImpuestos
|
||||
Me.disposedValue = True
|
||||
End Sub
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -18,6 +18,8 @@ Public Class ClsIndicadores
|
||||
Private Data As DataTable
|
||||
'Atributos de la clase
|
||||
Private disposedValue As Boolean = False
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
|
||||
|
||||
#End Region
|
||||
@@ -49,7 +51,7 @@ Public Class ClsIndicadores
|
||||
SqlCommand = New SqlCommand("", SqlConexion)
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
StrSQL = New StringBuilder
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
@@ -60,6 +62,42 @@ Public Class ClsIndicadores
|
||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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)
|
||||
With SqlCommand
|
||||
.Parameters.Clear()
|
||||
@@ -107,6 +145,7 @@ Public Class ClsIndicadores
|
||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||
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).
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -16,6 +16,9 @@ Public Class ClsInventarios
|
||||
Private Data As DataTable
|
||||
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -147,7 +150,7 @@ Public Class ClsInventarios
|
||||
End If
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
|
||||
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
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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 "
|
||||
|
||||
@@ -4652,6 +4690,7 @@ Public Class ClsInventarios
|
||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||
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).
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -20,6 +20,8 @@ Public Class ClsLeyendasFiscales
|
||||
|
||||
'Atributos de la clase
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -39,8 +41,52 @@ Public Class ClsLeyendasFiscales
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
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
|
||||
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
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -167,6 +213,7 @@ Public Class ClsLeyendasFiscales
|
||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -15,7 +15,8 @@ Public Class ClsMF
|
||||
Private SqlCommand As SqlCommand
|
||||
Private SqlTransacc As SqlTransaction
|
||||
Private Data As DataTable
|
||||
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
|
||||
|
||||
Public ReadOnly Property DtResultados() As DataTable
|
||||
@@ -46,7 +47,7 @@ Public Class ClsMF
|
||||
End If
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
@@ -57,6 +58,42 @@ Public Class ClsMF
|
||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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
|
||||
If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction()
|
||||
Return SqlTransacc
|
||||
@@ -683,6 +720,7 @@ Public Class ClsMF
|
||||
Me.disposedValue = True
|
||||
End Sub
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -20,6 +20,8 @@ Public Class ClsMetodosPagos
|
||||
|
||||
'Atributos de la clase
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -41,9 +43,53 @@ Public Class ClsMetodosPagos
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
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
|
||||
|
||||
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
|
||||
Dim Retorno As Boolean = False
|
||||
Data = New DataTable
|
||||
@@ -90,6 +136,7 @@ Public Class ClsMetodosPagos
|
||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -36,6 +36,8 @@ Public Class ClsModulos
|
||||
Private _CvePlataforma As String
|
||||
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades"
|
||||
@@ -142,7 +144,7 @@ Public Class ClsModulos
|
||||
End Try
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
|
||||
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
@@ -154,7 +156,42 @@ Public Class ClsModulos
|
||||
Data = New DataTable
|
||||
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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
|
||||
Dim OnError As Boolean = False
|
||||
Data = New DataTable
|
||||
@@ -392,6 +429,7 @@ Public Class ClsModulos
|
||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' No cambie este código. Coloque el código de limpieza en Dispose ( que se dispone como Boolean).
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -19,6 +19,8 @@ Public Class ClsMonedas
|
||||
|
||||
'Atributos de la clase
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -47,7 +49,7 @@ Public Class ClsMonedas
|
||||
End If
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
|
||||
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
@@ -59,7 +61,42 @@ Public Class ClsMonedas
|
||||
Data = New DataTable
|
||||
' If SqlTransacc IsNot Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
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
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_MonedasGet")
|
||||
@@ -120,6 +157,7 @@ Public Class ClsMonedas
|
||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -20,6 +20,8 @@ Public Class ClsMovimientos
|
||||
|
||||
'Atributos de la clase
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -42,7 +44,7 @@ Public Class ClsMovimientos
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
|
||||
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
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = 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()
|
||||
SqlTransacc = SqlConexion.BeginTransaction()
|
||||
@@ -1688,6 +1726,7 @@ Public Class ClsMovimientos
|
||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -13,6 +13,8 @@ Public Class ClsNominas
|
||||
Private SqlTransacc As SqlTransaction
|
||||
Private Data As DataTable
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIONES ABIERTAS
|
||||
Private CveConexion As Integer = 0
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades ClsNominas_Nominas"
|
||||
@@ -96,7 +98,7 @@ Public Class ClsNominas
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||
End Try
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing)
|
||||
|
||||
@@ -114,7 +116,7 @@ Public Class ClsNominas
|
||||
End If
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
@@ -125,6 +127,42 @@ Public Class ClsNominas
|
||||
Data = New DataTable
|
||||
If SqlTransacc IsNot Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
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"
|
||||
|
||||
@@ -1733,6 +1771,7 @@ Public Class ClsNominas
|
||||
disposedValue = True
|
||||
End Sub
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
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("PA_Sis_RegistrarConexion")
|
||||
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("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
@@ -99,7 +99,7 @@ Public Class ClsRH
|
||||
End Sub
|
||||
|
||||
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)
|
||||
|
||||
|
||||
@@ -83,7 +83,6 @@ Public Class ClsVentas
|
||||
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
|
||||
Try
|
||||
SqlConexion.Open()
|
||||
ConexionAdd()
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||
End Try
|
||||
@@ -91,8 +90,8 @@ Public Class ClsVentas
|
||||
SqlConexion = TransaccionCompartida.Connection
|
||||
SqlTransacc = TransaccionCompartida
|
||||
End If
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
ConexionAdd()
|
||||
|
||||
End Sub
|
||||
Private Sub DataAdapter(ByVal pStrSQL As String, Optional ByVal TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
@@ -105,41 +104,40 @@ Public Class ClsVentas
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
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
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
CveConexion = SqlAdapter.SelectCommand.Parameters("@Opcion").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 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)
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
@@ -3963,6 +3961,7 @@ Public Class ClsVentas
|
||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -5,6 +5,8 @@ Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports System.Xml
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports GemBox.Spreadsheet
|
||||
|
||||
Partial Class Bancos_CargarConciliacionesBancarias
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -83,51 +85,99 @@ Partial Class Bancos_CargarConciliacionesBancarias
|
||||
End If
|
||||
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)
|
||||
If Not DdlCuenta.SelectedValue.ToEntero > 0 Then
|
||||
Alert("Tiene que seleccionar una cuenta", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
Dim dt As New DataTable
|
||||
Dim Conexion As Odbc.OdbcConnection = Nothing
|
||||
Dim ErrorArchivo = False
|
||||
Dim ErrorExcel = False
|
||||
Dim strConnString As String = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" + Ruta + FileName + ";Extended Properties=Excel 8.0;"
|
||||
Dim objDbFactory As Common.DbProviderFactory = Common.DbProviderFactories.GetFactory("System.Data.OleDb")
|
||||
Dim objDbAdapter As Common.DbDataAdapter = objDbFactory.CreateDataAdapter()
|
||||
Dim objDbConnection As Common.DbConnection = objDbFactory.CreateConnection()
|
||||
objDbConnection.ConnectionString = strConnString
|
||||
objDbConnection.Open()
|
||||
Dim objSheetNames As DataTable = objDbConnection.GetSchema("Tables")
|
||||
Dim HojaExcel As String = objSheetNames.FiltroPrimeroValor("TABLE_NAME")
|
||||
Try
|
||||
Select Case Tipo
|
||||
Case "CSV"
|
||||
Conexion = New Odbc.OdbcConnection("Driver={Microsoft Access Text Driver (*.txt, *.csv)};Dbq=" + Ruta + ";Extensions=asc,csv,tab,txt;")
|
||||
Conexion.Open()
|
||||
Dim cmd = Conexion.CreateCommand()
|
||||
cmd.CommandType = CommandType.Text
|
||||
cmd.CommandText = $"SELECT * FROM [{FileName}]"
|
||||
Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
||||
DataAdapter.Fill(dt)
|
||||
Case "EXCEL"
|
||||
Conexion = New Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + Ruta + FileName + ";")
|
||||
Conexion.Open()
|
||||
Dim cmd = Conexion.CreateCommand()
|
||||
cmd.CommandType = CommandType.Text
|
||||
cmd.CommandText = $"SELECT * FROM [{HojaExcel}]"
|
||||
Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
||||
DataAdapter.Fill(dt)
|
||||
Case Else
|
||||
Alert("El archivo no tiene el formato correcto", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
ErrorArchivo = True
|
||||
OnError("Ocurrio un error al leer el archivo <br/>" & ex.Message, ex)
|
||||
End Try
|
||||
Conexion.Close()
|
||||
If Not ErrorArchivo Then
|
||||
dt = ReadExcelFile(Ruta + FileName, True)
|
||||
'Dim Conexion As Odbc.OdbcConnection = Nothing
|
||||
'Dim ErrorArchivo = False
|
||||
'Dim ErrorExcel = False
|
||||
'Dim strConnString As String = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" + Ruta + FileName + ";Extended Properties=Excel 8.0;"
|
||||
'Dim objDbFactory As Common.DbProviderFactory = Common.DbProviderFactories.GetFactory("System.Data.OleDb")
|
||||
'Dim objDbAdapter As Common.DbDataAdapter = objDbFactory.CreateDataAdapter()
|
||||
'Dim objDbConnection As Common.DbConnection = objDbFactory.CreateConnection()
|
||||
'objDbConnection.ConnectionString = strConnString
|
||||
'objDbConnection.Open()
|
||||
'Dim objSheetNames As DataTable = objDbConnection.GetSchema("Tables")
|
||||
'Dim HojaExcel As String = objSheetNames.FiltroPrimeroValor("TABLE_NAME")
|
||||
'Try
|
||||
' Select Case Tipo
|
||||
' Case "CSV"
|
||||
' Conexion = New Odbc.OdbcConnection("Driver={Microsoft Access Text Driver (*.txt, *.csv)};Dbq=" + Ruta + ";Extensions=asc,csv,tab,txt;")
|
||||
' Conexion.Open()
|
||||
' Dim cmd = Conexion.CreateCommand()
|
||||
' cmd.CommandType = CommandType.Text
|
||||
' cmd.CommandText = $"SELECT * FROM [{FileName}]"
|
||||
' Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
||||
' DataAdapter.Fill(dt)
|
||||
' Case "EXCEL"
|
||||
' Conexion = New Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + Ruta + FileName + ";")
|
||||
' Conexion.Open()
|
||||
' Dim cmd = Conexion.CreateCommand()
|
||||
' cmd.CommandType = CommandType.Text
|
||||
' cmd.CommandText = $"SELECT * FROM [{HojaExcel}]"
|
||||
' Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
||||
' DataAdapter.Fill(dt)
|
||||
' Case Else
|
||||
' Alert("El archivo no tiene el formato correcto", TipoMensaje.MsgError)
|
||||
' Exit Sub
|
||||
' End Select
|
||||
'Catch ex As Exception
|
||||
' ErrorArchivo = True
|
||||
' OnError("Ocurrio un error al leer el archivo <br/>" & ex.Message, ex)
|
||||
'End Try
|
||||
'Conexion.Close()
|
||||
If dt IsNot Nothing Then
|
||||
dt.Columns(0).ColumnName = "FechaDocumento"
|
||||
dt.Columns(1).ColumnName = "Referencia"
|
||||
dt.Columns(2).ColumnName = "Importe"
|
||||
@@ -166,6 +216,8 @@ Partial Class Bancos_CargarConciliacionesBancarias
|
||||
ObjBancos.RollBack()
|
||||
End If
|
||||
ObjBancos.Dispose()
|
||||
Else
|
||||
Alert("Hubo un error al intentar leer el archivo.", TipoMensaje.MsgError)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -6,6 +6,12 @@
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<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 ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Bancos
|
||||
@@ -15,7 +21,7 @@
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="150px">
|
||||
|
||||
@@ -4,54 +4,67 @@ Option Strict On
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Bancos_CatBancos
|
||||
Inherits ClsPaginas
|
||||
Inherits ClsPaginas
|
||||
|
||||
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
|
||||
Private Property DtBan As DataTable
|
||||
Get
|
||||
DtBan = DirectCast(ViewState("DtBan"), DataTable)
|
||||
End Get
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjBancos As New ClsBancos
|
||||
If ObjBancos.GetBancos() Then
|
||||
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTBancos = ObjBancos.DtResultados
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtBan") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
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
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjBancos As New ClsBancos
|
||||
If ObjBancos.GetBancos() Then
|
||||
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
DtBan = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTBancos = ObjBancos.DtResultados
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
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 = ""
|
||||
ObjBancos.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
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 = ""
|
||||
Alert("El nuevo Banco se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTBancos = ObjBancos.DtResultados
|
||||
UpTitulos.Update()
|
||||
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
DtBan = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTBancos = ObjBancos.DtResultados
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
ObjBancos.Dispose()
|
||||
End Sub
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
ObjBancos.Dispose()
|
||||
End Sub
|
||||
|
||||
#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
|
||||
@@ -80,6 +93,7 @@ Partial Class Bancos_CatBancos
|
||||
If ObjBancos.RemoveBancos(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
DtBan = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTBancos = ObjBancos.DtResultados
|
||||
Alert("El Banco se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
@@ -116,6 +130,7 @@ Partial Class Bancos_CatBancos
|
||||
If ObjBancos.UpdateBancos(Banco, Ejecutivo, Telefono, Estatus, CveBanco) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
DtBan = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTBancos = ObjBancos.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
@@ -178,4 +193,28 @@ Partial Class Bancos_CatBancos
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#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
|
||||
|
||||
@@ -6,14 +6,17 @@
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<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>
|
||||
<%-- <img alt="Nuevo Número de Cuenta Bancaria" onclick="document.location.href='/Bancos/CuentasBancariasDetalle.aspx'" src="/Imagenes/BotonAgregar.gif" style="cursor: pointer;" />--%>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<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>
|
||||
<%-- <img alt="Nuevo Número de Cuenta Bancaria" onclick="document.location.href='/Bancos/CuentasBancariasDetalle.aspx'" src="/Imagenes/BotonAgregar.gif" style="cursor: pointer;" />--%>
|
||||
</li>
|
||||
<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 ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Número de Cuentas Bancarias / Cajas Chicas.
|
||||
@@ -23,10 +26,10 @@
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<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>
|
||||
<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: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">
|
||||
<HeaderTemplate>Banco</HeaderTemplate>
|
||||
<ItemTemplate> <asp:Literal ID="LtlBanco" runat="server" Text='<%# Eval("Banco", "{0}") %>'></asp:Literal></ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
@@ -35,7 +38,7 @@
|
||||
<ItemTemplate> <asp:Literal ID="LtlNumCuenta" runat="server" Text='<%# Eval("NumCuenta", "{0}") %>'></asp:Literal></ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||
<HeaderTemplate>CLABE</HeaderTemplate>
|
||||
<ItemTemplate> <asp:Literal ID="LtlCLABE" runat="server" Text='<%# Eval("CLABE", "{0}") %>'></asp:Literal></ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
@@ -43,26 +46,30 @@
|
||||
<HeaderTemplate>Moneda</HeaderTemplate>
|
||||
<ItemTemplate> <asp:Literal ID="LtlMoneda" runat="server" Text='<%# Eval("Moneda", "{0}") %>'></asp:Literal></ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Folio Inicial</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFInicial" runat="server" Text='<%# Eval("FInicial", "{0:d}") %>'></asp:Literal></ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:Literal ID="LtlFInicial" runat="server" Text='<%# Eval("FInicial", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Estatus</HeaderTemplate>
|
||||
<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>
|
||||
<HeaderTemplate>Fecha</HeaderTemplate>
|
||||
<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 ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Left">
|
||||
<asp:TemplateField ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Left">
|
||||
<HeaderTemplate>Usuario</HeaderTemplate>
|
||||
<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>
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
|
||||
@@ -4,9 +4,21 @@ Option Strict On
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Bancos_CuentasBancarias
|
||||
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
|
||||
Private ReadOnly Property CveCuenta As Integer
|
||||
Get
|
||||
@@ -22,7 +34,7 @@ Partial Class Bancos_CuentasBancarias
|
||||
Dim ObjBancos As New ClsBancos
|
||||
If ObjBancos.GetBancosCuentas(-1) Then
|
||||
ViewState("DTBancosCuentas") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
|
||||
DtBan = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
@@ -53,6 +65,7 @@ Partial Class Bancos_CuentasBancarias
|
||||
If ObjBancos.RemoveBancosCuentas(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTBancosCuentas") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
DtBan = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
If ObjBancos.GetBancosCuentasUsuarios(-1) Then
|
||||
GlobalDTBancosCuentas(-1) = ObjBancos.DtResultados
|
||||
End If
|
||||
@@ -126,4 +139,27 @@ Partial Class Bancos_CuentasBancarias
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
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
|
||||
|
||||
@@ -757,6 +757,55 @@
|
||||
</ContentTemplate>
|
||||
</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>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -219,8 +219,15 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
InicializaDatos();
|
||||
CargaDatos();
|
||||
CargaCotizaciones();
|
||||
CargaGastos();
|
||||
CargaRechazosMotivos();
|
||||
|
||||
if (UsuarioActual.CveEmpresa == 72)
|
||||
{
|
||||
TabDatosTecnicos.Visible = false;
|
||||
TabImagenes.Visible = false;
|
||||
}
|
||||
|
||||
if (CveAcercamiento > 0)
|
||||
{
|
||||
CargaEtapasBitacora();
|
||||
@@ -502,7 +509,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
}
|
||||
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();
|
||||
@@ -1473,4 +1480,18 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
}
|
||||
}
|
||||
#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
|
||||
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
|
||||
Dim PorcentajeIVA As Decimal = TmpDT.MAX("IVAPorcentaje").ToDecimal
|
||||
|
||||
@@ -8846,11 +8856,7 @@ Partial Class Compras_Compras
|
||||
' 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 Not ActualizarPrePoliza(ObjContabilidad, ObjCompra) Then
|
||||
@@ -8859,7 +8865,7 @@ Partial Class Compras_Compras
|
||||
'End If
|
||||
|
||||
''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.IniciaTransacSQL()
|
||||
|
||||
@@ -9242,9 +9248,11 @@ Partial Class Compras_Compras
|
||||
Next
|
||||
|
||||
If Retorno Then
|
||||
If ViewState("IdPoliza").ToString.ToEntero > 0 Then
|
||||
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjContaAC.IniciaTransacSQL()
|
||||
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1") AndAlso IdPoliza > 0 Then
|
||||
If ObjContaAC Is Nothing Then
|
||||
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
|
||||
Retorno = False
|
||||
@@ -9261,6 +9269,18 @@ Partial Class Compras_Compras
|
||||
|
||||
'Retorno = True
|
||||
'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
|
||||
|
||||
Else
|
||||
@@ -9275,7 +9295,7 @@ Partial Class Compras_Compras
|
||||
Catch ex As Exception
|
||||
Alert("Ocurrió un error al actualizar la compra", TipoMensaje.MsgError)
|
||||
ObjCompra.RollBack()
|
||||
ObjContaAC.RollBack()
|
||||
If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack()
|
||||
|
||||
Finally
|
||||
If Retorno Then
|
||||
|
||||
@@ -6,6 +6,7 @@ Imports System.IO
|
||||
Imports System.Data
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Globalization
|
||||
Imports GemBox.Spreadsheet
|
||||
|
||||
Partial Class Contratos_Default
|
||||
Inherits ClsPaginas
|
||||
@@ -3185,32 +3186,79 @@ Partial Class Contratos_Default
|
||||
Public Sub LbDescargarExcel_Click(sender As Object, e As EventArgs) Handles LbDescargarExcel.Click
|
||||
DescargarFormato()
|
||||
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)
|
||||
Dim dt As New DataTable
|
||||
Dim Conexion As Odbc.OdbcConnection = Nothing
|
||||
dt = ReadExcelFile(Ruta + FileName, True)
|
||||
Dim ErrorArchivo = False
|
||||
|
||||
Try
|
||||
Select Case Tipo
|
||||
Case "EXCEL"
|
||||
Conexion = New Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + Ruta + FileName + ";")
|
||||
Conexion.Open()
|
||||
Dim cmd = Conexion.CreateCommand()
|
||||
cmd.CommandType = CommandType.Text
|
||||
cmd.CommandText = "SELECT * FROM [Hoja1$]"
|
||||
Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
||||
DataAdapter.Fill(dt)
|
||||
Case Else
|
||||
Alert("El archivo no tiene el formato correcto", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
ErrorArchivo = True
|
||||
OnError("Ocurrio un error al leer el archivo <br/>" & ex.Message, ex)
|
||||
End Try
|
||||
Conexion.Close()
|
||||
If Not ErrorArchivo Then
|
||||
'Dim Conexion As Odbc.OdbcConnection = Nothing
|
||||
'Try
|
||||
' Select Case Tipo
|
||||
' Case "EXCEL"
|
||||
' Conexion = New Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + Ruta + FileName + ";")
|
||||
' Conexion.Open()
|
||||
' Dim cmd = Conexion.CreateCommand()
|
||||
' cmd.CommandType = CommandType.Text
|
||||
' cmd.CommandText = "SELECT * FROM [Hoja1$]"
|
||||
' Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
||||
' DataAdapter.Fill(dt)
|
||||
' Case Else
|
||||
' Alert("El archivo no tiene el formato correcto", TipoMensaje.MsgError)
|
||||
' Exit Sub
|
||||
' End Select
|
||||
'Catch ex As Exception
|
||||
' ErrorArchivo = True
|
||||
' OnError("Ocurrio un error al leer el archivo <br/>" & ex.Message, ex)
|
||||
'End Try
|
||||
'Conexion.Close()
|
||||
If Not ErrorArchivo AndAlso dt IsNot Nothing 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)
|
||||
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 Extensiones
|
||||
Imports System.IO
|
||||
Imports GemBox.Spreadsheet
|
||||
|
||||
Partial Class OC
|
||||
Inherits ClsPaginas
|
||||
@@ -5831,31 +5832,80 @@ Partial Class OC
|
||||
End If
|
||||
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)
|
||||
|
||||
Dim dt As New DataTable
|
||||
Dim Conexion As Odbc.OdbcConnection = Nothing
|
||||
dt = ReadExcelFile(Ruta + FileName, True)
|
||||
Dim ErrorArchivo = False
|
||||
Try
|
||||
Select Case Tipo
|
||||
Case "EXCEL"
|
||||
Conexion = New Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + Ruta + FileName + ";")
|
||||
Conexion.Open()
|
||||
Dim cmd = Conexion.CreateCommand()
|
||||
cmd.CommandType = CommandType.Text
|
||||
cmd.CommandText = "SELECT * FROM [Hoja1$]"
|
||||
Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
||||
DataAdapter.Fill(dt)
|
||||
Case Else
|
||||
Alert("El archivo no tiene el formato correcto", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
ErrorArchivo = True
|
||||
OnError("Ocurrio un error al leer el archivo <br/>" & ex.Message, ex)
|
||||
End Try
|
||||
Conexion.Close()
|
||||
If Not ErrorArchivo Then
|
||||
|
||||
'Dim Conexion As Odbc.OdbcConnection = Nothing
|
||||
'Try
|
||||
' Select Case Tipo
|
||||
' Case "EXCEL"
|
||||
' Conexion = New Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + Ruta + FileName + ";")
|
||||
' Conexion.Open()
|
||||
' Dim cmd = Conexion.CreateCommand()
|
||||
' cmd.CommandType = CommandType.Text
|
||||
' cmd.CommandText = "SELECT * FROM [Hoja1$]"
|
||||
' Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
||||
' DataAdapter.Fill(dt)
|
||||
' Case Else
|
||||
' Alert("El archivo no tiene el formato correcto", TipoMensaje.MsgError)
|
||||
' Exit Sub
|
||||
' End Select
|
||||
'Catch ex As Exception
|
||||
' ErrorArchivo = True
|
||||
' OnError("Ocurrio un error al leer el archivo <br/>" & ex.Message, ex)
|
||||
'End Try
|
||||
'Conexion.Close()
|
||||
If Not ErrorArchivo AndAlso dt IsNot Nothing Then
|
||||
If Not dt.Columns(0).ColumnName = "Cantidad" Then
|
||||
Alert("El nombre de la primera columna debe ser 'Cantidad'.Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</asp:RadioButtonList>
|
||||
</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:DropDownList>
|
||||
</td>
|
||||
@@ -69,7 +69,7 @@
|
||||
</asp:RadioButtonList>
|
||||
</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:DropDownList>
|
||||
</td>
|
||||
@@ -83,7 +83,7 @@
|
||||
</asp:RadioButtonList>
|
||||
</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:DropDownList>
|
||||
</td>
|
||||
@@ -97,7 +97,7 @@
|
||||
</asp:RadioButtonList>
|
||||
</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:DropDownList>
|
||||
</td>
|
||||
@@ -111,12 +111,12 @@
|
||||
</asp:RadioButtonList>
|
||||
</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:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
<%-- <tr>
|
||||
<%-- <tr>
|
||||
<td>Clave de Empresa:</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtCveEmpresa" runat="server" MaxLength="50" Width="60px"></asp:TextBox>
|
||||
@@ -195,6 +195,53 @@
|
||||
</table>
|
||||
</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>
|
||||
|
||||
|
||||
@@ -17,35 +17,135 @@ Partial Class Sistemas_ConfiguracionEmpresa
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
CargaCuentaClIente()
|
||||
CargaCuentasClientesSIG()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCuentaCliente()
|
||||
Dim ObjCompaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
#Region "Carga Cuentas"
|
||||
Private Sub CargaCuentasClientesSIG()
|
||||
Dim ObjContabilidad As New ClsContabilidad
|
||||
|
||||
If RblTipo.SelectedValue = "SIG" Then
|
||||
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
|
||||
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
|
||||
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 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
|
||||
|
||||
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
|
||||
CargaCuentaCliente()
|
||||
If RblTipo.SelectedValue = "SIG" Then
|
||||
DvServidorConta.Visible = False
|
||||
CargaCuentasClientesSIG()
|
||||
Else
|
||||
DvServidorConta.Visible = True
|
||||
CargaCuentasClientesCompaq()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
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.DataBind()
|
||||
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
|
||||
Dim PrecioSugerido = 0.0
|
||||
PrecioSugerido = drPS("Precio").ToString.ToDouble
|
||||
@@ -13239,6 +13243,15 @@ Partial Class Ventas
|
||||
Return False
|
||||
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
|
||||
'SOLO VALIDA EXISTENCIAS Y COSTO: SI USA INVENTARIOS, SOLO PRODUCTOS TIPO PRODUCTO, SOLO REMISIONES E INGRESOS
|
||||
|
||||
Reference in New Issue
Block a user