This commit is contained in:
Raul Pimienta
2019-09-05 11:12:57 -07:00
81 changed files with 942 additions and 519 deletions

View File

@@ -75,7 +75,7 @@ Public Class ClsAC
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -98,7 +98,7 @@ Public Class ClsAC
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -70,7 +70,7 @@ Public Class ClsAC2
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -93,7 +93,7 @@ Public Class ClsAC2
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -117,7 +117,7 @@ Public Class ClsAF
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -140,7 +140,7 @@ Public Class ClsAF
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -83,7 +83,7 @@ Public Class ClsAIMMGM
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -106,7 +106,7 @@ Public Class ClsAIMMGM
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -68,7 +68,7 @@ Public Class ClsAcarreos
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -91,7 +91,7 @@ Public Class ClsAcarreos
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -75,7 +75,7 @@ Public Class ClsAcumuladores
SqlDataAdapter("PA_Sis_RegistrarConexion") SqlDataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -98,7 +98,7 @@ Public Class ClsAcumuladores
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -211,7 +211,7 @@ Public Class ClsBancos
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -234,7 +234,7 @@ Public Class ClsBancos
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -114,7 +114,7 @@ Public Class ClsBase
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -137,7 +137,7 @@ Public Class ClsBase
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -76,7 +76,7 @@ Public Class ClsCGame
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -99,7 +99,7 @@ Public Class ClsCGame
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -72,7 +72,7 @@ Public Class ClsCRM
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -95,7 +95,7 @@ Public Class ClsCRM
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -86,7 +86,7 @@ Public Class ClsClaseBase
SqlDataAdapter("PA_Sis_RegistrarConexion") SqlDataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -109,7 +109,7 @@ Public Class ClsClaseBase
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -72,7 +72,7 @@ Public Class ClsClasificaciones
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -95,7 +95,7 @@ Public Class ClsClasificaciones
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -207,7 +207,7 @@ Public Class ClsClientes
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -230,7 +230,7 @@ Public Class ClsClientes
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -69,7 +69,7 @@ Public Class ClsCompEstatusFactura
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -92,7 +92,7 @@ Public Class ClsCompEstatusFactura
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -192,7 +192,7 @@ Public Class ClsCompProveedores
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -215,7 +215,7 @@ Public Class ClsCompProveedores
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -88,7 +88,7 @@ Public Class ClsCompras
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -111,7 +111,7 @@ Public Class ClsCompras
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -66,7 +66,7 @@ Public Class ClsContPAQi
Catch ex As Exception Catch ex As Exception
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex) Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
End Try End Try
ConexionAdd() 'ConexionAdd()
End Sub End Sub
@@ -114,7 +114,7 @@ Public Class ClsContPAQi
SqlDataAdapter("PA_Sis_RegistrarConexion") SqlDataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -9960,19 +9960,19 @@ Public Class ClsContPAQi
Public Function FNC_GetCounter() As Boolean Public Function FNC_GetCounter() As Boolean
Dim Retorno = False Dim Retorno = False
StrSQL.Clear() 'StrSQL.Clear()
StrSQL.Append(" IF OBJECT_ID ('FNC_GetCounter') IS NOT NULL DROP FUNCTION FNC_GetCounter") 'StrSQL.Append(" IF OBJECT_ID ('FNC_GetCounter') IS NOT NULL DROP FUNCTION FNC_GetCounter")
SqlDataAdapter(StrSQL.ToString, CommandType.Text) 'SqlDataAdapter(StrSQL.ToString, CommandType.Text)
Try 'Try
SqlAdapter.SelectCommand.ExecuteNonQuery() ' SqlAdapter.SelectCommand.ExecuteNonQuery()
Catch ex As Exception 'Catch ex As Exception
Me.OnError("Ocurrió un error al eliminar la funcion FNC_GetCounter", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) ' Me.OnError("Ocurrió un error al eliminar la funcion FNC_GetCounter", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try 'End Try
StrSQL.Clear() StrSQL.Clear()
StrSQL.Append(" CREATE FUNCTION [dbo].[FNC_GetCounter] ") StrSQL.Append(" CREATE OR ALTER FUNCTION [dbo].[FNC_GetCounter] ")
StrSQL.Append(" ( ") StrSQL.Append(" ( ")
StrSQL.Append(" @TipoCounter VARCHAR(200) ") StrSQL.Append(" @TipoCounter VARCHAR(200) ")
StrSQL.Append(" ) ") StrSQL.Append(" ) ")

View File

@@ -56,7 +56,7 @@ Public Class ClsContPAQi2
Catch ex As Exception Catch ex As Exception
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex) Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
End Try End Try
ConexionAdd() 'ConexionAdd()
End Sub End Sub
Sub New(Empresa As Empresa) Sub New(Empresa As Empresa)
@@ -73,7 +73,7 @@ Public Class ClsContPAQi2
Catch ex As Exception Catch ex As Exception
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex) Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
End Try End Try
ConexionAdd() 'ConexionAdd()
End Sub End Sub
Private Sub SqlDataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure) Private Sub SqlDataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
@@ -93,7 +93,7 @@ Public Class ClsContPAQi2
SqlDataAdapter("PA_Sis_RegistrarConexion") SqlDataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -1035,7 +1035,7 @@ Public Class ClsContPAQi2
' Visual Basic agregó este código para implementar correctamente el modelo descartable. ' Visual Basic agregó este código para implementar correctamente el modelo descartable.
Public Sub Dispose() Implements IDisposable.Dispose Public Sub Dispose() Implements IDisposable.Dispose
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean). ' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
ConexionClose() 'ConexionClose()
Dispose(True) Dispose(True)
GC.SuppressFinalize(Me) GC.SuppressFinalize(Me)
End Sub End Sub

View File

