diff --git a/.gitignore b/.gitignore
index 7bbbff371..e887da8ff 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,23 @@
/Menu
/Web.config
/Log.txt
+/LogTimbrado.txt
+/LogMail.txt
+/Bin/Microsoft.ReportViewer.WebForms.dll.refresh
+/Bin/Microsoft.ReportViewer.WebForms.dll
+/Bin/Microsoft.ReportViewer.WebDesign.dll.refresh
+/Bin/Microsoft.ReportViewer.WebDesign.dll
+/Bin/Microsoft.ReportViewer.ProcessingObjectModel.dll.refresh
+/Bin/Microsoft.ReportViewer.ProcessingObjectModel.dll
+/Bin/Microsoft.ReportViewer.Design.dll.refresh
+/Bin/Microsoft.ReportViewer.Design.dll
+/Bin/Microsoft.ReportViewer.DataVisualization.dll.refresh
+/Bin/Microsoft.ReportViewer.DataVisualization.dll
+/Bin/Microsoft.ReportViewer.Common.dll.refresh
+/Bin/Microsoft.ReportViewer.Common.dll
+/.vs
+/Temp/637022536882545607-PLANTILLA CFE 2019 DISTRIBUCION.xlsx
+/Temp/637020871040720361-FormatoAlmacen (1).xlsx
+/Temp/637020865803848374-FormatoAlmacen (1).xlsx
+/Temp/637020863973072383-FormatoAlmacen (1).xlsx
+/Temp/637020854397859419-FormatoAlmacen (1).xlsx
diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index c74d9d6a6..9c625731f 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -75,6 +75,7 @@ Public Class ClsVentas
Public Sub RollBack()
SqlTransacc.Rollback()
End Sub
+ Private CveConexion As Integer = 0
Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing)
If TransaccionCompartida Is Nothing Then
@@ -82,6 +83,7 @@ Public Class ClsVentas
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
Try
SqlConexion.Open()
+ AddConexion()
Catch ex As Exception
OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
End Try
@@ -93,6 +95,8 @@ Public Class ClsVentas
SqlAdapter = New SqlDataAdapter("", SqlConexion)
End Sub
+
+
Private Sub DataAdapter(ByVal pStrSQL As String, Optional ByVal TipoComando As CommandType = CommandType.StoredProcedure)
With SqlAdapter.SelectCommand
.Parameters.Clear()
@@ -102,6 +106,48 @@ Public Class ClsVentas
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
Data = New DataTable
End Sub
+
+
+#Region "Conexiones"
+
+
+ Private Sub ConexionAdd()
+ If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
+
+ DataAdapter(String.Format("INSERT INTO Sis_Conexiones (Clase,Modulo) VALUES ('ClsVentas',{0})", HttpContext.Current.Request.Url.Authority), CommandType.Text) ' pendiente de terminar parra registrar el cveconexion, falta el rarámetro de módulo
+ With SqlAdapter.SelectCommand.Parameters
+
+ .Add("@CveConexion", SqlDbType.Int).Direction = ParameterDirection.Output
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ CveConexion = SqlAdapter.SelectCommand.Parameters("@Opcion").Value.ToString.ToEntero
+ Catch ex As Exception
+ OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ End If
+ End Sub
+
+ Private Sub ConexionClose()
+ If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
+
+ DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE WHERE CveConexion = ", CveConexion), CommandType.Text)
+
+ Try
+ SqlAdapter.Fill(Data)
+
+ Catch ex As Exception
+ OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ End If
+
+ End Sub
+
+#End Region
+
Public Function GetVenta(CveVenta As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_VentasGet")
@@ -3879,6 +3925,7 @@ Public Class ClsVentas
Protected Overridable Sub Dispose(disposing As Boolean)
If Not Me.disposedValue Then
If disposing Then
+ AddConexion()
' TODO: dispose managed state (managed objects).
If Not Data Is Nothing Then Data.Dispose()
If Not Dataset Is Nothing Then Dataset.Dispose()
diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb
index be7cc478a..f2a7e7405 100644
--- a/Inventarios/EntradasSalidas.aspx.vb
+++ b/Inventarios/EntradasSalidas.aspx.vb
@@ -1089,7 +1089,7 @@ Partial Class Inventarios_EntradasSalidas
If ObjConta IsNot Nothing Then ObjConta.RollBack()
Inv.RollBack()
- Alert("Ocurrió un error al eliminar el movimiento. Por favor vuelva a intetar.", TipoMensaje.MsgError)
+ Alert("Ocurrió un error al eliminar el movimiento. Por favor vuelva a intentar.", TipoMensaje.MsgError)
End If
CveMovimiento = 0
diff --git a/Ventas/ProductosServicios.aspx b/Ventas/ProductosServicios.aspx
index 29c2aca5d..06edab7a6 100644
--- a/Ventas/ProductosServicios.aspx
+++ b/Ventas/ProductosServicios.aspx
@@ -209,7 +209,15 @@