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/ClsAcarreos.vb b/App_Code/ClsAcarreos.vb index 6c42c9419..0c1a3abe6 100644 --- a/App_Code/ClsAcarreos.vb +++ b/App_Code/ClsAcarreos.vb @@ -1350,11 +1350,12 @@ Public Class ClsAcarreos 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/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..ca229a5e4 100644 --- a/App_Code/ClsClaseBase.vb +++ b/App_Code/ClsClaseBase.vb @@ -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..e594b96c2 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -3327,22 +3327,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 +3474,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..8f4ffb729 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -2878,11 +2878,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/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..1b1a08d6f 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -2141,11 +2141,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..455ae5763 100644 --- a/App_Code/ClsRH.vb +++ b/App_Code/ClsRH.vb @@ -7111,10 +7111,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 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/Ventas/CatClientes.aspx b/Ventas/CatClientes.aspx index 762d4efb9..bd1869aa2 100644 --- a/Ventas/CatClientes.aspx +++ b/Ventas/CatClientes.aspx @@ -473,47 +473,7 @@ - <%--