@@ -119,7 +119,7 @@ Public Class ClsContabilidad
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -142,7 +142,7 @@ Public Class ClsContabilidad
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -90,7 +90,7 @@ Public Class ClsContratos
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -113,7 +113,7 @@ Public Class ClsContratos
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -68,7 +68,7 @@ Public Class ClsDG
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -91,7 +91,7 @@ Public Class ClsDG
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -66,7 +66,7 @@ Public Class ClsDesarrollo
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -89,7 +89,7 @@ Public Class ClsDesarrollo
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -39,7 +39,7 @@ Public Class ClsEdoc
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -62,7 +62,7 @@ Public Class ClsEdoc
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -78,7 +78,7 @@ Public Class ClsEdocumentacion
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -101,7 +101,7 @@ Public Class ClsEdocumentacion
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -66,7 +66,7 @@ Public Class ClsEdosFinancieros
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -89,7 +89,7 @@ Public Class ClsEdosFinancieros
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -61,7 +61,7 @@ Public Class ClsEncuestas
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -84,7 +84,7 @@ Public Class ClsEncuestas
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -83,7 +83,7 @@ Public Class ClsEsquemasComisiones
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -106,7 +106,7 @@ Public Class ClsEsquemasComisiones
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -69,7 +69,7 @@ Public Class ClsEstatusFactura
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -92,7 +92,7 @@ Public Class ClsEstatusFactura
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -77,7 +77,7 @@ Public Class ClsEventos
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -100,7 +100,7 @@ Public Class ClsEventos
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -60,7 +60,7 @@ Public Class ClsFISConfiguracion
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -83,7 +83,7 @@ Public Class ClsFISConfiguracion
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -145,7 +145,7 @@ Public Class ClsFinanzas
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -168,7 +168,7 @@ Public Class ClsFinanzas
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -88,7 +88,7 @@ Public Class ClsFlotillas
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -111,7 +111,7 @@ Public Class ClsFlotillas
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -83,7 +83,7 @@ Public Class ClsGPS
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -106,7 +106,7 @@ Public Class ClsGPS
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -58,7 +58,7 @@ Public Class ClsGPSHerramientas
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -81,7 +81,7 @@ Public Class ClsGPSHerramientas
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -96,7 +96,7 @@ Public Class ClsGenerales
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -119,7 +119,7 @@ Public Class ClsGenerales
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -95,7 +95,7 @@ Public Class ClsGralFolios
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -118,7 +118,7 @@ Public Class ClsGralFolios
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -70,7 +70,7 @@ Public Class ClsGralProductosServiciosCaracteristicas
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -93,7 +93,7 @@ Public Class ClsGralProductosServiciosCaracteristicas
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -66,7 +66,7 @@ Public Class ClsImpuestos
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -89,7 +89,7 @@ Public Class ClsImpuestos
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -70,7 +70,7 @@ Public Class ClsIndicadores
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -93,7 +93,7 @@ Public Class ClsIndicadores
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -170,7 +170,7 @@ Public Class ClsInventarios
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -193,7 +193,7 @@ Public Class ClsInventarios
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -52,7 +52,7 @@ Public Class ClsLeyendasFiscales
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -75,7 +75,7 @@ Public Class ClsLeyendasFiscales
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -66,7 +66,7 @@ Public Class ClsMF
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -89,7 +89,7 @@ Public Class ClsMF
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -54,7 +54,7 @@ Public Class ClsMetodosPagos
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -77,7 +77,7 @@ Public Class ClsMetodosPagos
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -164,7 +164,7 @@ Public Class ClsModulos
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -187,7 +187,7 @@ Public Class ClsModulos
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -69,7 +69,7 @@ Public Class ClsMonedas
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -92,7 +92,7 @@ Public Class ClsMonedas
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -64,7 +64,7 @@ Public Class ClsMovimientos
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -87,7 +87,7 @@ Public Class ClsMovimientos
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -141,7 +141,7 @@ Public Class ClsNominas
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -164,7 +164,7 @@ Public Class ClsNominas
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -190,7 +190,7 @@ Public Class ClsOC
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -206,14 +206,13 @@ Public Class ClsOC
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
CveConexion = 0
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -133,7 +133,7 @@ Public Class ClsOIEventos
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -149,14 +149,13 @@ Public Class ClsOIEventos
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
CveConexion = 0
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -122,7 +122,7 @@ Public Class ClsOS
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -138,14 +138,14 @@ Public Class ClsOS
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
CveConexion = 0
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -88,7 +88,7 @@ Public Class ClsPV
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -104,14 +104,14 @@ Public Class ClsPV
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
CveConexion = 0
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -91,7 +91,7 @@ Public Class ClsPresupuestos
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -107,14 +107,14 @@ Public Class ClsPresupuestos
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
CveConexion = 0
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -170,7 +170,7 @@ Public Class ClsProductosServicios
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -186,14 +186,14 @@ Public Class ClsProductosServicios
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
CveConexion = 0
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -72,7 +72,7 @@ Public Class ClsProsEncuestas
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -88,14 +88,14 @@ Public Class ClsProsEncuestas
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
CveConexion = 0
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -185,7 +185,7 @@ Public Class ClsProspectos
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -201,14 +201,14 @@ Public Class ClsProspectos
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
CveConexion = 0
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -78,7 +78,7 @@ Public Class ClsProyectos
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -94,14 +94,14 @@ Public Class ClsProyectos
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
CveConexion = 0
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -71,7 +71,7 @@ Public Class ClsPruebasJJMQ
SqlDataAdapter("PA_Sis_RegistrarConexion") SqlDataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -87,14 +87,14 @@ Public Class ClsPruebasJJMQ
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
SqlDataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) SqlDataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
CveConexion = 0
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -108,7 +108,7 @@ Public Class ClsPuntoVenta
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -124,14 +124,14 @@ Public Class ClsPuntoVenta
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
CveConexion = 0
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -86,7 +86,7 @@ Public Class ClsRH
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -102,14 +102,14 @@ Public Class ClsRH
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
CveConexion = 0
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -79,7 +79,7 @@ Public Class ClsRMA
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -95,14 +95,14 @@ Public Class ClsRMA
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
CveConexion = 0
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -102,7 +102,7 @@ Public Class ClsSAT
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -118,14 +118,14 @@ Public Class ClsSAT
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
CveConexion = 0
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -76,7 +76,7 @@ Public Class ClsSCTLicencias
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -92,14 +92,14 @@ Public Class ClsSCTLicencias
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
CveConexion = 0
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -57,7 +57,7 @@ Public Class ClsSeguimiento
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -73,14 +73,14 @@ Public Class ClsSeguimiento
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
CveConexion = 0
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -245,7 +245,7 @@ Public Class ClsSisEmpresas
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -253,7 +253,6 @@ Public Class ClsSisEmpresas
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
End If End If
End Sub End Sub
@@ -261,13 +260,13 @@ Public Class ClsSisEmpresas
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
CveConexion = 0
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If

View File

@@ -115,7 +115,7 @@ Public Class ClsSisNotificaciones
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -131,13 +131,13 @@ Public Class ClsSisNotificaciones
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
CveConexion = 0
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If

View File

@@ -105,7 +105,7 @@ Public Class ClsSisParametros
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -121,13 +121,13 @@ Public Class ClsSisParametros
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
CveConexion = 0
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If

View File

@@ -97,7 +97,7 @@ Public Class ClsSisProcesos
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -113,13 +113,13 @@ Public Class ClsSisProcesos
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
CveConexion = 0
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If

View File

@@ -75,7 +75,7 @@ Public Class ClsSisRoles
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -91,13 +91,13 @@ Public Class ClsSisRoles
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
CveConexion = 0
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If

View File

@@ -103,7 +103,7 @@ Public Class ClsSisUsuarios
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -119,13 +119,13 @@ Public Class ClsSisUsuarios
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
CveConexion = 0
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If

View File

@@ -16,6 +16,8 @@ Public Class ClsStiReports
Private SqlTransacc As SqlTransaction Private SqlTransacc As SqlTransaction
Private Data As DataTable Private Data As DataTable
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
'PARA REGISTRAR CONEXION
Private CveConexion As Integer = 0
#End Region #End Region
#Region "Propiedades" #Region "Propiedades"
@@ -48,7 +50,7 @@ Public Class ClsStiReports
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex) OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
End Try End Try
ConexionAdd()
End Sub End Sub
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure) Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
@@ -60,7 +62,44 @@ Public Class ClsStiReports
'SqlAdapter.SelectCommand.CommandTimeout = 800 'SqlAdapter.SelectCommand.CommandTimeout = 800
Data = New DataTable Data = New DataTable
End Sub End Sub
#Region "Conexiones"
Private Sub ConexionAdd()
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
Try
'DataAdapter(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 = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With
SqlAdapter.Fill(Data)
CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero
Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
End If
End Sub
Private Sub ConexionClose()
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
Try
SqlAdapter.Fill(Data)
Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
CveConexion = 0
End If
End Sub
#End Region
' IDisposable ' IDisposable
Protected Overridable Sub Dispose(ByVal disposing As Boolean) Protected Overridable Sub Dispose(ByVal disposing As Boolean)
@@ -84,6 +123,7 @@ Public Class ClsStiReports
' Visual Basic agregó este código para implementar correctamente el modelo descartable. ' Visual Basic agregó este código para implementar correctamente el modelo descartable.
Public Sub Dispose() Implements IDisposable.Dispose Public Sub Dispose() Implements IDisposable.Dispose
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean). ' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
ConexionClose()
Dispose(True) Dispose(True)
GC.SuppressFinalize(Me) GC.SuppressFinalize(Me)
End Sub End Sub

View File

@@ -17,6 +17,8 @@ Public Class ClsSubProyectos
Private Data As DataTable Private Data As DataTable
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
'PARA REGISTRAR CONEXION
Private CveConexion As Integer = 0
#End Region #End Region
#Region "Propiedades" #Region "Propiedades"
@@ -46,7 +48,7 @@ Public Class ClsSubProyectos
End If End If
SqlAdapter = New SqlDataAdapter("", SqlConexion) SqlAdapter = New SqlDataAdapter("", SqlConexion)
ConexionAdd()
End Sub End Sub
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure) Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
With SqlAdapter.SelectCommand With SqlAdapter.SelectCommand
@@ -57,6 +59,43 @@ Public Class ClsSubProyectos
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
Data = New DataTable Data = New DataTable
End Sub End Sub
#Region "Conexiones"
Private Sub ConexionAdd()
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
Try
'DataAdapter(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 = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With
SqlAdapter.Fill(Data)
CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero
Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
End If
End Sub
Private Sub ConexionClose()
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
Try
SqlAdapter.Fill(Data)
Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
CveConexion = 0
End If
End Sub
#End Region
Public Function IniciaTransacSQL() As SqlTransaction Public Function IniciaTransacSQL() As SqlTransaction
If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction() If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction()
@@ -405,6 +444,7 @@ Public Class ClsSubProyectos
' Visual Basic agregó este código para implementar correctamente el modelo descartable. ' Visual Basic agregó este código para implementar correctamente el modelo descartable.
Public Sub Dispose() Implements IDisposable.Dispose Public Sub Dispose() Implements IDisposable.Dispose
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean). ' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
ConexionClose()
Dispose(True) Dispose(True)
GC.SuppressFinalize(Me) GC.SuppressFinalize(Me)
End Sub End Sub

