diff --git a/App_Code/CFDITimbre.vb b/App_Code/CFDITimbre.vb index ddd73483a..a5704429e 100644 --- a/App_Code/CFDITimbre.vb +++ b/App_Code/CFDITimbre.vb @@ -587,7 +587,7 @@ End Class Public Class CFDICartaPorteUbicaciones Public Property TipoEstacion As String = "" - Public Property DistanciaRecorrida As Double = 0 + Public Property DistanciaRecorrida As Decimal = 0 'Public Property Ubicacion As New CFDICartaPorteUbicacion Public Property Origen As New CFDICartaPorteUbicacionOrigen Public Property Destino As New CFDICartaPorteUbicacionDestino @@ -680,8 +680,8 @@ Public Class CFDICartaPorteMercancia Public Property MaterialPeligroso As String = "" Public Property Embalaje As String = "" Public Property DescripEmbalaje As String = "" - Public Property PesoenKg As Double - Public Property ValorMercancia As Double + Public Property PesoenKg As Decimal + Public Property ValorMercancia As Decimal Public Property Moneda As String = "" Public Property FraccionArrancelaria As String = "" Public Property UUIDComercioExt As String = "" diff --git a/App_Code/ClsAC.vb b/App_Code/ClsAC.vb index f3b7100ec..45e0a37f1 100644 --- a/App_Code/ClsAC.vb +++ b/App_Code/ClsAC.vb @@ -3245,11 +3245,13 @@ Public Class ClsAC Protected Overridable Sub Dispose(disposing As Boolean) If Not Me.disposedValue Then If disposing Then - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If End If Me.disposedValue = True diff --git a/App_Code/ClsAC2.vb b/App_Code/ClsAC2.vb index 2a51e1786..50fbb9284 100644 --- a/App_Code/ClsAC2.vb +++ b/App_Code/ClsAC2.vb @@ -152,11 +152,12 @@ Public Class ClsAC2 Protected Overridable Sub Dispose(disposing As Boolean) If Not Me.disposedValue Then If disposing Then - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If End If Me.disposedValue = True diff --git a/App_Code/ClsAF.vb b/App_Code/ClsAF.vb index cd7bbc863..1ddd0ed3a 100644 --- a/App_Code/ClsAF.vb +++ b/App_Code/ClsAF.vb @@ -4520,10 +4520,13 @@ Public Class ClsAF If Not disposedValue Then If disposing Then ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not DSet Is Nothing Then DSet.Dispose() : DSet = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If diff --git a/App_Code/ClsAIMMGM.vb b/App_Code/ClsAIMMGM.vb index b9268d0f6..58eb962a9 100644 --- a/App_Code/ClsAIMMGM.vb +++ b/App_Code/ClsAIMMGM.vb @@ -746,11 +746,12 @@ Public Class ClsAIMMGM If Not disposedValue Then If disposing Then ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb index 7f01aa20f..4f8badf3f 100644 --- a/App_Code/ClsAcumuladores.vb +++ b/App_Code/ClsAcumuladores.vb @@ -1232,12 +1232,14 @@ Public Class ClsAcumuladores ' IDisposable Protected Overridable Sub Dispose(ByVal disposing As Boolean) If Not disposedValue Then - If disposing Then - ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() + If disposing Then + + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not DSet Is Nothing Then DSet.Dispose() : DSet = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index 858a38c2f..72ba56b54 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -4273,12 +4273,14 @@ Public Class ClsBancos If Not Me.disposedValue Then If disposing Then ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() - If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() + + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. diff --git a/App_Code/ClsBase.vb b/App_Code/ClsBase.vb index 73949c0f0..77d090808 100644 --- a/App_Code/ClsBase.vb +++ b/App_Code/ClsBase.vb @@ -181,13 +181,12 @@ Public Class ClsBase If Not disposedValue Then If disposing Then ' TODO: Liberar otro estado (objetos administrados). - If Not SqlConexion Is Nothing Then - CerrarConexion() - SqlConexion.Dispose() - End If - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not sqlCommand Is Nothing Then sqlCommand.Dispose() : sqlCommand = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If diff --git a/App_Code/ClsCGame.vb b/App_Code/ClsCGame.vb index 50d497b46..dc66c337d 100644 --- a/App_Code/ClsCGame.vb +++ b/App_Code/ClsCGame.vb @@ -3400,11 +3400,14 @@ Public Class ClsCGame Protected Overridable Sub Dispose(disposing As Boolean) If Not Me.disposedValue Then If disposing Then - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If End If Me.disposedValue = True diff --git a/App_Code/ClsCRM.vb b/App_Code/ClsCRM.vb index 76da1aa43..334a04744 100644 --- a/App_Code/ClsCRM.vb +++ b/App_Code/ClsCRM.vb @@ -1137,11 +1137,15 @@ Public Class ClsCRM Protected Overridable Sub Dispose(disposing As Boolean) If Not Me.disposedValue Then If disposing Then - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not DSet Is Nothing Then DSet.Dispose() : DSet = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If End If Me.disposedValue = True diff --git a/App_Code/ClsClaseBase.vb b/App_Code/ClsClaseBase.vb index d5857b782..026d983d0 100644 --- a/App_Code/ClsClaseBase.vb +++ b/App_Code/ClsClaseBase.vb @@ -121,13 +121,13 @@ Public Class ClsClaseBase End If End Sub - Public Function runQuerystr(Query As String, Optional Listaparametros As List(Of parametroQuery) = Nothing, Optional msgError As String = "", Optional mostrarError As Boolean = True) As Boolean + Public Function runQuerystr(Query As String, Optional Listaparametros As List(Of parametroQuery) = Nothing, Optional msgError As String = "", Optional mostrarError As Boolean = True, Optional tipo As CommandType = CommandType.Text) As Boolean Dim retorno As Boolean = False Try If SqlConexion.State = ConnectionState.Open Then SqlAdapter.SelectCommand.Parameters.Clear() SqlAdapter.SelectCommand.CommandText = Query - SqlAdapter.SelectCommand.CommandType = CommandType.Text + SqlAdapter.SelectCommand.CommandType = tipo Data = New DataTable() If Not IsNothing(Listaparametros) Then For Each pr As parametroQuery In Listaparametros @@ -247,6 +247,7 @@ Public Class ClsClaseBase SqlConexion.Close() End Sub #End Region + Public Sub Dispose() Implements IDisposable.Dispose ConexionClose() If (SqlConexion IsNot Nothing) Then @@ -279,6 +280,9 @@ Public Class ClsClaseBase End Sub + + + End Class Public Class parametroQuery diff --git a/App_Code/ClsClasificaciones.vb b/App_Code/ClsClasificaciones.vb index a321f9f37..7c7e28372 100644 --- a/App_Code/ClsClasificaciones.vb +++ b/App_Code/ClsClasificaciones.vb @@ -610,13 +610,15 @@ Public Class ClsClasificaciones ' IDisposable Protected Overridable Sub Dispose(disposing As Boolean) If Not Me.disposedValue Then - If disposing Then - ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() - If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If disposing Then + ' TODO: dispose managed state (managed objects). + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index 5b4bd4c6b..364a870bc 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -1757,13 +1757,15 @@ Public Class ClsClientes ' IDisposable Protected Overridable Sub Dispose(disposing As Boolean) If Not Me.disposedValue Then - If disposing Then - ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() - If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If disposing Then + ' TODO: dispose managed state (managed objects). + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. diff --git a/App_Code/ClsCompEstatusFactura.vb b/App_Code/ClsCompEstatusFactura.vb index 816d07e87..7408fe201 100644 --- a/App_Code/ClsCompEstatusFactura.vb +++ b/App_Code/ClsCompEstatusFactura.vb @@ -203,11 +203,12 @@ Public Class ClsCompEstatusFactura If Not Me.disposedValue Then If disposing Then ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. diff --git a/App_Code/ClsCompProveedores.vb b/App_Code/ClsCompProveedores.vb index 4594ff303..8a062f23f 100644 --- a/App_Code/ClsCompProveedores.vb +++ b/App_Code/ClsCompProveedores.vb @@ -1908,11 +1908,13 @@ Public Class ClsCompProveedores If Not Me.disposedValue Then If disposing Then ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb index 8737fc436..4aa180e78 100644 --- a/App_Code/ClsCompras.vb +++ b/App_Code/ClsCompras.vb @@ -1884,11 +1884,12 @@ Public Class ClsCompras If Not Me.disposedValue Then If disposing Then ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. diff --git a/App_Code/ClsContPAQi.vb b/App_Code/ClsContPAQi.vb index bef333969..97ce501d7 100644 --- a/App_Code/ClsContPAQi.vb +++ b/App_Code/ClsContPAQi.vb @@ -11204,12 +11204,14 @@ Public Class ClsContPAQi If Not Me.disposedValue Then If disposing Then ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() - StrSQL.Clear() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not DSet Is Nothing Then DSet.Dispose() : DSet = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If ' TODO: Liberar su propio estado (objetos no administrados). diff --git a/App_Code/ClsContPAQi2.vb b/App_Code/ClsContPAQi2.vb index 34d41d4bd..0e1a8185a 100644 --- a/App_Code/ClsContPAQi2.vb +++ b/App_Code/ClsContPAQi2.vb @@ -1017,12 +1017,14 @@ Public Class ClsContPAQi2 If Not Me.disposedValue Then If disposing Then ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() - StrSQL.Clear() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + + End If ' TODO: Liberar su propio estado (objetos no administrados). diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 266a9a71c..728d1d200 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -6234,12 +6234,15 @@ Public Class ClsContabilidad Protected Overridable Sub Dispose(disposing As Boolean) If Not Me.disposedValue Then If disposing Then - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() - If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() + + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not DSet Is Nothing Then DSet.Dispose() : DSet = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If End If Me.disposedValue = True diff --git a/App_Code/ClsContratos.vb b/App_Code/ClsContratos.vb index 99671766b..54e7cf9ff 100644 --- a/App_Code/ClsContratos.vb +++ b/App_Code/ClsContratos.vb @@ -3596,12 +3596,14 @@ Public Class ClsContratos If Not disposedValue Then If disposing Then ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not Dataset Is Nothing Then Dataset.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not Dataset Is Nothing Then Dataset.Dispose() : Dataset = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + + End If ' TODO: Liberar su propio estado (objetos no administrados). diff --git a/App_Code/ClsDG.vb b/App_Code/ClsDG.vb index b4b540c45..1c44c0193 100644 --- a/App_Code/ClsDG.vb +++ b/App_Code/ClsDG.vb @@ -638,11 +638,14 @@ Public Class ClsDG Protected Overridable Sub Dispose(disposing As Boolean) If Not Me.disposedValue Then If disposing Then - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If End If Me.disposedValue = True diff --git a/App_Code/ClsDesarrollo.vb b/App_Code/ClsDesarrollo.vb index ea17e0339..c3694ced1 100644 --- a/App_Code/ClsDesarrollo.vb +++ b/App_Code/ClsDesarrollo.vb @@ -548,13 +548,14 @@ Public Class ClsDesarrollo If Not Me.disposedValue Then If disposing Then ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If + ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. ' TODO: set large fields to null. End If diff --git a/App_Code/ClsEdoc.vb b/App_Code/ClsEdoc.vb index 6731807ea..82e6cf1e7 100644 --- a/App_Code/ClsEdoc.vb +++ b/App_Code/ClsEdoc.vb @@ -306,10 +306,12 @@ Public Class ClsEdoc If Not disposedValue Then If disposing Then ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not DSet Is Nothing Then DSet.Dispose() : DSet = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If diff --git a/App_Code/ClsEdocumentacion.vb b/App_Code/ClsEdocumentacion.vb index dc764e2bb..dd22807c3 100644 --- a/App_Code/ClsEdocumentacion.vb +++ b/App_Code/ClsEdocumentacion.vb @@ -621,12 +621,14 @@ Public Class ClsEdocumentacion ' IDisposable Protected Overridable Sub Dispose(ByVal disposing As Boolean) If Not disposedValue Then - If disposing Then - ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() + If disposing Then + ' TODO: Liberar otro estado (objetos administrados). + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not DSet Is Nothing Then DSet.Dispose() : DSet = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If diff --git a/App_Code/ClsEdosFinancieros.vb b/App_Code/ClsEdosFinancieros.vb index 3f1aad05f..89b5ea2b1 100644 --- a/App_Code/ClsEdosFinancieros.vb +++ b/App_Code/ClsEdosFinancieros.vb @@ -881,13 +881,15 @@ Public Class ClsEdosFinancieros If disposing Then ' TODO: free other state (managed objects). 'RegistraCierreConexion() - SqlConexion.Close() - SqlConexion.Dispose() + If Not DT Is Nothing Then DT.Dispose() : DT = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If - If Not DT Is Nothing Then DT.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + ' TODO: free your own state (unmanaged objects). ' TODO: set large fields to null. diff --git a/App_Code/ClsEncuestas.vb b/App_Code/ClsEncuestas.vb index bafb08bd6..119c69534 100644 --- a/App_Code/ClsEncuestas.vb +++ b/App_Code/ClsEncuestas.vb @@ -701,11 +701,15 @@ Public Class ClsEncuestas Protected Overridable Sub Dispose(disposing As Boolean) If Not Me.disposedValue Then If disposing Then - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + + End If End If Me.disposedValue = True diff --git a/App_Code/ClsEsquemasComisiones.vb b/App_Code/ClsEsquemasComisiones.vb index 5528c2772..dc2e03932 100644 --- a/App_Code/ClsEsquemasComisiones.vb +++ b/App_Code/ClsEsquemasComisiones.vb @@ -499,12 +499,13 @@ Public Class ClsEsquemasComisiones If Not Me.disposedValue Then If disposing Then ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() - If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. diff --git a/App_Code/ClsEstatusFactura.vb b/App_Code/ClsEstatusFactura.vb index 893538e23..9cf75cf64 100644 --- a/App_Code/ClsEstatusFactura.vb +++ b/App_Code/ClsEstatusFactura.vb @@ -230,11 +230,12 @@ Public Class ClsEstatusFactura If Not Me.disposedValue Then If disposing Then ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. diff --git a/App_Code/ClsEventos.vb b/App_Code/ClsEventos.vb index c631009a2..e08351f16 100644 --- a/App_Code/ClsEventos.vb +++ b/App_Code/ClsEventos.vb @@ -224,11 +224,11 @@ Public Class ClsEventos If Not Me.disposedValue Then If disposing Then ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. diff --git a/App_Code/ClsFISConfiguracion.vb b/App_Code/ClsFISConfiguracion.vb index a1d8ddf32..52d7365c5 100644 --- a/App_Code/ClsFISConfiguracion.vb +++ b/App_Code/ClsFISConfiguracion.vb @@ -174,11 +174,12 @@ Public Class ClsFISConfiguracion If Not Me.disposedValue Then If disposing Then ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. diff --git a/App_Code/ClsFinanzas.vb b/App_Code/ClsFinanzas.vb index 3a032bc3a..20a6fdb07 100644 --- a/App_Code/ClsFinanzas.vb +++ b/App_Code/ClsFinanzas.vb @@ -200,11 +200,14 @@ Public Class ClsFinanzas Protected Overridable Sub Dispose(disposing As Boolean) If Not Me.disposedValue Then If disposing Then - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If End If diff --git a/App_Code/ClsFlotillas.vb b/App_Code/ClsFlotillas.vb index 17350750b..f9ff51f34 100644 --- a/App_Code/ClsFlotillas.vb +++ b/App_Code/ClsFlotillas.vb @@ -738,12 +738,13 @@ Public Class ClsFlotillas If Not Me.disposedValue Then If disposing Then ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() - If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. diff --git a/App_Code/ClsGPS.vb b/App_Code/ClsGPS.vb index a16f069eb..21ddfea1e 100644 --- a/App_Code/ClsGPS.vb +++ b/App_Code/ClsGPS.vb @@ -5693,20 +5693,22 @@ Public Class ClsGPS ' IDisposable Protected Overridable Sub Dispose(ByVal disposing As Boolean) If Not disposedValue Then - If disposing Then - ' TODO: Liberar otro estado (objetos administrados). - If Not Data Is Nothing Then Data.Dispose() - If Not Dataset Is Nothing Then - Dataset.Clear() - Dataset.Dispose() - End If - If Not DtPosiciones Is Nothing Then DtPosiciones.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() - If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() - If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() - + If disposing Then + ' TODO: Liberar otro estado (objetos administrados). + + + If Not DtPosiciones Is Nothing Then DtPosiciones.Dispose() : DtPosiciones = Nothing + + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not Dataset Is Nothing Then Dataset.Dispose() : Dataset = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + + + End If ' TODO: Liberar su propio estado (objetos no administrados). diff --git a/App_Code/ClsGPSHerramientas.vb b/App_Code/ClsGPSHerramientas.vb index 493863bad..2d0c6e456 100644 --- a/App_Code/ClsGPSHerramientas.vb +++ b/App_Code/ClsGPSHerramientas.vb @@ -187,11 +187,12 @@ Public Class ClsGPSHerramientas If Not Me.disposedValue Then If disposing Then ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If ' TODO: Liberar su propio estado (objetos no administrados). diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index becb87884..0c36234e9 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -2525,7 +2525,9 @@ Public Class ClsGenerales Public Function GetHistorialBitacora(CveAcarreo As Integer, CveOrdenCompra As Integer, CveActivoFijo As Integer, CveOS As Integer, CvePS As Integer, CveCompra As Integer, CveIE As Integer, CveEmpresa As Integer, Optional CveUsuario As Integer = -1, Optional CvePersonal As Integer = -1, - Optional IdPoliza As Integer = -1, Optional CvePrePoliza As Integer = -1, Optional CvePeriodo As Integer = -1, Optional CveConceptoNomina As Integer = -1, Optional CvePromocion As Integer = -1) As Boolean + Optional IdPoliza As Integer = -1, Optional CvePrePoliza As Integer = -1, Optional CvePeriodo As Integer = -1, Optional CveConceptoNomina As Integer = -1, Optional CvePromocion As Integer = -1, + Optional CveAsistencia As Integer = -1, Optional CveAsistenciaDetalle As Integer = -1, Optional CveTipoBitacora As Integer = -1, + Optional FechaInicio As String = "", Optional FechaFin As String = "") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_HistorialBitacoraGet") @@ -2547,6 +2549,11 @@ Public Class ClsGenerales .Add("@CvePromocion", SqlDbType.Int).Value = CvePromocion + .Add("@CveAsistencia", SqlDbType.Int).Value = CveAsistencia + .Add("@CveAsistenciaDetalle", SqlDbType.Int).Value = CveAsistenciaDetalle + .Add("@CveTipoBitacora", SqlDbType.Int).Value = CveTipoBitacora + .Add("@FechaInicio", SqlDbType.VarChar).Value = FechaInicio + .Add("@FechaFin", SqlDbType.VarChar).Value = FechaFin End With 'SqlTypes.SqlDateTime.Null @@ -3327,22 +3334,7 @@ Public Class ClsGenerales #End Region - Protected Overridable Sub Dispose(ByVal disposing As Boolean) - If Not disposedValue Then - If disposing Then - ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() - End If - - ' TODO: Liberar su propio estado (objetos no administrados). - ' TODO: Establecer campos grandes como Null. - End If - disposedValue = True - End Sub + #Region "CRUD_Edoc_DocumentacionTipo" @@ -3489,15 +3481,42 @@ Public Class ClsGenerales #End Region -#Region " IDisposable Support " - ' Visual Basic agregó este código para implementar correctamente el modelo descartable. + +#Region "IDisposable Support" + + + ' IDisposable + Protected Overridable Sub Dispose(disposing As Boolean) + If Not Me.disposedValue Then + If disposing Then + ' TODO: dispose managed state (managed objects). + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + + End If + + ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. + ' TODO: set large fields to null. + End If + Me.disposedValue = True + End Sub + + + + ' This code added by Visual Basic to correctly implement the disposable pattern. 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). + ' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above. ConexionClose() Dispose(True) GC.SuppressFinalize(Me) End Sub -#End Region +#End Region + + #Region " P O L I Z A V I R T U A L " Public Function ModelosAutosGet(CveEmpresa As Integer) As Boolean diff --git a/App_Code/ClsGralFolios.vb b/App_Code/ClsGralFolios.vb index 2705071c7..6c5f231b4 100644 --- a/App_Code/ClsGralFolios.vb +++ b/App_Code/ClsGralFolios.vb @@ -276,12 +276,14 @@ Public Class ClsGralFolios Protected Overridable Sub Dispose(disposing As Boolean) If Not Me.disposedValue Then If disposing Then - ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. diff --git a/App_Code/ClsGralProductosServiciosCaracteristicas.vb b/App_Code/ClsGralProductosServiciosCaracteristicas.vb index 6c2ea130b..8ee0d7822 100644 --- a/App_Code/ClsGralProductosServiciosCaracteristicas.vb +++ b/App_Code/ClsGralProductosServiciosCaracteristicas.vb @@ -305,10 +305,12 @@ Public Class ClsGralProductosServiciosCaracteristicas If Not disposedValue Then If disposing Then ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If diff --git a/App_Code/ClsImpuestos.vb b/App_Code/ClsImpuestos.vb index f4fd2c684..28d2929e3 100644 --- a/App_Code/ClsImpuestos.vb +++ b/App_Code/ClsImpuestos.vb @@ -146,11 +146,14 @@ Public Class ClsImpuestos Protected Overridable Sub Dispose(disposing As Boolean) If Not Me.disposedValue Then If disposing Then - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If End If Me.disposedValue = True diff --git a/App_Code/ClsIndicadores.vb b/App_Code/ClsIndicadores.vb index 625ddd31f..c9d8275aa 100644 --- a/App_Code/ClsIndicadores.vb +++ b/App_Code/ClsIndicadores.vb @@ -128,10 +128,12 @@ Public Class ClsIndicadores If Not disposedValue Then If disposing Then ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 43eab1487..c256e98fe 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -5751,10 +5751,11 @@ Public Class ClsInventarios If Not disposedValue Then If disposing Then ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If diff --git a/App_Code/ClsLeyendasFiscales.vb b/App_Code/ClsLeyendasFiscales.vb index 55c873e76..429a00b01 100644 --- a/App_Code/ClsLeyendasFiscales.vb +++ b/App_Code/ClsLeyendasFiscales.vb @@ -191,11 +191,12 @@ Public Class ClsLeyendasFiscales If Not Me.disposedValue Then If disposing Then ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. diff --git a/App_Code/ClsMF.vb b/App_Code/ClsMF.vb index 72ea537ca..e49c01e47 100644 --- a/App_Code/ClsMF.vb +++ b/App_Code/ClsMF.vb @@ -710,11 +710,14 @@ Public Class ClsMF Protected Overridable Sub Dispose(disposing As Boolean) If Not Me.disposedValue Then If disposing Then - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If End If Me.disposedValue = True diff --git a/App_Code/ClsMetodosPagos.vb b/App_Code/ClsMetodosPagos.vb index 59097d1df..e21006c56 100644 --- a/App_Code/ClsMetodosPagos.vb +++ b/App_Code/ClsMetodosPagos.vb @@ -113,11 +113,12 @@ Public Class ClsMetodosPagos If Not Me.disposedValue Then If disposing Then ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. diff --git a/App_Code/ClsModulos.vb b/App_Code/ClsModulos.vb index 3c47376f4..7c8e84877 100644 --- a/App_Code/ClsModulos.vb +++ b/App_Code/ClsModulos.vb @@ -412,11 +412,12 @@ Public Class ClsModulos If Not Me.disposedValue Then If disposing Then ' TODO: Liberar otro estado (objetos administrados). - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If ' TODO: Liberar su propio estado (objetos no administrados). diff --git a/App_Code/ClsMonedas.vb b/App_Code/ClsMonedas.vb index 26d96091d..3a4ac8dcd 100644 --- a/App_Code/ClsMonedas.vb +++ b/App_Code/ClsMonedas.vb @@ -134,11 +134,12 @@ Public Class ClsMonedas If Not Me.disposedValue Then If disposing Then ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb index 0193ebf94..680fbc2ae 100644 --- a/App_Code/ClsMovimientos.vb +++ b/App_Code/ClsMovimientos.vb @@ -1751,14 +1751,15 @@ Public Class ClsMovimientos ' IDisposable Protected Overridable Sub Dispose(disposing As Boolean) If Not Me.disposedValue Then - If disposing Then - ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() - If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() - If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If disposing Then + ' TODO: dispose managed state (managed objects). + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index f57a14a3c..9d1572a61 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -2251,6 +2251,26 @@ Public Class ClsNominas End Try Return retorno End Function + Public Function ExcelToBD(xmlstring As String) As Boolean + Dim retorno As Boolean = False + + Try + DTSet = New DataSet() + DataAdapter("PA_ExcelToBD", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@xmlstring", SqlDbType.Xml).Value = xmlstring + End With + SqlAdapter.Fill(DTSet) + retorno = True + Catch sqEx As SqlException + retorno = False + OnError("Ocurrió un error al obtener la asistenciadetalle.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + retorno = False + OnError("Ocurrió un error al obtener la asistenciadetalle.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function Public Function AsistenciaDetallePorTurnoGet(FechaInicio As DateTime, FechaFin As DateTime, CveEmpresa As Integer, Optional CvePersonal As Integer = -1) As Boolean Dim retorno As Boolean = False @@ -2878,11 +2898,14 @@ Public Class ClsNominas Protected Overridable Sub Dispose(ByVal disposing As Boolean) If Not disposedValue Then If disposing Then - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() + + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not DTSet Is Nothing Then DTSet.Dispose() : DTSet = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If End If diff --git a/App_Code/ClsOC.vb b/App_Code/ClsOC.vb index 913c6ddf7..bd1832379 100644 --- a/App_Code/ClsOC.vb +++ b/App_Code/ClsOC.vb @@ -2611,11 +2611,13 @@ Public Class ClsOC Protected Overridable Sub Dispose(ByVal disposing As Boolean) If Not disposedValue Then If disposing Then - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If End If disposedValue = True diff --git a/App_Code/ClsOIEventos.vb b/App_Code/ClsOIEventos.vb index 457ba77d3..bc70c3569 100644 --- a/App_Code/ClsOIEventos.vb +++ b/App_Code/ClsOIEventos.vb @@ -3162,12 +3162,14 @@ Public Class ClsOIEventos ' IDisposable Protected Overridable Sub Dispose(ByVal disposing As Boolean) If Not disposedValue Then - If disposing Then - ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() + If disposing Then + ' TODO: Liberar otro estado (objetos administrados). + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If diff --git a/App_Code/ClsOS.vb b/App_Code/ClsOS.vb index 431ef2037..42e8c4cd2 100644 --- a/App_Code/ClsOS.vb +++ b/App_Code/ClsOS.vb @@ -1680,10 +1680,12 @@ Public Class ClsOS If Not disposedValue Then If disposing Then ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If diff --git a/App_Code/ClsPV.vb b/App_Code/ClsPV.vb index 63f2bb39e..382f34065 100644 --- a/App_Code/ClsPV.vb +++ b/App_Code/ClsPV.vb @@ -208,12 +208,13 @@ Public Class ClsPV If Not Me.disposedValue Then If disposing Then ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() - If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 8611e3a83..49aab559a 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -5470,7 +5470,7 @@ Public Class ClsPaginas Protected Overrides Sub SavePageStateToPersistenceMedium(pviewState As Object) 'If Request.Form("__VIEWSTATE_KEY") IsNot Nothing Then Cache.Remove(Request.Form("__VIEWSTATE_KEY")) 'elimino la cachado anteriormente Dim VSKey As String = String.Format("VIEWSTATE_{0}_{1}_{2}", Session.SessionID, Request.Path, Date.Now.Ticks) - Cache.Add(VSKey, pviewState, Nothing, Date.Now.AddMinutes(60), Cache.NoSlidingExpiration, CacheItemPriority.Default, Nothing) 'Store the ViewState on Cache + Cache.Add(VSKey, pviewState, Nothing, Date.Now.AddMinutes(30), Cache.NoSlidingExpiration, CacheItemPriority.Default, Nothing) 'Store the ViewState on Cache 'Session.Add(VSKey, pviewState) 'Store the ViewState on Cache ClientScript.RegisterHiddenField("__VIEWSTATE_KEY", VSKey) diff --git a/App_Code/ClsPresupuestos.vb b/App_Code/ClsPresupuestos.vb index 2bf7542f8..54c45a729 100644 --- a/App_Code/ClsPresupuestos.vb +++ b/App_Code/ClsPresupuestos.vb @@ -755,10 +755,12 @@ Public Class ClsPresupuestos If Not disposedValue Then If disposing Then ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index 113c97ce0..e245b1f44 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -92,6 +92,7 @@ Public Class ClsProductosServicios Public Property CveMaterialPeligroso As Integer Public Property CveEmbalaje As Integer Public Property PesoKg As Decimal + Public Property Dimensiones As String 'Nuevo Raul: 10/08/2018 Public Property CveUsuarioModifico As Integer @@ -301,6 +302,7 @@ Public Class ClsProductosServicios CveMaterialPeligroso = Data.Rows(0)("CveMaterialPeligroso").ToString.ToEntero CveEmbalaje = Data.Rows(0)("CveEmbalaje").ToString.ToEntero PesoKg = Data.Rows(0)("PesoKg").ToString.ToDecimal + Dimensiones = Data.Rows(0)("Dimensiones").ToString 'Nuevo Raul: 10/08/2018 CveUsuarioModifico = Data.Rows(0)("CveUsuarioModifico").ToString.ToEntero @@ -416,7 +418,7 @@ Public Class ClsProductosServicios Optional CveModelo As Integer = -1, Optional CveMedida As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional ClaveImpuestoEmpaque As String = "", Optional ClaveImpuestoUM As String = "", Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False, - Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1) As Integer + Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "") As Integer Dim Retorno As Integer = -1 DataAdapter("PA_ProductosServiciosAdd") @@ -503,6 +505,7 @@ Public Class ClsProductosServicios .Add("@CveMaterialPeligroso", SqlDbType.Int).Value = CveMaterialPeligroso .Add("@CveEmbalaje", SqlDbType.Int).Value = CveEmbalaje .Add("@PesoKg", SqlDbType.SmallMoney).Value = PesoKg + .Add("@Dimensiones", SqlDbType.VarChar).Value = Dimensiones End With @@ -651,7 +654,7 @@ Public Class ClsProductosServicios Optional CveClasificacionDetalle As Integer = -1, Optional CveTamaño As Integer = -1, Optional CveModelo As Integer = -1, Optional CveMedida As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional ClaveImpuestoEmpaque As String = "", Optional ClaveImpuestoUM As String = "", Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False, - Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1) As Boolean + Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "") As Boolean Dim Retorno As Boolean = False @@ -740,6 +743,7 @@ Public Class ClsProductosServicios .Add("@CveMaterialPeligroso", SqlDbType.Int).Value = CveMaterialPeligroso .Add("@CveEmbalaje", SqlDbType.Int).Value = CveEmbalaje .Add("@PesoKg", SqlDbType.SmallMoney).Value = PesoKg + .Add("@Dimensiones", SqlDbType.VarChar).Value = Dimensiones End With @@ -2141,11 +2145,13 @@ Public Class ClsProductosServicios If Not Me.disposedValue Then If disposing Then ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. diff --git a/App_Code/ClsProsEncuestas.vb b/App_Code/ClsProsEncuestas.vb index dc005bd79..7a74c21c6 100644 --- a/App_Code/ClsProsEncuestas.vb +++ b/App_Code/ClsProsEncuestas.vb @@ -775,10 +775,11 @@ Public Class ClsProsEncuestas If Not disposedValue Then If disposing Then ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If diff --git a/App_Code/ClsProspectos.vb b/App_Code/ClsProspectos.vb index adfc2b6cd..2866b3324 100644 --- a/App_Code/ClsProspectos.vb +++ b/App_Code/ClsProspectos.vb @@ -4615,10 +4615,13 @@ Public Class ClsProspectos If Not disposedValue Then If disposing Then ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If diff --git a/App_Code/ClsProyectos.vb b/App_Code/ClsProyectos.vb index 31b371e85..030fc7686 100644 --- a/App_Code/ClsProyectos.vb +++ b/App_Code/ClsProyectos.vb @@ -233,10 +233,12 @@ Public Class ClsProyectos If Not disposedValue Then If disposing Then ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If diff --git a/App_Code/ClsPruebasJJMQ.vb b/App_Code/ClsPruebasJJMQ.vb index 3bd297b6e..1a812e2b5 100644 --- a/App_Code/ClsPruebasJJMQ.vb +++ b/App_Code/ClsPruebasJJMQ.vb @@ -157,11 +157,12 @@ Public Class ClsPruebasJJMQ If Not Me.disposedValue Then If disposing Then ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing StrSQL.Clear() End If diff --git a/App_Code/ClsPuntoVenta.vb b/App_Code/ClsPuntoVenta.vb index 79f8f82ed..e524ce6bb 100644 --- a/App_Code/ClsPuntoVenta.vb +++ b/App_Code/ClsPuntoVenta.vb @@ -429,12 +429,12 @@ Public Class ClsPuntoVenta If Not Me.disposedValue Then If disposing Then ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() - If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb index c7d98a06d..27d0fa4ca 100644 --- a/App_Code/ClsRH.vb +++ b/App_Code/ClsRH.vb @@ -1807,7 +1807,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Calle As String, NumExt As String, NumInt As String, Colonia As String, CP As String, Ciudad As String, CveEstado As Integer, Telefono As String, Celular As String, RFC As String, CURP As String, NombrePadre As String, NombreMadre As String, CveSATBanco As Integer, CveSATRiesgoPuesto As Integer, CveSATRegimenContratacion As Integer, CveClienteAsignado As Integer, CveSubProyecto As Integer, URL As String, CveSupervisor As Integer, CLABE As String, BancoNumCuenta As String, CveJornada As Integer, IdCtaContPersonal As Integer, CtaContPersonal As String, IdCtaContPrestamos As Integer, CtaContPrestamos As String, CveUsuario As Integer, CveEmpresa As Integer, CveUsuarioNomina As Integer, Optional CveSubProyectoZona As Integer = Nothing, Optional CveUniforme As Integer = -1, - Optional TelefonoExtension As String = "-1", Optional CelularPersonal As String = "-1", Optional TelefonoMarcadoRapido As String = "-1", Optional ContactoAlterno As String = "-1", Optional CveTipodeSalario As Integer = 1, Optional Sindicalizado As Boolean = False, Optional CvePais As Integer = -1) As Boolean + Optional TelefonoExtension As String = "-1", Optional CelularPersonal As String = "-1", Optional TelefonoMarcadoRapido As String = "-1", Optional ContactoAlterno As String = "-1", Optional CveTipodeSalario As Integer = 1, Optional Sindicalizado As Boolean = False, Optional CvePais As Integer = -1, Optional Pensionado As Boolean = False) As Boolean Dim Retorno As Boolean = False @@ -1889,6 +1889,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo .Add("@ContactoAlterno", SqlDbType.VarChar).Value = ContactoAlterno .Add("@CveTipodeSalario", SqlDbType.Int).Value = CveTipodeSalario .Add("@Sindicalizado", SqlDbType.Bit).Value = Sindicalizado + .Add("@Pensionado", SqlDbType.Bit).Value = Pensionado .Add("@CvePais", SqlDbType.Int).Value = CvePais .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue @@ -1922,7 +1923,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo NombrePadre As String, NombreMadre As String, CveSATBanco As Integer, CveSATRiesgoPuesto As Integer, CveSATRegimenContratacion As Integer, CveClienteAsignado As Integer, CveSubProyecto As Integer, CvePersonal As Integer, URL As String, CveSupervisor As Integer, CLABE As String, BancoNumCuenta As String, CveJornada As Integer, IdCtaContPersonal As Integer, CtaContPersonal As String, IdCtaContPrestamos As Integer, CtaContPrestamos As String, CveEmpresa As Integer, CveUsuarioNomina As Integer, Optional CveSubProyectoZona As Integer = Nothing, Optional CveUniforme As Integer = -1, Optional TelefonoExtension As String = "-1", Optional CelularPersonal As String = "-1", Optional TelefonoMarcadoRapido As String = "-1", Optional ContactoAlterno As String = "-1", Optional CveUsuarioModifico As Integer = -1, - Optional FechaActivo As Date = MinFecha, Optional FechaReingreso As Date = MinFecha, Optional CveTipodeSalario As Integer = 1, Optional Sindicalizado As Integer = -1, Optional CvePais As Integer = -1) As Boolean + Optional FechaActivo As Date = MinFecha, Optional FechaReingreso As Date = MinFecha, Optional CveTipodeSalario As Integer = 1, Optional Sindicalizado As Integer = -1, Optional CvePais As Integer = -1, Optional Pensionado As Boolean = False) As Boolean Dim Retorno As Boolean = False @@ -2008,6 +2009,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo .Add("@FechaReingreso", SqlDbType.Date).Value = FechaReingreso .Add("@CveTipodeSalario", SqlDbType.Int).Value = CveTipodeSalario .Add("@Sindicalizado", SqlDbType.Int).Value = Sindicalizado + .Add("@Pensionado", SqlDbType.Bit).Value = Pensionado .Add("@CvePais", SqlDbType.Int).Value = CvePais End With @@ -2441,7 +2443,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Function - Public Function UpAsistenciaDetalle(CveEmpresa As Integer, registros As List(Of RequestUpAsistenciaDetalle)) As Boolean + Public Function UpAsistenciaDetalle(CveEmpresa As Integer, CveUsuario As Integer, registros As List(Of RequestUpAsistenciaDetalle)) As Boolean Dim Retorno As Boolean = False Dim xmlProductos As System.Xml.Linq.XDocument = Nothing If registros IsNot Nothing AndAlso registros.Count > 0 Then @@ -2451,6 +2453,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo SqlDataAdapter("PA_RH_AsistenciaDetalleUP") With SqlAdapter.SelectCommand.Parameters .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@xmlRegistros", SqlDbType.Xml).Value = xmlProductos.ToString() End With Try @@ -7111,10 +7114,12 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo If Not disposedValue Then If disposing Then ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not DSet Is Nothing Then DSet.Dispose() : DSet = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If @@ -7145,4 +7150,5 @@ Public Class RequestUpAsistenciaDetalle Public Property CvePersonal As Integer Public Property CveAsistenciasInasistencias As Integer Public Property CveSubProyecto As Integer + Public Property Motivo As String End Class diff --git a/App_Code/ClsRMA.vb b/App_Code/ClsRMA.vb index b29752ac6..25726a92e 100644 --- a/App_Code/ClsRMA.vb +++ b/App_Code/ClsRMA.vb @@ -203,11 +203,13 @@ Public Class ClsRMA If Not disposedValue Then If disposing Then ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If ' TODO: Liberar su propio estado (objetos no administrados). diff --git a/App_Code/ClsSAT.vb b/App_Code/ClsSAT.vb index ec5a7b30e..62d6f4521 100644 --- a/App_Code/ClsSAT.vb +++ b/App_Code/ClsSAT.vb @@ -451,11 +451,12 @@ Public Class ClsSAT ' TODO: dispose managed state (managed objects). 'ConexionUpdate() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If diff --git a/App_Code/ClsSCTLicencias.vb b/App_Code/ClsSCTLicencias.vb index bdf704c01..7ae89385a 100644 --- a/App_Code/ClsSCTLicencias.vb +++ b/App_Code/ClsSCTLicencias.vb @@ -247,13 +247,16 @@ Public Class ClsSCTLicencias Protected Overridable Sub Dispose(ByVal disposing As Boolean) If Not disposedValue Then If disposing Then + ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + ' TODO: Liberar su propio estado (objetos no administrados). ' TODO: Establecer campos grandes como Null. diff --git a/App_Code/ClsSeguimiento.vb b/App_Code/ClsSeguimiento.vb index 96b21a7cf..d3359629a 100644 --- a/App_Code/ClsSeguimiento.vb +++ b/App_Code/ClsSeguimiento.vb @@ -166,10 +166,10 @@ Public Class ClsSeguimiento If Not disposedValue Then If disposing Then ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If diff --git a/App_Code/ClsSisEmpresas.vb b/App_Code/ClsSisEmpresas.vb index 8712432be..e96dd9a87 100644 --- a/App_Code/ClsSisEmpresas.vb +++ b/App_Code/ClsSisEmpresas.vb @@ -1846,14 +1846,15 @@ Public Class ClsSisEmpresas ' IDisposable Protected Overridable Sub Dispose(disposing As Boolean) If Not Me.disposedValue Then - If disposing Then - ' TODO: Liberar otro estado (objetos administrados). - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() - 'If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() - If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If disposing Then + ' TODO: Liberar otro estado (objetos administrados). + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If ' TODO: Liberar su propio estado (objetos no administrados). diff --git a/App_Code/ClsSisNotificaciones.vb b/App_Code/ClsSisNotificaciones.vb index 4aafd6454..bcf8af387 100644 --- a/App_Code/ClsSisNotificaciones.vb +++ b/App_Code/ClsSisNotificaciones.vb @@ -2063,22 +2063,25 @@ Public Class ClsSisNotificaciones ' IDisposable Protected Overridable Sub Dispose(disposing As Boolean) If Not Me.disposedValue Then - If disposing Then - ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not DataSet Is Nothing Then - DataSet.Clear() - DataSet.Dispose() - End If - If Not Data Is Nothing Then Data.Dispose() - If Not DTNotificacionesGPS Is Nothing Then DTNotificacionesGPS.Dispose() - If Not DTNotificacionesERP Is Nothing Then DTNotificacionesERP.Dispose() - If Not DTNotificacionesArmadas Is Nothing Then DTNotificacionesArmadas.Dispose() - If Not DTReportesProgramados Is Nothing Then DTReportesProgramados.Dispose() - NotificacionesBitacora = "" - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + If disposing Then + + + + If Not DTNotificacionesGPS Is Nothing Then DTNotificacionesGPS.Dispose() : DTNotificacionesGPS = Nothing + If Not DTNotificacionesERP Is Nothing Then DTNotificacionesERP.Dispose() : DTNotificacionesERP = Nothing + If Not DTNotificacionesArmadas Is Nothing Then DTNotificacionesArmadas.Dispose() : DTNotificacionesArmadas = Nothing + If Not DTReportesProgramados Is Nothing Then DTReportesProgramados.Dispose() : DTReportesProgramados = Nothing + NotificacionesBitacora = "" + + + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not DataSet Is Nothing Then DataSet.Dispose() : DataSet = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + + End If ' TODO: Liberar su propio estado (objetos no administrados). diff --git a/App_Code/ClsSisParametros.vb b/App_Code/ClsSisParametros.vb index 8ab040848..31ee3bc15 100644 --- a/App_Code/ClsSisParametros.vb +++ b/App_Code/ClsSisParametros.vb @@ -255,12 +255,15 @@ Public Class ClsSisParametros Protected Overridable Sub Dispose(disposing As Boolean) If Not Me.disposedValue Then If disposing Then - ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + + + + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If ' TODO: Liberar su propio estado (objetos no administrados). diff --git a/App_Code/ClsSisProcesos.vb b/App_Code/ClsSisProcesos.vb index a19a77896..573219743 100644 --- a/App_Code/ClsSisProcesos.vb +++ b/App_Code/ClsSisProcesos.vb @@ -216,11 +216,11 @@ Public Class ClsSisProcesos If Not Me.disposedValue Then If disposing Then ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If ' TODO: Liberar su propio estado (objetos no administrados). diff --git a/App_Code/ClsSisRoles.vb b/App_Code/ClsSisRoles.vb index 85b9a7211..89e0fa672 100644 --- a/App_Code/ClsSisRoles.vb +++ b/App_Code/ClsSisRoles.vb @@ -336,10 +336,13 @@ Public Class ClsSisRoles If Not Me.disposedValue Then If disposing Then ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() + + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If diff --git a/App_Code/ClsSisUsuarios.vb b/App_Code/ClsSisUsuarios.vb index 09896ce69..44acf89fc 100644 --- a/App_Code/ClsSisUsuarios.vb +++ b/App_Code/ClsSisUsuarios.vb @@ -2939,12 +2939,16 @@ Public Class ClsSisUsuarios #Region "IDisposable Support" Protected Overridable Sub Dispose(disposing As Boolean) If Not Me.disposedValue Then - If disposing Then - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() - If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If disposing Then + + + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + End If End If Me.disposedValue = True diff --git a/App_Code/ClsStiReports.vb b/App_Code/ClsStiReports.vb index fa533de0a..8d000882f 100644 --- a/App_Code/ClsStiReports.vb +++ b/App_Code/ClsStiReports.vb @@ -106,10 +106,13 @@ Public Class ClsStiReports If Not disposedValue Then If disposing Then ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() + + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If diff --git a/App_Code/ClsSubProyectos.vb b/App_Code/ClsSubProyectos.vb index eb0f0d55a..f07ce9213 100644 --- a/App_Code/ClsSubProyectos.vb +++ b/App_Code/ClsSubProyectos.vb @@ -299,12 +299,14 @@ Public Class ClsSubProyectos ' IDisposable Protected Overridable Sub Dispose(ByVal disposing As Boolean) If Not disposedValue Then - If disposing Then - ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() + If disposing Then + ' TODO: Liberar otro estado (objetos administrados). + + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If diff --git a/App_Code/ClsSucursales.vb b/App_Code/ClsSucursales.vb index b7d3f0f00..e1d19cca9 100644 --- a/App_Code/ClsSucursales.vb +++ b/App_Code/ClsSucursales.vb @@ -351,11 +351,13 @@ Public Class ClsSucursales If Not Me.disposedValue Then If disposing Then ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. diff --git a/App_Code/ClsTemporal.vb b/App_Code/ClsTemporal.vb index f9ee5ca69..3b727f52c 100644 --- a/App_Code/ClsTemporal.vb +++ b/App_Code/ClsTemporal.vb @@ -291,12 +291,13 @@ Public Class ClsTemporal If Not Me.disposedValue Then If disposing Then ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() - If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() + + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. diff --git a/App_Code/ClsTiposEventos.vb b/App_Code/ClsTiposEventos.vb index 2905de837..76cb02e42 100644 --- a/App_Code/ClsTiposEventos.vb +++ b/App_Code/ClsTiposEventos.vb @@ -185,11 +185,12 @@ Public Class ClsTiposEventos If Not Me.disposedValue Then If disposing Then ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. diff --git a/App_Code/ClsUnidadesMedida.vb b/App_Code/ClsUnidadesMedida.vb index 69e51e5f8..542efe9bf 100644 --- a/App_Code/ClsUnidadesMedida.vb +++ b/App_Code/ClsUnidadesMedida.vb @@ -307,11 +307,13 @@ Public Class ClsUnidadesMedida If Not Me.disposedValue Then If disposing Then ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index c8a9c42e7..2a6cf907c 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -5257,13 +5257,19 @@ Public Class ClsVentas If Not Me.disposedValue Then If disposing Then ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() - If Not Dataset Is Nothing Then Dataset.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() - If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() + + + + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not Dataset Is Nothing Then Dataset.Dispose() : Dataset = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing + + + End If ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. diff --git a/App_Code/ClsVtaPromociones.vb b/App_Code/ClsVtaPromociones.vb index f5e9e6bfa..3c11d5b04 100644 --- a/App_Code/ClsVtaPromociones.vb +++ b/App_Code/ClsVtaPromociones.vb @@ -139,11 +139,13 @@ Public Class ClsVtaPromociones If Not Me.disposedValue Then If disposing Then ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + + + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing End If ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. diff --git a/App_Code/ClsVtaVendedores.vb b/App_Code/ClsVtaVendedores.vb index 6949554e1..11c021c2d 100644 --- a/App_Code/ClsVtaVendedores.vb +++ b/App_Code/ClsVtaVendedores.vb @@ -265,13 +265,15 @@ Public Class ClsVtaVendedores Protected Overridable Sub Dispose(ByVal disposing As Boolean) If Not disposedValue Then If disposing Then - ' TODO: Liberar otro estado (objetos administrados). - SqlConexion.Close() - SqlConexion.Dispose() - If Not Data Is Nothing Then Data.Dispose() - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() + ' TODO: Liberar otro estado (objetos administrados). + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing + If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing - End If + End If ' TODO: Liberar su propio estado (objetos no administrados). ' TODO: Establecer campos grandes como Null. diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb index 330068893..1336491e0 100644 --- a/Bancos/PopIEVentas.aspx.vb +++ b/Bancos/PopIEVentas.aspx.vb @@ -561,7 +561,7 @@ Partial Class Bancos_PopIEVentas MovimientoPagar = Nothing ArrIE = New ArrayList() ArrIEFuncionariosEmpleados = New ArrayList() - RFCCliente = "" + RFCCliente = "-1" TxtFechaDocumento.Text = Now.ToShortDateString diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index ec9888e62..52d7f470c 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -4835,7 +4835,7 @@
- + diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 5a0045c9c..27585e0ea 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -6071,12 +6071,36 @@ Partial Class Compras_Compras If chkImportacion.Checked Then ConceptoContable = 287 End If - If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then If ObjConta.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero End If End If + 'si aplica NC sobre mov de almacen, el impuesto lo toma de la Factura.para la consideracion de mcia en tránsito + + If ChkNCInvNC.Checked And CveMoneda <> 1 AndAlso importeMovimiento > 0 Then + + Dim diferenciaTransito As Decimal = 0 + For Each Gvr As GridViewRow In GVNCInvAlmacen.Rows + If Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble > 0 Then + + 'Dim DifTC As Decimal = tipoCambioActual - Gvr.DataKey("TipoCambio").ToDecimal + 'diferenciaTransito = DifTC * (Gvr.DataKey("IVA").ToDecimal / Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDecimal) + 'diferenciaTransito += DifTC * (Gvr.DataKey("IEPSPS").ToDecimal / Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDecimal) + importeMN = (Gvr.DataKey("IVA").ToDecimal.RoundSQL * Gvr.DataKey("TipoCambio").ToDecimal * Multiplicador).RoundSQL + 'se registra por cada compra relacionada + + + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 14, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=Gvr.DataKey("TipoCambio").ToDecimal, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza) Then + ErrorPrepoliza = True + End If + End If + Next + importeMovimiento = 0 + importeMN = 0 + End If + + Case 287 'IVA X Acreditar importeMovimiento = importeIVAxAcreditar @@ -6093,6 +6117,7 @@ Partial Class Compras_Compras Case 25 'IEPS X Acreditar If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then + CveSubProyectoInsertar = CveSubProyecto importeMovimiento = ImporteIEPSxAcreditar importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}" @@ -6790,6 +6815,7 @@ Partial Class Compras_Compras End If Next + Dim diferenciaTransito As Decimal = 0 For Each Gvr As GridViewRow In GVNCInvAlmacen.Rows If Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble > 0 Then Dim importeMNTemp As Decimal = 0 @@ -6797,6 +6823,9 @@ Partial Class Compras_Compras ErrorMovInv = True Exit For End If + Dim DifTC As Decimal = tipoCambioActual - Gvr.DataKey("TipoCambio").ToDecimal + 'diferenciaTransito = DifTC * (Gvr.DataKey("IVA").ToDecimal / Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDecimal) + 'diferenciaTransito += DifTC * (Gvr.DataKey("IEPSPS").ToDecimal / Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDecimal) importeMNTemp = (Gvr.DataKey("PU").ToDecimal * Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDecimal * Gvr.DataKey("TipoCambio").ToDecimal).RoundSQL ImporteTransito += importeMNTemp 'se registra por cada compra relacionada @@ -6806,18 +6835,22 @@ Partial Class Compras_Compras End If Next - 'si hay diferencia - Dim diferenciaTransito As Decimal = ImporteTransito - importeMN.RoundSQL + + 'la diferencia se va aplicar sobre los + + 'Dim diferenciaTransito As Decimal = ImporteTransito - importeMN.RoundSQL If diferenciaTransito <> 0 Then Dim tCveCon As Integer = 65 + IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria If diferenciaTransito < 0 Then tCveCon = 64 + IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria End If - diferenciaTransito = diferenciaTransito.Abs - IdCtaContable = 0 - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, If(tCveCon = 64, True, False), diferenciaTransito, Referencia, tCveCon, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=diferenciaTransito, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=1, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza) Then + diferenciaTransito = Math.Abs(diferenciaTransito) + + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, If(tCveCon = 64, True, False), diferenciaTransito, Referencia, tCveCon, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=diferenciaTransito, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=1, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto) Then ErrorPrepoliza = True End If End If @@ -6973,7 +7006,7 @@ Partial Class Compras_Compras tidctacon = ViewState("CtaProveedorAnticiposExtranjera").ToString.ToEntero End If - ElseIf DdlTipoComprobante.SelectedValue = "NC" AndAlso UsuarioActual.Empresa.Funcionalidad(405).ToEntero > 0 Then + ElseIf DdlTipoComprobante.SelectedValue = "NC" Then tcvecon = 259 tidctacon = UsuarioActual.Empresa.Funcionalidad(405).ToEntero diff --git a/General/ExcelToBD.aspx b/General/ExcelToBD.aspx index 6b74bf170..efbd4ef75 100644 --- a/General/ExcelToBD.aspx +++ b/General/ExcelToBD.aspx @@ -14,7 +14,7 @@ - +
@@ -48,9 +48,13 @@ Paso 2: Configuración
- Mostrar
+
+
+ Mostrar +
+
@@ -67,19 +71,19 @@
- +
- +
- +
@@ -88,12 +92,15 @@
- Continuar + Continuar
+ + + diff --git a/General/ExcelToBD.aspx.cs b/General/ExcelToBD.aspx.cs index cabe4ccdb..4f00078ce 100644 --- a/General/ExcelToBD.aspx.cs +++ b/General/ExcelToBD.aspx.cs @@ -1,6 +1,9 @@ using System; +using System.Collections.Concurrent; using System.Collections.Generic; +using System.Data; using System.Linq; +using System.Text.RegularExpressions; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; @@ -41,6 +44,16 @@ public partial class General_ExcelToBD : System.Web.UI.Page set { ViewState["workBooks"] = value; } } + private ConcurrentDictionary ColumnsTitles + { + get + { + if (ViewState["ColumnsTitles"] == null) { return null; } + else { return (ConcurrentDictionary)ViewState["ColumnsTitles"]; } + } + + set { ViewState["ColumnsTitles"] = value; } + } #endregion protected void Page_Load(object sender, EventArgs e) { @@ -64,21 +77,21 @@ public partial class General_ExcelToBD : System.Web.UI.Page workBooks.Add(new ADSWorksBooks() { Name = wokitem.Name, position = position++ }); } - + } DdlWorkBooks.DataSource = workBooks; DdlWorkBooks.DataBind(); if (workBooks.Count > 0) { DdlWorkBooks.SelectedIndex = 0; - DdlWorkBooks_SelectedIndexChanged(null,null); + DdlWorkBooks_SelectedIndexChanged(null, null); } } protected void DdlWorkBooks_SelectedIndexChanged(object sender, EventArgs e) { using (var workbook = new XLWorkbook(URLFile)) - { + { int Filas = 0; int columnas = 0; @@ -86,25 +99,151 @@ public partial class General_ExcelToBD : System.Web.UI.Page Filas = workSheet.LastColumnUsed().CellCount(); columnas = workSheet.LastRowUsed().CellCount(); TxtFilas.Text = Filas.ToString(); - TxtInicia.Text = "1"; - TxtColumnas.Text = Filas.ToString(); + TxtInicia.Text = "2"; + TxtColumnas.Text = "62";// columnas.ToString(); } } protected void Lnkdoit_Click(object sender, EventArgs e) { - + GVDatos.DataSource = GetDatosExcel(); + GVDatos.DataBind(); } protected void LnkContinuar_Click(object sender, EventArgs e) { - int Filas = 0; - int columnas = 0; + DataSet ds = new DataSet(); + DataTable dtDatos = new DataTable(); + DataTable dt = GetDatosExcel(); + ds.DataSetName = "DSDatos"; + dtDatos.TableName = "TCol"; + dt.TableName = "TData"; + + dtDatos.Columns.Add(new DataColumn("Columnas", typeof(string))); + dtDatos.Columns.Add(new DataColumn("LEN", typeof(int))); + foreach (DataColumn item in dt.Columns) + { + DataRow drow = dtDatos.NewRow(); + drow["Columnas"] = item.ColumnName; + int longitud = 0; + foreach (DataRow dr in dt.Rows) + { + int length = dr[item.ColumnName].ToString().Length; + + longitud = length > longitud ? length : longitud; + } + drow["LEN"] = longitud; + dtDatos.Rows.Add(drow); + } + + ds.Tables.Add(dtDatos); + ds.Tables.Add(dt); + string xml = ds.GetXml(); + + using (ClsNominas objbase = new ClsNominas()) + { + if (objbase.ExcelToBD(xml)) + { + this.Alert("Información capturada", ModExtensiones.TipoMensaje.MsgInformacion); + } + } + GVDatos.DataSource = dt; + GVDatos.DataBind(); + + //this.Alert(string.Format("
{0}\n