View File

@@ -31,6 +31,8 @@ Public Class ClsSucursales
Private _Estado As String Private _Estado As String
Private _Pais As String Private _Pais As String
Private _CP As Integer Private _CP As Integer
'PARA REGISTRAR CONEXION
Private CveConexion As Integer = 0
#End Region #End Region
#Region "Propiedades" #Region "Propiedades"
@@ -112,7 +114,7 @@ Public Class ClsSucursales
SqlCommand = New SqlCommand("", SqlConexion) SqlCommand = New SqlCommand("", SqlConexion)
SqlAdapter = New SqlDataAdapter("", SqlConexion) SqlAdapter = New SqlDataAdapter("", SqlConexion)
ConexionAdd()
End Sub End Sub
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure) Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
With SqlAdapter.SelectCommand With SqlAdapter.SelectCommand
@@ -123,6 +125,44 @@ Public Class ClsSucursales
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
Data = New DataTable Data = New DataTable
End Sub End Sub
#Region "Conexiones"
Private Sub ConexionAdd()
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
Try
'DataAdapter(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 = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With
SqlAdapter.Fill(Data)
CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero
Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
End If
End Sub
Private Sub ConexionClose()
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
Try
SqlAdapter.Fill(Data)
Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
CveConexion = 0
End If
End Sub
#End Region
Private Sub DataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure) Private Sub DataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
With SqlCommand With SqlCommand
.Parameters.Clear() .Parameters.Clear()
@@ -334,6 +374,7 @@ Public Class ClsSucursales
' This code added by Visual Basic to correctly implement the disposable pattern. ' This code added by Visual Basic to correctly implement the disposable pattern.
Public Sub Dispose() Implements IDisposable.Dispose Public Sub Dispose() Implements IDisposable.Dispose
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above. ' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
ConexionClose()
Dispose(True) Dispose(True)
GC.SuppressFinalize(Me) GC.SuppressFinalize(Me)
End Sub End Sub

View File

@@ -28,6 +28,8 @@ Public Class ClsTemporal
'Atributos de la clase 'Atributos de la clase
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
'PARA REGISTRAR CONEXION
Private CveConexion As Integer = 0
#End Region #End Region
@@ -49,7 +51,7 @@ Public Class ClsTemporal
SqlCommand = New SqlCommand("", SqlConexion) SqlCommand = New SqlCommand("", SqlConexion)
SqlAdapter = New SqlDataAdapter("", SqlConexion) SqlAdapter = New SqlDataAdapter("", SqlConexion)
ConexionAdd()
End Sub End Sub
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure) Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
@@ -61,7 +63,44 @@ Public Class ClsTemporal
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
Data = New DataTable Data = New DataTable
End Sub End Sub
#Region "Conexiones"
Private Sub ConexionAdd()
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
Try
'DataAdapter(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 = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With
SqlAdapter.Fill(Data)
CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero
Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
End If
End Sub
Private Sub ConexionClose()
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
Try
SqlAdapter.Fill(Data)
Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
CveConexion = 0
End If
End Sub
#End Region
Private Sub DataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure) Private Sub DataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
With SqlCommand With SqlCommand
.Parameters.Clear() .Parameters.Clear()
@@ -276,6 +315,7 @@ Public Class ClsTemporal
' This code added by Visual Basic to correctly implement the disposable pattern. ' This code added by Visual Basic to correctly implement the disposable pattern.
Public Sub Dispose() Implements IDisposable.Dispose Public Sub Dispose() Implements IDisposable.Dispose
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above. ' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
ConexionClose()
Dispose(True) Dispose(True)
GC.SuppressFinalize(Me) GC.SuppressFinalize(Me)
End Sub End Sub

View File

@@ -21,6 +21,8 @@ Public Class ClsTiposEventos
'Atributos de la clase 'Atributos de la clase
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
'PARA REGISTRAR CONEXION
Private CveConexion As Integer = 0
#End Region #End Region
@@ -43,7 +45,7 @@ Public Class ClsTiposEventos
Catch ex As Exception Catch ex As Exception
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
ConexionAdd()
End Sub End Sub
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure) Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
@@ -54,7 +56,44 @@ Public Class ClsTiposEventos
End With End With
Data = New DataTable Data = New DataTable
End Sub End Sub
#Region "Conexiones"
Private Sub ConexionAdd()
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
Try
'DataAdapter(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 = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With
SqlAdapter.Fill(Data)
CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero
Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
End If
End Sub
Private Sub ConexionClose()
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
Try
SqlAdapter.Fill(Data)
Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
CveConexion = 0
End If
End Sub
#End Region
Public Function GetTiposEventos() As Boolean Public Function GetTiposEventos() As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
Data = New DataTable Data = New DataTable
@@ -169,6 +208,7 @@ Public Class ClsTiposEventos
' This code added by Visual Basic to correctly implement the disposable pattern. ' This code added by Visual Basic to correctly implement the disposable pattern.
Public Sub Dispose() Implements IDisposable.Dispose Public Sub Dispose() Implements IDisposable.Dispose
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above. ' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
ConexionClose()
Dispose(True) Dispose(True)
GC.SuppressFinalize(Me) GC.SuppressFinalize(Me)
End Sub End Sub

View File

@@ -17,6 +17,8 @@ Public Class ClsUnidadesMedida
Private SqlTransacc As SqlTransaction Private SqlTransacc As SqlTransaction
Private Data As DataTable Private Data As DataTable
Private disposedValue As Boolean = False Private disposedValue As Boolean = False
'PARA REGISTRAR CONEXION
Private CveConexion As Integer = 0
#End Region #End Region
#Region "Propiedades" #Region "Propiedades"
@@ -40,7 +42,7 @@ Public Class ClsUnidadesMedida
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex) OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
End Try End Try
ConexionAdd()
End Sub End Sub
Public Function IniciaTransacSQL() As SqlTransaction Public Function IniciaTransacSQL() As SqlTransaction
@@ -70,7 +72,7 @@ Public Class ClsUnidadesMedida
End If End If
SqlAdapter = New SqlDataAdapter("", SqlConexion) SqlAdapter = New SqlDataAdapter("", SqlConexion)
ConexionAdd()
End Sub End Sub
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure) Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
With SqlAdapter.SelectCommand With SqlAdapter.SelectCommand
@@ -81,7 +83,44 @@ Public Class ClsUnidadesMedida
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
Data = New DataTable Data = New DataTable
End Sub End Sub
#Region "Conexiones"
Private Sub ConexionAdd()
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
Try
'DataAdapter(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 = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With
SqlAdapter.Fill(Data)
CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero
Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
End If
End Sub
Private Sub ConexionClose()
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
Try
SqlAdapter.Fill(Data)
Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
CveConexion = 0
End If
End Sub
#End Region
@@ -288,6 +327,7 @@ Public Class ClsUnidadesMedida
' This code added by Visual Basic to correctly implement the disposable pattern. ' This code added by Visual Basic to correctly implement the disposable pattern.
Public Sub Dispose() Implements IDisposable.Dispose Public Sub Dispose() Implements IDisposable.Dispose
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above. ' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
ConexionClose()
Dispose(True) Dispose(True)
GC.SuppressFinalize(Me) GC.SuppressFinalize(Me)
End Sub End Sub

View File

@@ -112,7 +112,7 @@ Public Class ClsVentas
DataAdapter("PA_Sis_RegistrarConexion") DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -135,7 +135,7 @@ Public Class ClsVentas
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
CveConexion = 0
End If End If
End Sub End Sub

View File

@@ -20,6 +20,8 @@ Public Class ClsVtaPromociones
'Atributos de la clase 'Atributos de la clase
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
'Cve de la conexion registrada
Private CveConexion As Integer = 0
#End Region #End Region
#Region "Propiedades" #Region "Propiedades"
@@ -35,14 +37,58 @@ Public Class ClsVtaPromociones
Sub New() Sub New()
SqlConexion = New SqlConnection SqlConexion = New SqlConnection
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
SqlAdapter = New SqlDataAdapter("", SqlConexion)
Try Try
SqlConexion.Open() SqlConexion.Open()
Catch ex As Exception Catch ex As Exception
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try End Try
ConexionAdd()
End Sub
#Region "Conexiones"
Private Sub ConexionAdd()
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
Try
DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With
SqlAdapter.Fill(Data)
CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero
Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
End If
End Sub End Sub
Private Sub ConexionClose()
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
Try
SqlAdapter.Fill(Data)
Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
CveConexion = 0
End If
End Sub
Private Sub DataAdapter(ByVal pStrSQL As String, Optional ByVal 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 GetVta_Promociones(Fecha As String, CveSucursal As Integer, CveEmpresa As Integer) As Boolean Public Function GetVta_Promociones(Fecha As String, CveSucursal As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
Data = New DataTable Data = New DataTable
@@ -116,6 +162,7 @@ Public Class ClsVtaPromociones
' This code added by Visual Basic to correctly implement the disposable pattern. ' This code added by Visual Basic to correctly implement the disposable pattern.
Public Sub Dispose() Implements IDisposable.Dispose Public Sub Dispose() Implements IDisposable.Dispose
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above. ' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
ConexionClose()
Dispose(True) Dispose(True)
GC.SuppressFinalize(Me) GC.SuppressFinalize(Me)
End Sub End Sub

View File

@@ -12,11 +12,13 @@ Public Class ClsVtaVendedores
Private SqlTransacc As SqlTransaction Private SqlTransacc As SqlTransaction
Private SqlCommand As SqlCommand Private SqlCommand As SqlCommand
Private Data As DataTable Private Data As DataTable
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
'PARA REGISTRAR CONEXION
Private CveConexion As Integer = 0
#End Region #End Region
#Region "Propiedades" #Region "Propiedades"
Public ReadOnly Property DtResultados() As DataTable Public ReadOnly Property DtResultados() As DataTable
Get Get
DtResultados = Data DtResultados = Data
End Get End Get
@@ -33,7 +35,7 @@ Public Class ClsVtaVendedores
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex) OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
End Try End Try
ConexionAdd()
End Sub End Sub
Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing) Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing)
@@ -53,7 +55,7 @@ Public Class ClsVtaVendedores
SqlCommand = New SqlCommand("", SqlConexion) SqlCommand = New SqlCommand("", SqlConexion)
SqlAdapter = New SqlDataAdapter("", SqlConexion) SqlAdapter = New SqlDataAdapter("", SqlConexion)
ConexionAdd()
End Sub End Sub
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure) Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
With SqlAdapter.SelectCommand With SqlAdapter.SelectCommand
@@ -65,6 +67,42 @@ Public Class ClsVtaVendedores
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
Data = New DataTable Data = New DataTable
End Sub End Sub
#Region "Conexiones"
Private Sub ConexionAdd()
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
Try
DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With
SqlAdapter.Fill(Data)
CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero
Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
End If
End Sub
Private Sub ConexionClose()
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
Try
SqlAdapter.Fill(Data)
Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
CveConexion = 0
End If
End Sub
#End Region
Private Sub DataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure) Private Sub DataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
With SqlCommand With SqlCommand
.Parameters.Clear() .Parameters.Clear()
@@ -242,8 +280,9 @@ Public Class ClsVtaVendedores
#Region " IDisposable Support " #Region " IDisposable Support "
' Visual Basic agregó este código para implementar correctamente el modelo descartable. ' Visual Basic agregó este código para implementar correctamente el modelo descartable.
Public Sub Dispose() Implements IDisposable.Dispose Public Sub Dispose() Implements IDisposable.Dispose
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean). ' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
Dispose(True) ConexionClose()
Dispose(True)
GC.SuppressFinalize(Me) GC.SuppressFinalize(Me)
End Sub End Sub
#End Region #End Region

View File