", xml), ModExtensiones.TipoMensaje.MsgInformacion); + + } + public string validtitle(string Valor) + { + + Valor = Valor.Replace(" ", "_"); + Valor = Valor.Replace("$$$$", "_Money_"); + Valor = Valor.Replace("$$$", "_Money_"); + Valor = Valor.Replace("$$", "_Money_"); + Valor = Valor.Replace("$", "_Money_"); + Valor = Valor.Replace(".", string.Empty); + Regex reg = new Regex("[*'\",&#^@]"); + Valor = reg.Replace(Valor, string.Empty); + if (Valor.Trim().Length == 0) + { + Valor = "Val"; + } + return Valor; + } + public DataTable GetDatosExcel() + { + + DataTable dtDatos = new DataTable(); + ColumnsTitles = new ConcurrentDictionary(); using (var workbook = new XLWorkbook(URLFile)) { IXLWorksheet workSheet = workbook.Worksheet(DdlWorkBooks.SelectedValue.ToEntero()); + DateTime d = new DateTime(); + bool continuarFila = true; + string validaValor; + + int contadorValida = 0; + bool haveTitles = chkcontieneTitulos.Checked; + int FilaInicial = TxtInicia.Text.ToEntero() > 0 ? TxtInicia.Text.ToEntero() : 1; + int ColumnaFinal = TxtColumnas.Text.ToEntero(); + int cFila = FilaInicial; + int cCol = 1; + + while (cCol <= ColumnaFinal) + { + string Valor = cCol.ToString(); + if (haveTitles) + { + Valor = workSheet.Cell(cFila, cCol).Value != null && workSheet.Cell(cFila, cCol).Value.GetType() == d.GetType() ? string.Format("{0:yyyy/MM/dd}", workSheet.Cell(cFila, cCol).Value) : workSheet.Cell(cFila, cCol).Value.ToString(); + Valor = validtitle(Valor); + } + if (!ColumnsTitles.TryAdd(Valor, Valor)) + { + int x = 2; + while (!ColumnsTitles.TryAdd(string.Format("{0}_{1}", Valor, x), Valor)) { x++; } + Valor = string.Format("{0}_{1}", Valor, x); + } + dtDatos.Columns.Add(new DataColumn(Valor, typeof(string))); + cCol++; + } + if (haveTitles) + { + cFila++; + } + while (continuarFila) + { + DataRow drow = dtDatos.NewRow(); + cCol = 1; + validaValor = ""; + while (cCol <= ColumnaFinal) + { + string Valor = workSheet.Cell(cFila, cCol).Value != null && workSheet.Cell(cFila, cCol).Value.GetType() == d.GetType() ? string.Format("{0:yyyy/MM/dd}", workSheet.Cell(cFila, cCol).Value) : workSheet.Cell(cFila, cCol).Value.ToString(); + validaValor = string.Format("{0}{1}", validaValor, Valor); + drow[cCol - 1] = Valor; + cCol++; + } + if (validaValor.Trim() == "") + { + contadorValida++; + if (contadorValida > 30) + { + continuarFila = false; + } + } + else + { + contadorValida = 0; + dtDatos.Rows.Add(drow); + } + cFila++; + if (cFila >= 1048576) + { + continuarFila = false; + } + } } + return dtDatos; } } diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index c120b52a0..0404397b4 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -2712,6 +2712,50 @@ Partial Class Inventarios_TraspasoAlmacen CartaPorte.Mercancias.UnidadPeso = "" CartaPorte.Mercancias.CargoporTasacion = 0 + ''CartaPorte.FiguraTransporte.AutoTransporteFederal.PermSCT = "TPAF01" + ''CartaPorte.FiguraTransporte.AutoTransporteFederal.NumPermisoSCT = "1234567890" + ''CartaPorte.FiguraTransporte.AutoTransporteFederal.NombreAseg = "GNP" + ''CartaPorte.FiguraTransporte.AutoTransporteFederal.NumPolizaSeguro = "P123" + ''CartaPorte.FiguraTransporte.AutoTransporteFederal.Vehiculo.ConfigVehicular = "C2" + ''CartaPorte.FiguraTransporte.AutoTransporteFederal.Vehiculo.PlacaVM = "WTF757A" + ''CartaPorte.FiguraTransporte.AutoTransporteFederal.Vehiculo.AnioModeloVM = 2007 + + ''Dim DomOrigen As New CFDICartaPorteDomicilio With {.Calle = "calle", + '' .Colonia = "", + '' .CP = "45200", + '' .Estado = "JAL", + '' .Pais = "MEX", + '' .Localidad = ""} + ''Dim DomDestino As New CFDICartaPorteDomicilio With {.Calle = "calle destino", + '' .Colonia = "", + '' .CP = "45200", + '' .Estado = "JAL", + '' .Pais = "MEX", + '' .Localidad = ""} + ''Dim Ubica As New CFDICartaPorteUbicaciones + ''Ubica.TipoEstacion = "01" + ''Ubica.DistanciaRecorrida = 6 + ''Ubica.Origen = New CFDICartaPorteUbicacionOrigen With {.RFCRemitente = "CAMJ841219I33", + '' .FechaHoraSalida = "2021-08-23T11:13:01", + '' .NombreRemitente = "Empresa", + '' .Domicilio = DomOrigen} + ''Ubica.Destino = New CFDICartaPorteUbicacionDestino With {.RFCDestinatario = "CAMJ841219I33", + '' .FechaHoraProgLlegada = "2021-08-23T11:13:01", + '' .NombreDestinatario = "Empresa dest", + '' .Domicilio = DomDestino} + + ''CartaPorte.Ubicaciones.Add(Ubica) + + ''CartaPorte.FiguraTransporte.ClaveTransporte = "01" + ''CartaPorte.FiguraTransporte.Operadores.Add(New CFDICartaPorteOperador With {.RFCOperador = "CAMJ841219I33", + '' .Domicilio = Nothing, + '' .NombreOperador = "juan Perez", + '' .NumLicencia = "Num Lic", + '' .NumRegidTribOperador = "", + '' .ResidenciaFiscalOperador = ""}) + + + Dim Dr As DataRow = DtCamiones.FiltroPrimero(String.Format("CveCamion= {0}", DdlUnidadCamion.SelectedValue)) If Dr IsNot Nothing Then @@ -2799,7 +2843,7 @@ Partial Class Inventarios_TraspasoAlmacen .Descripcion = "Flete", .ValorUnitario = 0, .Importe = 0, - .Descuento = 0L, + .Descuento = 0, .Unidad = "Servicio", .ClaveUnidad = "E48", .ClaveProdServ = "78101802", @@ -2977,7 +3021,7 @@ Partial Class Inventarios_TraspasoAlmacen 'If TimbrarFacturaGoCFDIv33(ObjFactura, UsuarioActual, 4) <> "" Then ' MensajeAlert.AppendFormat("
  • -- no timbró-{0}
", MensajeErrorCFDI) 'End If - If ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura) Then + If ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura, 3) Then MensajeAlert.Append("Emitido con exito.") 'XML Dim ArchivoXML = String.Format("{0}/XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio) @@ -2991,7 +3035,11 @@ Partial Class Inventarios_TraspasoAlmacen MensajeAlert.AppendFormat("", Encripta(String.Format("OP=DesPdfTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimientoTimbrado, "PDF", ObjFactura.SerieFolio, ObjFactura.TipoDocto))) End If - MensajeAlert.AppendFormat("", Encripta(String.Format("OP=CARPO&CVEMOV={0}", CveMovimientoTimbrado))) + If UsuarioActual.Empresa.Funcionalidad(161) = "1" Then + MensajeAlert.AppendFormat("", Encripta(String.Format("OP=CARPOTIMBRE&CVEMOV={0}", CveMovimientoTimbrado))) + Else + MensajeAlert.AppendFormat("", Encripta(String.Format("OP=CARPO&CVEMOV={0}", CveMovimientoTimbrado))) + End If Else MensajeAlert.AppendFormat("
  • {0}
", ObjTimbrado.MensajeErrorCFDI) diff --git a/Nomina/ChecadorAsistencia.aspx b/Nomina/ChecadorAsistencia.aspx index 01a90f0c2..bcd279f98 100644 --- a/Nomina/ChecadorAsistencia.aspx +++ b/Nomina/ChecadorAsistencia.aspx @@ -115,11 +115,40 @@ - + +
+
+
+ + Historial de Modificación +
+
+
+
+
+
+
+ + + + + + + + + + + + + + + +
+
- - - - - - - - - -
- -
-
-
- - - - - -
- - - - -
-
- -
- - - - -
-
-
-
-
-
@@ -262,6 +252,43 @@
+ + + + + + + + + + + + + + + + +
+ + + + +
+
+ + + +
+
+ + + + + + +
+
<%--
@@ -332,7 +359,13 @@ -
+
+ +
+ +
+
+
diff --git a/Nomina/ChecadorAsistencia.aspx.cs b/Nomina/ChecadorAsistencia.aspx.cs index f4fa8aec6..72a8e28da 100644 --- a/Nomina/ChecadorAsistencia.aspx.cs +++ b/Nomina/ChecadorAsistencia.aspx.cs @@ -61,7 +61,7 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas private DataTable generateTable() { DateTime FechaI = TxtRpdFechaInicio.Text.ToDateTime(); - DateTime FechaF = TxtRpdFechaFin.Text.ToDateTime(); + DateTime FechaF = TxtRpdFechaFin.Text.ToDateTime().AddDays(1); DataTable dtCon = new DataTable(); dtCon.Columns.Add(new DataColumn("Codigo", typeof(string))); dtCon.Columns.Add(new DataColumn("Empleado", typeof(string))); @@ -98,12 +98,14 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas string asistencia2 = ""; string Horas2 = ""; + string HoraExtraPorAutorizar2 = ""; if (dtx.Rows.Count > 1) { DataRow drf = dtx.Rows[1]; asistencia2 = ""; TipoAsis = drf["TipoAsistencia"].ToString(); Horas2 = drf["Horas"].ToString(); + HoraExtraPorAutorizar2 = drf["HoraExtraPorAutorizar"].ToString().ToEntero() > 0 ? string.Format("({0:0.##})", drf["HoraExtraPorAutorizar"]) : ""; switch (drf["Tipo"].ToString().ToEntero()) { case 1: @@ -131,6 +133,7 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas } string asistencia = ""; TipoAsis = drfec["TipoAsistencia"].ToString(); + string HoraExtraPorAutorizar = drfec["HoraExtraPorAutorizar"].ToString().ToEntero() > 0 ? string.Format("({0:0.##})", drfec["HoraExtraPorAutorizar"]) : ""; switch (drfec["Tipo"].ToString().ToEntero()) { case 1: @@ -155,7 +158,7 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas default: break; } - drow[FechaCol] = string.Format("
{0}
{1}
{2}
{3}
", asistencia, drfec["Horas"], asistencia2, Horas2); + drow[FechaCol] = string.Format("
{0}
{1}{2}
{3}
{4}{5}
", asistencia, drfec["Horas"], HoraExtraPorAutorizar, asistencia2, Horas2, HoraExtraPorAutorizar2); //drow[FechaCol] = string.Format("{0}
{1:HH}:{1:mm} - {2:HH}:{2:mm}", asistencia, drfec["Entrada"], drfec["Salida"]); } else @@ -188,6 +191,29 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas DataTable dtCon = generateTable(); GvNominas.DataSource = dtCon; GvNominas.DataBind(); + DateTime fechai = TxtFecha.Text.ToDateTime(); + DateTime fechaf = fechai.AddDays(1); + using (ClsGenerales ObjGral = new ClsGenerales()) { + if (ObjGral.GetHistorialBitacora(-1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa, FechaInicio: fechai.ToString("yyyy/MM/dd"), FechaFin: fechai.ToString("yyyy/MM/dd"))) + { + GvBitacora.DataSource = ObjGral.DtResultados; + GvBitacora.DataBind(); + } + + } + /* + + If CvePersonal > 0 Then + Dim ObjGral As New ClsGenerales() + If ObjGral.GetHistorialBitacora(-1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal) Then + GvBitacora.DataSource = ObjGral.DtResultados + End If + ObjGral.Dispose() + GvBitacora.DataBind() + UpHistorialModificacion.Update() + End If + */ + UpDatos.Update(); } @@ -273,9 +299,10 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas protected void LnkAgregarRegistro_Click(object sender, EventArgs e) { + DateTime fechaing = string.Format("{0:dd-MM-yyyy} {0:HH}:{0:mm}:{1:00}", TxtFechaIngreso.Text.ToDateTimeExcat(), TxtSegundos.Text.ToEntero()).ToDateTimeExcat("dd-MM-yyyy HH:mm:ss"); bool continuar = false; List items = new List(); - items.Add(new RequestAddChecadorRegistro() { CveChecador = DdlChecador.SelectedValue.ToEntero(), CvePersonal = DdlmcPersonal.SelectedValue.ToEntero(), ChecadorID = -1, Fecha = TxtFechaIngreso.Text.ToDateTimeExcat() }); + items.Add(new RequestAddChecadorRegistro() { CveChecador = DdlChecador.SelectedValue.ToEntero(), CvePersonal = DdlmcPersonal.SelectedValue.ToEntero(), ChecadorID = -1, Fecha = fechaing }); using (ClsRH objrh = new ClsRH()) { objrh.IniciaTransacSQL(); @@ -294,7 +321,7 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas } if (continuar) { - Alert(string.Format("La asistencia se a agregado ({0:dd-MM-yyyy HH:mm}).", TxtFechaIngreso.Text.ToDateTimeExcat()), ModExtensiones.TipoMensaje.ToastInformacion); + Alert(string.Format("La asistencia se a agregado ({0:dd-MM-yyyy HH:mm:ss}).", fechaing), ModExtensiones.TipoMensaje.ToastInformacion); } if (!chkcontinuarAgregando.Checked) { @@ -316,9 +343,8 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas DropDownList DdlAsisProyectoB = (DropDownList)e.Row.FindControl("DdlAsisProyecto"); DropDownList DdlAsisSubProyectoB = (DropDownList)e.Row.FindControl("DdlAsisSubProyecto"); Label LblAsisProyectoB = (Label)e.Row.FindControl("LblAsisProyecto"); - Label LblAsisSubProyectoB = (Label)e.Row.FindControl("LblAsisSubProyecto"); + //Label LblAsisSubProyectoB = (Label)e.Row.FindControl("LblAsisSubProyecto"); Panel PnlProyectoB = (Panel)e.Row.FindControl("PnlProyecto"); - Panel PnlSubProyectoB = (Panel)e.Row.FindControl("PnlSubProyecto"); DdlTipoAsistenciasB.DataSource = GlobalDTAsistenciasInasistencias.FiltraParametros(string.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa)); DdlTipoAsistenciasB.DataBind(); @@ -331,9 +357,8 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas LblAsisSubProyectoB.Text = LblAsisSubProyecto.Text; */ - CargarCentrosDeCosto(DdlAsisProyectoB, DdlAsisSubProyectoB, LblAsisProyectoB, LblAsisSubProyectoB); + CargarCentrosDeCosto(DdlAsisProyectoB, DdlAsisSubProyectoB, LblAsisProyectoB, LblAsisSubProyecto); PnlProyectoB.Visible = PnlProyecto.Visible; - PnlSubProyectoB.Visible = PnlSubProyectoB.Visible; DdlTipoAsistenciasB.SelectedValueExist(CveAsistenciasInasistencias); DdlAsisProyectoB.SelectedValueExist(CveProyecto); DdlAsisSubProyectoB.SelectedValueExist(CveSubProyecto); @@ -343,6 +368,7 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas protected void BtnEstusAsistenciaModal_Click(object sender, EventArgs e) { + bool continuar = true; DateTime fecha = TxtFecha.Text.ToDateTime(); int CvePersonal = TxtCvePersonal.Text.ToEntero(); List registros = new List(); @@ -356,17 +382,37 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas DropDownList DdlTipoAsistenciasB = (DropDownList)row.FindControl("DdlTipoAsistencias"); DropDownList DdlAsisProyectoB = (DropDownList)row.FindControl("DdlAsisProyecto"); DropDownList DdlAsisSubProyectoB = (DropDownList)row.FindControl("DdlAsisSubProyecto"); + TextBox TxtMotivo = (TextBox)row.FindControl("TxtMotivo"); RequestUpAsistenciaDetalle obj = new RequestUpAsistenciaDetalle(); obj.CveAsistenciaDetalle = CveAsistenciaDetalle; obj.CveAsistenciasInasistencias = DdlTipoAsistenciasB.SelectedValue.ToEntero(); obj.CveSubProyecto = DdlAsisSubProyectoB.SelectedValue.ToEntero(); obj.CvePersonal = CvePersonal; obj.Fecha = fecha; + obj.Motivo = TxtMotivo.Text.Trim(); + if (obj.Motivo.Length == 0 && CveAsistenciasInasistencias != obj.CveAsistenciasInasistencias) + { + continuar = false; + break; + } registros.Add(obj); } - using (ClsRH objRH = new ClsRH()) + if (continuar) { - objRH.UpAsistenciaDetalle(UsuarioActual.CveEmpresa, registros); + using (ClsRH objRH = new ClsRH()) + { + if (objRH.UpAsistenciaDetalle(UsuarioActual.CveEmpresa,UsuarioActual.CveUsuario, registros)) + { + Alert("Se ha guardado la asistencia satisfactoriamente"); + RegistraScript("$('#divDetallesDia').modal('hide');"); + LnkConsultar_Click(null, null); + } + } + } + else + { + + Alert("El campo motivo es requerido favor de llenarlo",ModExtensiones.TipoMensaje.MsgAdvertencia); } //int CvePersonal = TxtasiscvePersonal.Text.ToEntero(); //DateTime fecha = TxtasisFecha.Text.ToDate(); @@ -377,8 +423,7 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas // TxtHorasTriples.Text.Trim().ToDouble(), DdlMotivoHoraExtra.SelectedValue.ToEntero(), TxtObservaciones.Text.Trim(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) // { // //Alert(string.Format("se ha guardado la asistencia satisfactoriamente
{0}
{1:dd/MM/yyyy}", TxtPersonal.Text, TxtasisFecha.Text.ToDate()), TipoMensaje.ToastInformacion); - // Alert("Se ha guardado la asistencia satisfactoriamente"); - // RegistraScript("$('#DModalModAsistencia').modal('hide');"); + // } //} diff --git a/RH/Personal.aspx b/RH/Personal.aspx index 4b9ac86db..d6bb8052a 100644 --- a/RH/Personal.aspx +++ b/RH/Personal.aspx @@ -566,11 +566,13 @@
- +
+ + +
-
@@ -3973,9 +3975,9 @@
+
-
@@ -4003,9 +4005,9 @@
-
+
<%-- MODAL BITACORA --%>
- <%----%> - - - - + + + + + diff --git a/Ventas/CatClientes.aspx.vb b/Ventas/CatClientes.aspx.vb index 33a704d22..51f83bd8f 100644 --- a/Ventas/CatClientes.aspx.vb +++ b/Ventas/CatClientes.aspx.vb @@ -85,11 +85,22 @@ Partial Class CatClientes DdlClasificaciones.Items.Insert(0, New ListItem("Todas", "-1")) End Sub Private Sub CargaNombreClientes() - DdlClienteAUnificar.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa) - DdlClienteAUnificar.DataBind() - DdlClienteOriginal.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa) - DdlClienteOriginal.DataBind() + DdlClienteAUnificar.setEsWebService(True) + DdlClienteAUnificar.SelectedValue = "-1" + DdlClienteAUnificar.SelectedText = "Todos" + + + DdlClienteOriginal.setEsWebService(True) + DdlClienteOriginal.SelectedValue = "-1" + DdlClienteOriginal.SelectedText = "Todos" + + 'DdlClienteAUnificar.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa) + 'DdlClienteAUnificar.DataBind() + + 'DdlClienteOriginal.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa) + 'DdlClienteOriginal.DataBind() + UpBodyUnificar.Update() End Sub diff --git a/vwd.webinfo b/vwd.webinfo index 9e94f3578..b334a4a44 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -314,6 +314,12 @@ + + + + + +