@@ -447,18 +447,7 @@ Namespace Modelos
Private Sub IniciaValoresVentas() Private Sub IniciaValoresVentas()
If CveVenta > 0 AndAlso CveEmpresa > 0 Then If CveVenta > 0 AndAlso CveEmpresa > 0 Then
Me.DtAnticipos = New DataTable() Me.DtAnticipos = New DataTable()
Dim ObjVentas As New ClsVentas Me.DtAntNCVinculadas = New DataTable()
'CARGA PROMOCIONES
If ObjVentas.GetPromocionesPS(-1, Me.Fecha, Me.CveSubProyecto, CveCliente, Me.CveVendedor, Me.CveEmpresa) Then
Me.DtPromociones = ObjVentas.DtResultados.Copy()
End If
'CARGA FIRMAS
If ObjVentas.GetVentasFirmas(CveVenta) Then
If ObjVentas.DtResultados.Rows.Count > 0 Then
DtFirmas = ObjVentas.DtResultados.Copy()
End If
End If
ObjVentas.Dispose()
Me.DtPagos = New DataTable() Me.DtPagos = New DataTable()
Me.DtRemisiones = New DataTable() Me.DtRemisiones = New DataTable()
Me.DtInventario = New DataTable() Me.DtInventario = New DataTable()
@@ -473,7 +462,48 @@ Namespace Modelos
Me.DtImpuestosLocales = New DataTable() Me.DtImpuestosLocales = New DataTable()
Me.DtOtrosConceptos = New DataTable() Me.DtOtrosConceptos = New DataTable()
Me.CveContratoSecciones = "" Me.CveContratoSecciones = ""
'Me.DtInventario = DtDetalle.FiltraParametros("CveTipoPS = 2")
Dim ObjVentas As New ClsVentas
'CARGA PROMOCIONES
If ObjVentas.GetPromocionesPS(-1, Me.Fecha, Me.CveSubProyecto, CveCliente, Me.CveVendedor, Me.CveEmpresa) Then
Me.DtPromociones = ObjVentas.DtResultados.Copy()
End If
'CARGA FIRMAS
If ObjVentas.GetVentasFirmas(CveVenta) Then
If ObjVentas.DtResultados.Rows.Count > 0 Then
Me.DtFirmas = ObjVentas.DtResultados.Copy()
End If
End If
'CARGA ANTICIPOS
If Not (CveRemision > 0 Or CveCotizacion > 0) Then
If TipoDocto.Contiene("Ing", "Ant", "Rem") Then
'carga as notas de credito vinculadas
If ObjVentas.GetVentasAntNC(CveVenta, -1) Then
Me.DtAntNCVinculadas = ObjVentas.DtResultados.Copy()
End If
End If
If TipoDocto.Contiene("Egs", "Dev", "Ant") Then
If ObjVentas.GetVentasAntNC(-1, CveVenta) Then
Me.DtNCVinculadas = ObjVentas.DtResultados.Copy()
End If
End If
End If
If ObjVentas.GetVentaOtrosConceptos(UsuarioActual.CveEmpresa, CveVenta) Then
Me.DtOtrosConceptos = ObjVentas.DtResultados.Copy()
End If
ObjVentas.Dispose()
'Dim ObjMovtos As New ClsMovimientos()
'If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente, CveMoneda) Then
' Me.DtAnticipos = ObjMovtos.DtResultados.FiltraParametros($"Saldo > 0 AND SaldoSubtotal > 0 {If(CveVenta < 0, "AND Tipo = 'Ant'", "")} {If(TipoDocto = "Ant", "AND Tipo = 'NC'", "")}")
'End If
'ObjMovtos.Dispose()
If Me.RealizarDevolucionAlmacen Then If Me.RealizarDevolucionAlmacen Then
Me.CveAlmacenDevolucion = Me.CveAlmacenDevolucionVenta Me.CveAlmacenDevolucion = Me.CveAlmacenDevolucionVenta
@@ -1873,34 +1903,36 @@ Namespace Modelos
Select Case ConceptoContable Select Case ConceptoContable
Case 1 'Cliente Case 1 'Cliente
If Not ObjFactura.TipoDocto.Contiene("Egs", "Rem", "RNC") Then If Not ObjFactura.TipoDocto.Contiene("Egs", "Rem", "RNC") Then
importeMovimiento = ((ObjFactura.Total - ObjFactura.TotalOtrosConceptos) * ValorMultiplicador) importeMovimiento = (ObjFactura.Total - TotalOtrosConceptos) * ValorMultiplicador
importeMX = (importeMovimiento * tipoCambio * Multiplicador) importeMX = importeMovimiento * tipoCambio * Multiplicador
FechaMovimiento = ObjFactura.FechaPago FechaMovimiento = ObjFactura.FechaPago
CveSubProyectoContabilizar = CveSubProyectoVenta CveSubProyectoContabilizar = CveSubProyectoVenta
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" 'If ObjFactura.TipoDocto.Contiene("Ant") Then
' TipoMovimiento = Not TipoMovimiento 'lo contrario a ingreso, en este caso es anticipo
If tipoCambio = 1 Then 'End If
IdCtaContable = ObjFactura.Cliente.IdCtaContClientes If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
CveCuenta = ObjFactura.Cliente.CveCuentaClientes
Else If tipoCambio = 1 Then
IdCtaContable = ObjFactura.Cliente.IdCtaContComplementaria IdCtaContable = ObjFactura.Cliente.IdCtaContClientes
CveCuenta = ObjFactura.Cliente.CveCuentaComplementaria CveCuenta = ObjFactura.Cliente.CveCuentaClientes
If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsuarioActual.CveEmpresa = 119) Then Else
importeMX = importeMovimiento IdCtaContable = ObjFactura.Cliente.IdCtaContComplementaria
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, 0, Referencia, 203, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCuenta = 0
CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento),
TipoCambio:=tipoCambio, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsaComplementariaClientes) Then
ErrorPrepoliza = True importeMX = importeMovimiento
End If If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, 0, Referencia, 203, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=Math.Round(importeMovimiento * tipoCambio - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then
End If ErrorPrepoliza = True
End If
IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera End If
CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera
End If IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera
IdCtaContableCliente = IdCtaContable CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera
CveCuentaCliente = CveCuenta End If
IdCtaContableCliente = IdCtaContable
CveCuentaCliente = CveCuenta
End If End If
Case 3 'Cliente Case 3 'Cliente
@@ -1948,79 +1980,80 @@ Namespace Modelos
End If End If
Case 277 'Remisión del cliente Case 277 'Remisión del cliente
If ObjFactura.TipoDocto = "RNC" Then If ObjFactura.TipoDocto = "RNC" Then
importeMovimiento = ((ObjFactura.Total - TotalOtrosConceptos) * ValorMultiplicador) importeMovimiento = (ObjFactura.Total - TotalOtrosConceptos) * ValorMultiplicador
importeMX = importeMovimiento * tipoCambio * Multiplicador importeMX = importeMovimiento * tipoCambio * Multiplicador
FechaMovimiento = ObjFactura.FechaPago FechaMovimiento = ObjFactura.FechaPago
CveSubProyectoContabilizar = CveSubProyectoVenta CveSubProyectoContabilizar = CveSubProyectoVenta
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
If tipoCambio = 1 Then If tipoCambio = 1 Then
IdCtaContable = ObjFactura.Cliente.IdCtaContClientes IdCtaContable = ObjFactura.Cliente.IdCtaContClientes
CveCuenta = ObjFactura.Cliente.CveCuentaClientes CveCuenta = ObjFactura.Cliente.CveCuentaClientes
Else Else
IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera
CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera
End If End If
IdCtaContableCliente = IdCtaContable IdCtaContableCliente = IdCtaContable
CveCuentaCliente = CveCuenta CveCuentaCliente = CveCuenta
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 278, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 278, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
ErrorPrepoliza = True ErrorPrepoliza = True
End If End If
Else Else
ErrorPrepoliza = True ErrorPrepoliza = True
End If End If
importeMovimiento = 0 importeMovimiento = 0
ObjFactura.SeGuardoPrePoliza = True ObjFactura.SeGuardoPrePoliza = True
End If End If
Case 12 'Nota de Credito Case 12 'Nota de Credito
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
importeMovimiento = (ObjFactura.Total * ValorMultiplicador) importeMovimiento = ObjFactura.Total * ValorMultiplicador
importeMX = (importeMovimiento * tipoCambio * Multiplicador).RoundSQL importeMX = (importeMovimiento * tipoCambio * Multiplicador).RoundSQL
FechaMovimiento = ObjFactura.FechaPago FechaMovimiento = ObjFactura.FechaPago
Dim ImporteConcepto12 As Decimal = 0 Dim ImporteConcepto12 As Decimal = 0
Dim ImporteAcumulado91 As Decimal = 0 Dim ImporteAcumulado91 As Decimal = 0
Dim CveUltimaVenta As Integer = 0 Dim CveUltimaVenta As Integer = 0
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
If tipoCambio = 1 Then If tipoCambio = 1 Then
IdCtaContable = ObjFactura.Cliente.IdCtaContClientes IdCtaContable = ObjFactura.Cliente.IdCtaContClientes
CveCuenta = ObjFactura.Cliente.CveCuentaClientes CveCuenta = ObjFactura.Cliente.CveCuentaClientes
Else ElseIf UsaComplementariaClientes Then
IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera
CveCuenta = 0 IdCtaContable = ObjFactura.Cliente.IdCtaContComplementaria
CveCuenta = 0
If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsaComplementariaClientes) Then
importeMX = importeMovimiento If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsaComplementariaClientes) Then
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, 0, Referencia, 203, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then importeMX = importeMovimiento
ErrorPrepoliza = True If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, 0, Referencia, 203, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=Math.Round(importeMovimiento * tipoCambio - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then
End If ErrorPrepoliza = True
End If End If
End If
IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera
CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera
End If CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera
CveSubProyectoContabilizar = CveSubProyectoVenta End If
ImporteConcepto12 = importeMX.RoundSQL CveSubProyectoContabilizar = CveSubProyectoVenta
If importeMovimiento <> 0 Then ImporteConcepto12 = importeMX.RoundSQL
If IdCtaContable <= 0 Then If importeMovimiento <> 0 Then
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) If IdCtaContable <= 0 Then
idCuentaContabilizacion = 0 CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
End If idCuentaContabilizacion = 0
If CveCuenta <= 0 Then End If
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) If CveCuenta <= 0 Then
CveCuentaContabilizacion = 0 CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
End If CveCuentaContabilizacion = 0
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then End If
ErrorPrepoliza = True If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then
Else ErrorPrepoliza = True
ObjFactura.SeGuardoPrePoliza = True Else
End If ObjFactura.SeGuardoPrePoliza = True
End If End If
End If
importeMovimiento = 0 importeMovimiento = 0
If ValorMultiplicador = 1 Then If ValorMultiplicador = 1 Then
@@ -2155,30 +2188,74 @@ Namespace Modelos
End If End If
'APLICA DEVOLUCION SALDOS DIRECTOS 'APLICA DEVOLUCION SALDOS DIRECTOS
If AplicaDevolucion Then If ObjFactura.AplicaDevolucion Then
Dim TipoCambioFactura = ObjFactura.TipoCambio
Dim importeMovimientoDev = ObjFactura.Total Dim importeMovimientoDev = ObjFactura.Total
importeMovimientoDev = If(ObjFactura.SaldoVentaDevolucion < importeMovimientoDev, ObjFactura.SaldoVentaDevolucion, importeMovimientoDev) importeMovimientoDev = If(ObjFactura.SaldoVentaDevolucion < importeMovimientoDev, ObjFactura.SaldoVentaDevolucion, importeMovimientoDev)
If importeMovimientoDev > 0 Then If importeMovimientoDev > 0 Then
Dim importeMXDev = importeMovimientoDev * tipoCambio * Multiplicador Dim importeMXDev = importeMovimientoDev * tipoCambio * Multiplicador
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimientoDev.FormatoNumero(2)}" If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimientoDev.FormatoNumero(2)}"
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, importeMovimientoDev, Referencia, 251, Concepto, If UsaComplementariaClientes AndAlso tipoCambio > 1 Then
FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVentaDevolucion, importeMXDev = importeMovimientoDev
CveCliente:=ObjFactura.CveCliente, ImporteMX:=importeMXDev, Dim ImporteComplementaria As Decimal = ((importeMovimientoDev * tipoCambio) - importeMovimientoDev).RoundSQL
ImporteME:=If(tipoCambio = 1, 0, importeMovimientoDev), If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, importeMovimientoDev, Referencia, 203, Concepto, FechaMovimiento, IdCtaContableClienteComplementaria, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=CveVentaDevolucion, ImporteMX:=ImporteComplementaria, ImporteME:=If(tipoCambio = 1, 0, importeMovimientoDev), CveSubProyecto:=CveSubProyectoContabilizar, TipoCambio:=tipoCambio, TipoCambioPago:=TipoCambioFactura) Then
CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, importeMovimientoDev, Referencia, 91, Concepto, Exit For
FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, End If
CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=CveVentaDevolucion, End If
ImporteMX:=importeMXDev, ImporteME:=If(tipoCambio = 1, 0, importeMovimientoDev),
CveSubProyecto:=CveSubProyectoContabilizar) Then
ErrorPrepoliza = True If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, importeMovimientoDev, Referencia, 91, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=CveVentaDevolucion, ImporteMX:=importeMXDev, ImporteME:=If(tipoCambio = 1, 0, importeMovimientoDev), CveSubProyecto:=CveSubProyectoContabilizar) Then
Exit For ErrorPrepoliza = True
End If Exit For
Else End If
ErrorPrepoliza = True
Exit For If UsaComplementariaClientes AndAlso TipoCambioFactura > 1 Then
End If importeMXDev = importeMovimientoDev
Dim ImporteComplementaria As Decimal = ((importeMovimientoDev * TipoCambioFactura) - importeMovimientoDev).RoundSQL
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, importeMovimientoDev, Referencia, 207, Concepto, FechaMovimiento, IdCtaContableClienteComplementaria, -1, CveVenta:=CveVentaDevolucion, CveCliente:=ObjFactura.CveCliente, ImporteMX:=ImporteComplementaria, ImporteME:=If(TipoCambioFactura = 1, 0, importeMovimientoDev), CveSubProyecto:=CveSubProyectoContabilizar, CveVentaAmortizacion:=ObjFactura.CveVenta, TipoCambio:=TipoCambioFactura) Then
ErrorPrepoliza = True
Exit For
End If
End If
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, importeMovimientoDev, Referencia, 251, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVentaDevolucion, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=ObjFactura.CveVenta, ImporteMX:=importeMXDev, ImporteME:=If(tipoCambio = 1, 0, importeMovimientoDev), CveSubProyecto:=CveSubProyectoContabilizar) Then
ErrorPrepoliza = True
Exit For
End If
If tipoCambio <> TipoCambioFactura Then
Dim difFluctuacion As Decimal = tipoCambio - TipoCambioFactura
Dim CveConceptoFluctua As Integer = 64 '64.ganacia, 65.perdida
Dim TipoMovtoFluctua As Boolean = True
Dim IdCtaContableFluctua As Integer
If difFluctuacion < 0 Then
CveConceptoFluctua = 65
TipoMovtoFluctua = False
IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
Else
CveConceptoFluctua = 64
TipoMovtoFluctua = True
IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
End If
Dim ImporteFluctuacion As Decimal = Math.Abs((importeMovimientoDev * difFluctuacion).RoundSQL)
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovtoFluctua, ImporteFluctuacion, Referencia, CveConceptoFluctua, Concepto, FechaMovimiento, IdCtaContableFluctua, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=CveVentaDevolucion, ImporteMX:=ImporteFluctuacion, ImporteME:=ImporteFluctuacion, CveSubProyecto:=CveSubProyectoContabilizar, TipoCambio:=tipoCambio, TipoCambioPago:=TipoCambioFactura, CveCuenta:=CveCuenta) Then
ErrorPrepoliza = True
Exit For
End If
End If
If ObjConta.ValidacionPrePolizaCuadre(ObjFactura.CvePrePoliza, 5) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
'ErrorPrepoliza = True
GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
End If
End If
End If End If
End If End If
End If End If
@@ -2188,9 +2265,9 @@ Namespace Modelos
Case 136 'Otros Conceptos Dinamicos Case 136 'Otros Conceptos Dinamicos
If ObjFactura.DtOtrosConceptos IsNot Nothing Then If ObjFactura.DtOtrosConceptos IsNot Nothing Then
For Each row2 As DataRow In ObjFactura.DtOtrosConceptos.Rows For Each row2 As DataRow In ObjFactura.DtOtrosConceptos.Rows
If row2("CantidadConcepto").ToString().ToDecimal > 0 Then If row2("Importe").ToString().ToDecimal > 0 Then
importeMovimiento = (row2("CantidadConcepto").ToString().ToDecimal * ValorMultiplicador) importeMovimiento = (row2("Importe").ToString().ToDecimal * ValorMultiplicador)
CveSubProyectoContabilizar = CveSubProyectoVenta CveSubProyectoContabilizar = CveSubProyectoVenta
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
@@ -2221,6 +2298,29 @@ Namespace Modelos
'[IPP] SI ES REFACTURACION LOS ANTICIPOS NO LOS DEBE APLICAR EN EL INGRESO REFACTURADO (VIEJO) '[IPP] SI ES REFACTURACION LOS ANTICIPOS NO LOS DEBE APLICAR EN EL INGRESO REFACTURADO (VIEJO)
If NuevaFactura = 1 And ObjFactura.CveVenta = CveDevolucion Then If NuevaFactura = 1 And ObjFactura.CveVenta = CveDevolucion Then
Exit Select Exit Select
End If
If ObjFactura.TipoDocto = "Ing" AndAlso ValorMultiplicador = -1 Then
For Each row2 As DataRow In ObjFactura.DtAntNCVinculadas.Rows
If row2("CveConceptoContable").ToString().ToEntero = 11 Then
importeMovimiento = row2("Importe").ToString().ToDecimal * ValorMultiplicador '- ((row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal / row2.DataKey("TotalAnticipo").ToDecimal) * row2.DataKey("IVAAnticipo").ToDecimal)
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
IdCtaContable = ObjFactura.Cliente.IdCtaContAnticipos
CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos
CveSubProyectoContabilizar = CveSubProyectoVenta
If importeMovimiento <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=row2("CveVenta").ToString().ToEntero, CveVentaAmortizacion:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
Exit For
Else
ObjFactura.SeGuardoPrePoliza = True
End If
End If
End If
Next
End If End If
'cuando es anticipo 'cuando es anticipo
@@ -2231,7 +2331,7 @@ Namespace Modelos
ObjFactura.CveTipoAmortizacionAnticipo = 1 AndAlso ObjFactura.TipoDocto.Contiene("Ing") OrElse ObjFactura.CveTipoAmortizacionAnticipo = 1 AndAlso ObjFactura.TipoDocto.Contiene("Ing") OrElse
ObjFactura.CveTipoAmortizacionAnticipo = 3 Then ObjFactura.CveTipoAmortizacionAnticipo = 3 Then
For Each row2 As DataRow In DtAnticipos.Rows For Each row2 As DataRow In ObjFactura.DtAnticipos.Rows
If row2("CveConceptoContable").ToString().ToEntero = 3 Then If row2("CveConceptoContable").ToString().ToEntero = 3 Then
CveIEAnticipo = row2("CveIE").ToString.ToEntero CveIEAnticipo = row2("CveIE").ToString.ToEntero
importeMovimiento = row2("Importe").ToString().ToDecimal() '- ((row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal / row2.DataKey("TotalAnticipo").ToDecimal) * row2.DataKey("IVAAnticipo").ToDecimal) importeMovimiento = row2("Importe").ToString().ToDecimal() '- ((row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal / row2.DataKey("TotalAnticipo").ToDecimal) * row2.DataKey("IVAAnticipo").ToDecimal)
@@ -2336,7 +2436,7 @@ Namespace Modelos
End If End If
Else Else
If DtAnticipos IsNot Nothing Then If ObjFactura.DtAnticipos IsNot Nothing Then
For Each row2 As DataRow In ObjFactura.DtAnticipos.Rows For Each row2 As DataRow In ObjFactura.DtAnticipos.Rows
If row2("CveConceptoContable").ToString().ToEntero = 12 Then If row2("CveConceptoContable").ToString().ToEntero = 12 Then
@@ -2659,9 +2759,9 @@ Namespace Modelos
Case 30 'PAGO - BANCOS Case 30 'PAGO - BANCOS
If DtPagos IsNot Nothing AndAlso DtPagos.Rows.Count > 0 Then If ObjFactura.DtPagos IsNot Nothing AndAlso ObjFactura.DtPagos.Rows.Count > 0 Then
For Each DrPago As DataRow In DtPagos.Rows For Each DrPago As DataRow In ObjFactura.DtPagos.Rows
CveIEPago = -1 CveIEPago = -1
FolioIE = -1 FolioIE = -1
@@ -2837,29 +2937,29 @@ Namespace Modelos
End If End If
End If End If
Next Next
End If
If ObjConta.ValidacionPrePolizaCuadre(ObjFactura.CvePrePoliza, 2) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
If ObjConta.ValorPolizaDescuadre = 2 Then
ErrorPrepoliza = True
Alert(ObjConta.MensajePolizaDescuadre, TipoMensaje.MsgError)
GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
End If
End If
End If
'Simplificacion de PrePolizas
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
If Not ObjConta.PrePolizaSimplificacion(ObjFactura.CvePrePoliza, UsuarioActual.CveEmpresa) Then
Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
End If
End If End If
If ObjConta.ValidacionPrePolizaCuadre(ObjFactura.CvePrePoliza, 2) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
ErrorPrepoliza = True
GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
End If
End If
'ContPAQ El movimiento 1 es el de Venta
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso Not ErrorPrepoliza Then
If idCuentaContabilizacion > 0 Then
If ObjConta.ContabilizarPrePoliza(ObjFactura.CvePrePoliza, ObjFactura.CveUsuario, UsuarioActual.Empresa, ObjConta:=objContPaqi) Then
Else
'ErrorList.Add("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico")
'ErrorPrepoliza = True
End If
Else
ErrorList.Add(String.Format("Falta asignación de las siguientes cuentas contables: {0}", CuentasContablesInvalidas))
ErrorPrepoliza = True
End If
End If
Catch ex As Exception Catch ex As Exception
GuardaLog(ex.ToString()) GuardaLog(ex.ToString())
ErrorPrepoliza = True ErrorPrepoliza = True
@@ -4750,6 +4850,7 @@ Namespace Modelos
Public Property DtFirmas As Data.DataTable Public Property DtFirmas As Data.DataTable
Public Property DtDesgloseImpuestos As Data.DataTable Public Property DtDesgloseImpuestos As Data.DataTable
Public Property DtDocumentosRelacionados As Data.DataTable Public Property DtDocumentosRelacionados As Data.DataTable
Public Property DtAntNCVinculadas As Data.DataTable
Public Property DtNCVinculadas As Data.DataTable Public Property DtNCVinculadas As Data.DataTable
Public Property DtAnticipos As Data.DataTable Public Property DtAnticipos As Data.DataTable

View File

@@ -1226,7 +1226,6 @@ Partial Class Compras_Compras
ObjPersonal.Dispose() ObjPersonal.Dispose()
DdlPersonal.DataBind() DdlPersonal.DataBind()
DdlPersonalReembolso.DataBind() DdlPersonalReembolso.DataBind()
ObjPersonal.Dispose()
'Carga Proveedor 'Carga Proveedor

View File

@@ -132,7 +132,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
CancelacionFecha = xmlAcuse.SelectSingleNode("Acuse").Attributes["Fecha"].Value.ToDate(); CancelacionFecha = xmlAcuse.SelectSingleNode("Acuse").Attributes["Fecha"].Value.ToDate();
} }
// var FueCancelado = CancelarDocumento(CveVenta, CveEstatus, CveCliente, Folio, uuid, CancelacionAcuse, CancelacionFecha, TipoDocto, total.ToDouble(), UsuarioActual.Empresa.CvePAC).Mensaje; var FueCancelado = CancelarDocumento(CveVenta, CveEstatus, CveCliente, Folio, uuid, CancelacionAcuse, CancelacionFecha, TipoDocto, total.ToDouble(), UsuarioActual.Empresa.CvePAC).Mensaje;
sb.AppendFormat("{0} <br/>", FueCancelado); sb.AppendFormat("{0} <br/>", FueCancelado);
if (CveEstatus.Contiene(4, 5) && EsRefacturacion) if (CveEstatus.Contiene(4, 5) && EsRefacturacion)
@@ -170,188 +170,187 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
return sb.ToString(); return sb.ToString();
} }
private Modelos.Factura.MCancelacionVentaMensaje CancelarDocumento(int CveVenta, int CveEstatus, int CveCliente, string Folio, string FolioFiscal, string CancelacionAcuse, DateTime CancelacionFecha, string TipoComprobante, double Total, int CvePACCancelacion)
//private Modelos.Factura.MCancelacionVentaMensaje CancelarDocumento(int CveVenta, int CveEstatus, int CveCliente, string Folio, string FolioFiscal, string CancelacionAcuse, DateTime CancelacionFecha, string TipoComprobante, double Total, int CvePACCancelacion)
//{
// //var factura = new Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa);
// //var retorno = factura.EjecutarCancelacionPendiente(CveEstatus, CancelacionFecha, CancelacionAcuse);
// return retorno;
//}
private int GenerarPolizaAC(ClsContPAQi ObjAC, int CveVenta, string Folio, int CveCliente, string TipoComprobante, DateTime Fecha, bool CancelacionIngreso = false)
{ {
int CtaCliente = 0; var factura = new Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa);
int OrdenPago = 0; var retorno = factura.EjecutarCancelacionPendiente(CveEstatus, CancelacionFecha, CancelacionAcuse);
string NombreCliente = ""; return retorno;
var ObjClientes = new ClsClientes();
if (ObjClientes.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa))
{
CtaCliente = ObjClientes.IdCtaContClientes;
NombreCliente = ObjClientes.NombreComercial;
}
ObjClientes.Dispose();
var ObjVentas = new ClsVentas();
if (ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa))
{
if (ObjVentas.DtResultados.Rows.Count > 0)
{
OrdenPago = ObjVentas.DtResultados.Rows[0]["Num3"].ToEntero();
}
}
int Retorno = 0;
int IDPoliza = 0;
bool ErrorAC = false;
string Concepto = string.Format("GD {0}", NombreCliente);
int Paridad = 1;
bool TipoMovto = false;
if (CancelacionIngreso)
{
Concepto = string.Format("Cancelación GD {0}", NombreCliente);
Paridad = -1;
TipoMovto = true;
}
var TipoPoliza = TipoComprobante.Contiene("OP", "Com") ? 3 : 1;
DataRow dr = null;
int CtaISSSTESON = 643;
int CtaISPT = 1745;
var AC = new ClsAC();
//var ObjAC = new ClsContPAQi(UsuarioActual.Empresa);
//ObjAC.IniciaTransacSQL();
IDPoliza = ObjAC.AddPoliza(TipoPoliza, Concepto, 0, 0, UsuarioActual.CveUsuario, Fecha);
if (IDPoliza > 0)
{
if (TipoComprobante == "OP")
{
//Orden de PAGO
if (OrdenPago == 1)
{
//ISSSTESON
if (ObjAC.AddMovimiento(IDPoliza, CtaCliente, false, (Paridad * 0d), "", Concepto, 0, Fecha, ""))
{
if (!ObjAC.AddMovimiento(IDPoliza, CtaISSSTESON, true, (Paridad * 0d), "", Concepto, 0, Fecha, ""))
{
ErrorAC = true;
}
}
else
{
ErrorAC = true;
}
}
else
{
//ISPT
if (ObjAC.AddMovimiento(IDPoliza, CtaCliente, false, (Paridad * 0d), "", Concepto, 0, Fecha, ""))
{
if (!ObjAC.AddMovimiento(IDPoliza, CtaISPT, true, (Paridad * 0d), "", Concepto, 0, Fecha, ""))
{
ErrorAC = true;
}
}
else
{
ErrorAC = true;
}
}
}
else
{
//NORMAL
DataTable Detalles = null;
DataTable DTPresupuestoIngresos = null;
if (ObjVentas.GetVentaDetalle(CveVenta))
{
Detalles = ObjVentas.DtResultados.Copy();
}
if (AC.GetPresupuestoIngresos(-1, DateTime.Now.Year, true, UsuarioActual.CveEmpresa))
{
DTPresupuestoIngresos = AC.DtResultados.Copy();
}
if (Detalles != null && DTPresupuestoIngresos != null)
{
var query = from gvr in Detalles.AsEnumerable()
group gvr by gvr["CvePresupuestoIngreso"].ToString().ToEntero() into g
select new { TotalImporte = g.Sum((x) => x["Total"].ToString().ToDouble()), CvePresupuestoIngreso = g.Key };
foreach (var item in query)
{
dr = DTPresupuestoIngresos.FiltroPrimero(string.Format("CvePresupuestoIngreso = {0}", item.CvePresupuestoIngreso));
if (dr != null)
{
Concepto = string.Format("{0} - {1}: {2}", NombreCliente, TipoComprobante, Folio);
if (ObjAC.AddMovimiento(IDPoliza, dr["IdCuentaPorEjecutar"].ToString().ToEntero(), false, (Paridad * item.TotalImporte), "", Concepto, 0, Fecha, ""))
{
if (ObjAC.AddMovimiento(IDPoliza, dr["IdCuentaDevengado"].ToString().ToEntero(), true, (Paridad * item.TotalImporte), "", Concepto, 0, Fecha, ""))
{
// CARGO la deuda del cliente
if (ObjAC.AddMovimiento(IDPoliza, CtaCliente, TipoMovto, item.TotalImporte, "", Concepto, 0, Fecha, ""))
{
// abono,
if (!ObjAC.AddMovimiento(IDPoliza, dr["IdCuentaMatriz"].ToString().ToEntero(), !TipoMovto, item.TotalImporte, "", Concepto, 0, Fecha, ""))
{
ErrorAC = true;
break;
}
}
else
{
ErrorAC = true;
break;
}
}
else
{
ErrorAC = true;
break;
}
}
else
{
ErrorAC = true;
break;
}
}
else
{
ErrorAC = true;
break;
}
}
}
else
{
ErrorAC = true;
}
}
}
else
{
ErrorAC = true;
}
if (!ErrorAC)
{
ObjAC.AjustaPoliza(IDPoliza);
Retorno = IDPoliza;
}
else
{
Alert("Error al Agregar la Póliza de AC.", TipoMensaje.MsgError);
}
AC.Dispose();
ObjVentas.Dispose();
return Retorno;
} }
//private int GenerarPolizaAC(ClsContPAQi ObjAC, int CveVenta, string Folio, int CveCliente, string TipoComprobante, DateTime Fecha, bool CancelacionIngreso = false)
//{
// int CtaCliente = 0;
// int OrdenPago = 0;
// string NombreCliente = "";
// var ObjClientes = new ClsClientes();
// if (ObjClientes.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa))
// {
// CtaCliente = ObjClientes.IdCtaContClientes;
// NombreCliente = ObjClientes.NombreComercial;
// }
// ObjClientes.Dispose();
// var ObjVentas = new ClsVentas();
// if (ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa))
// {
// if (ObjVentas.DtResultados.Rows.Count > 0)
// {
// OrdenPago = ObjVentas.DtResultados.Rows[0]["Num3"].ToEntero();
// }
// }
// int Retorno = 0;
// int IDPoliza = 0;
// bool ErrorAC = false;
// string Concepto = string.Format("GD {0}", NombreCliente);
// int Paridad = 1;
// bool TipoMovto = false;
// if (CancelacionIngreso)
// {
// Concepto = string.Format("Cancelación GD {0}", NombreCliente);
// Paridad = -1;
// TipoMovto = true;
// }
// var TipoPoliza = TipoComprobante.Contiene("OP", "Com") ? 3 : 1;
// DataRow dr = null;
// int CtaISSSTESON = 643;
// int CtaISPT = 1745;
// var AC = new ClsAC();
// //var ObjAC = new ClsContPAQi(UsuarioActual.Empresa);
// //ObjAC.IniciaTransacSQL();
// IDPoliza = ObjAC.AddPoliza(TipoPoliza, Concepto, 0, 0, UsuarioActual.CveUsuario, Fecha);
// if (IDPoliza > 0)
// {
// if (TipoComprobante == "OP")
// {
// //Orden de PAGO
// if (OrdenPago == 1)
// {
// //ISSSTESON
// if (ObjAC.AddMovimiento(IDPoliza, CtaCliente, false, (Paridad * 0d), "", Concepto, 0, Fecha, ""))
// {
// if (!ObjAC.AddMovimiento(IDPoliza, CtaISSSTESON, true, (Paridad * 0d), "", Concepto, 0, Fecha, ""))
// {
// ErrorAC = true;
// }
// }
// else
// {
// ErrorAC = true;
// }
// }
// else
// {
// //ISPT
// if (ObjAC.AddMovimiento(IDPoliza, CtaCliente, false, (Paridad * 0d), "", Concepto, 0, Fecha, ""))
// {
// if (!ObjAC.AddMovimiento(IDPoliza, CtaISPT, true, (Paridad * 0d), "", Concepto, 0, Fecha, ""))
// {
// ErrorAC = true;
// }
// }
// else
// {
// ErrorAC = true;
// }
// }
// }
// else
// {
// //NORMAL
// DataTable Detalles = null;
// DataTable DTPresupuestoIngresos = null;
// if (ObjVentas.GetVentaDetalle(CveVenta))
// {
// Detalles = ObjVentas.DtResultados.Copy();
// }
// if (AC.GetPresupuestoIngresos(-1, DateTime.Now.Year, true, UsuarioActual.CveEmpresa))
// {
// DTPresupuestoIngresos = AC.DtResultados.Copy();
// }
// if (Detalles != null && DTPresupuestoIngresos != null)
// {
// var query = from gvr in Detalles.AsEnumerable()
// group gvr by gvr["CvePresupuestoIngreso"].ToString().ToEntero() into g
// select new { TotalImporte = g.Sum((x) => x["Total"].ToString().ToDouble()), CvePresupuestoIngreso = g.Key };
// foreach (var item in query)
// {
// dr = DTPresupuestoIngresos.FiltroPrimero(string.Format("CvePresupuestoIngreso = {0}", item.CvePresupuestoIngreso));
// if (dr != null)
// {
// Concepto = string.Format("{0} - {1}: {2}", NombreCliente, TipoComprobante, Folio);
// if (ObjAC.AddMovimiento(IDPoliza, dr["IdCuentaPorEjecutar"].ToString().ToEntero(), false, (Paridad * item.TotalImporte), "", Concepto, 0, Fecha, ""))
// {
// if (ObjAC.AddMovimiento(IDPoliza, dr["IdCuentaDevengado"].ToString().ToEntero(), true, (Paridad * item.TotalImporte), "", Concepto, 0, Fecha, ""))
// {
// // CARGO la deuda del cliente
// if (ObjAC.AddMovimiento(IDPoliza, CtaCliente, TipoMovto, item.TotalImporte, "", Concepto, 0, Fecha, ""))
// {
// // abono,
// if (!ObjAC.AddMovimiento(IDPoliza, dr["IdCuentaMatriz"].ToString().ToEntero(), !TipoMovto, item.TotalImporte, "", Concepto, 0, Fecha, ""))
// {
// ErrorAC = true;
// break;
// }
// }
// else
// {
// ErrorAC = true;
// break;
// }
// }
// else
// {
// ErrorAC = true;
// break;
// }
// }
// else
// {
// ErrorAC = true;
// break;
// }
// }
// else
// {
// ErrorAC = true;
// break;
// }
// }
// }
// else
// {
// ErrorAC = true;
// }
// }
// }
// else
// {
// ErrorAC = true;
// }
// if (!ErrorAC)
// {
// ObjAC.AjustaPoliza(IDPoliza);
// Retorno = IDPoliza;
// }
// else
// {
// Alert("Error al Agregar la Póliza de AC.", TipoMensaje.MsgError);
// }
// AC.Dispose();
// ObjVentas.Dispose();
// return Retorno;
//}
private string DecodeBase64(string strXMLCodificado) private string DecodeBase64(string strXMLCodificado)
{ {
try try