diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 8c8c7823d..2732e461b 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -7405,6 +7405,26 @@ Public Class ClsVentas End Function + Public Function UpdateVentaAdjunto(CveVenta As Integer, Adjunto As String, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_VentaAdjuntoUpdate") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveVenta", SqlDbType.Int).Value = CveVenta + .Add("@Adjunto", SqlDbType.VarChar).Value = Adjunto + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al actualizar el adjunto de la venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + #Region "IDisposable Support" diff --git a/Inventarios/TrasladoSolicitud.aspx b/Inventarios/TrasladoSolicitud.aspx index 556115b6d..6b3d73883 100644 --- a/Inventarios/TrasladoSolicitud.aspx +++ b/Inventarios/TrasladoSolicitud.aspx @@ -77,18 +77,22 @@ - - - - + - + <%----%> + + + + + + @@ -128,12 +132,17 @@
- + + +
+
@@ -156,7 +165,9 @@
- + <%----%> + +
@@ -182,7 +193,7 @@
diff --git a/Inventarios/TrasladoSolicitud.aspx.vb b/Inventarios/TrasladoSolicitud.aspx.vb index ff86d81a5..763e669aa 100644 --- a/Inventarios/TrasladoSolicitud.aspx.vb +++ b/Inventarios/TrasladoSolicitud.aspx.vb @@ -84,9 +84,10 @@ Partial Class Inventarios_TrasladoSolicitud Private Sub CargaAlmacenes() 'Cargo los almacenes DdlAlmacenOrigen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen <> 9") 'Excluir almacenes de Apartado - DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen <> 9") 'Excluir almacenes de Apartado + 'DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen <> 9") 'Excluir almacenes de Apartado DdlAlmacenOrigen.DataBind() - DdlAlmacenDestino.DataBind() + DdlAlmacenOrigen.Items.Insert(0, New ListItem("Seleccione Uno", "-1")) + 'DdlAlmacenDestino.DataBind() End Sub @@ -493,7 +494,7 @@ Partial Class Inventarios_TrasladoSolicitud Dim FolioEntrada As Integer = 0 Dim TextoError As String = "" - Dim CveConceptoEntrada As Integer = 27 + Dim CveConceptoEntrada As Integer = 9 'AGREGAMOS LA SALIDA DEL ALMACEN ORIGEN @@ -527,7 +528,7 @@ Partial Class Inventarios_TrasladoSolicitud End If Next - 'For Each Dr As DataRow In DtMovimientos.Rows + 'For Each Dr As DataRow In DtMovimientos.RowsF 'Next End If @@ -550,7 +551,7 @@ Partial Class Inventarios_TrasladoSolicitud For Each Dr As DataRow In ObjInventario.DtResultados.Rows Dim CostoEntrada As Decimal = If(TipoAlmacenDestino = 26, 0, Dr("PU").ToString.ToDecimal()) If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, CostoEntrada, CveAF:=-1, - CveSeccionAlmacen:=-1, Serie:="-1", Lote:="-1", FechaCaducidad:=MinFecha, CveMovimientoDetalleEntrada:=-1, Observaciones:="") Then + CveSeccionAlmacen:=-1, Serie:="-1", Lote:="-1", FechaCaducidad:=MinFecha, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, Observaciones:="") Then ErrorMovInv = True TextoError = "Ocurrió un error al guardar los movimientos de entrada" Exit For @@ -621,7 +622,12 @@ Partial Class Inventarios_TrasladoSolicitud ObjInventario.Commit() MensajeAlert.Append("Se realizó con éxito el traspaso.") MensajeAlert.AppendFormat("
Folio de Salida: {0}", FolioSalida, CveMovimientoSalida) - MensajeAlert.AppendFormat("
Imprimir ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoSalida))) + MensajeAlert.AppendFormat("
Imprimir Salida ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoSalida))) + + MensajeAlert.AppendFormat("
Folio de Transitorio: {0}", FolioEntrada, CveMovimientoEntrada) + MensajeAlert.AppendFormat("
Imprimir Transitorio ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoEntrada))) + + Alert(MensajeAlert.ToString, TipoMensaje.MsgInformacion, "") RegistraScript(String.Format("$('#{0}').modal('hide');", "DVModalSolicitud")) Else @@ -672,10 +678,13 @@ Partial Class Inventarios_TrasladoSolicitud If e.Row.DataKey("CveTrasladoEstatus").ToEntero = 1 Then e.Row.FCLinkButton("LnkMostrarTraspaso").CssClass = "btn btn-circle btn-sm blue" + e.Row.FCLabel("LblTraspasoEstatus").CssClass = "label label-sm label-info" Else If e.Row.DataKey("CveTrasladoEstatus").ToEntero = 2 Then + e.Row.FCLabel("LblTraspasoEstatus").CssClass = "label label-sm label-success" e.Row.FCLinkButton("LnkMostrarTraspaso").CssClass = "btn btn-circle btn-sm green" Else + e.Row.FCLabel("LblTraspasoEstatus").CssClass = "label label-sm label-danger" e.Row.FCLinkButton("LnkMostrarTraspaso").CssClass = "btn btn-circle btn-sm red" End If @@ -686,4 +695,16 @@ Partial Class Inventarios_TrasladoSolicitud End If End Sub + + Protected Sub DdlAlmacenOrigen_SelectedIndexChanged(sender As Object, e As EventArgs) + + DdlAlmacenDestino.ClearSelection() + DdlAlmacenDestino.SelectedValue = Nothing + DdlAlmacenDestino.Items.Clear() + + DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros($"CveTipoAlmacen <> 9 AND CveAlmacen <> {DdlAlmacenOrigen.SelectedValue}") + DdlAlmacenDestino.DataBind() + DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione Uno", "-1")) + UpPS.Update() + End Sub End Class diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index a29f07cc5..34c0b0272 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -4299,7 +4299,8 @@
- +    + diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index a28a6fa63..4eec7425f 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -5023,7 +5023,7 @@ Partial Class Ventas If Adjunto <> "" Then BtnArchivoAdjunto.Text = Adjunto BtnArchivoAdjunto.Visible = True - BtnEliminarAdjunto.Visible = False + BtnEliminarAdjunto.Visible = True BtnAdjuntar.Visible = False BtnReemplazarAdjunto.Visible = True End If @@ -6007,7 +6007,7 @@ Partial Class Ventas ObjUsados.Dispose() - BtnsFacturar.Visible = True + BtnsFacturar.Visible = UsuarioActual.TienePermisoProceso(60) 'VERIFICA SI YA SE FACTURO COMPLETAMENTE If TmpDT.SUM("CantidadFacturadaRem") = TmpDT.SUM("Cantidad") Then @@ -6075,7 +6075,7 @@ Partial Class Ventas If DbRowVenta("TipoDocto").ToString().Contiene("Ped") Then 'ACTIVA BOTONERA | DEBE TENER CONCEPTOS PENDIENTES DE FACTURAR If TmpDT.SUM("CantidadFacturadaPed2") < TmpDT.SUM("Cantidad") Then - BtnsFacturar.Visible = True + BtnsFacturar.Visible = UsuarioActual.TienePermisoProceso(60) 'bloquear la facturación de remisiones que no estén surtidas If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then @@ -15630,7 +15630,7 @@ Partial Class Ventas If DT.Rows.Count > 0 Then 'Se agrega movimiento separado por la cuenta de ventas (ER) For Each Row2 As DataRow In DT.Rows - importeMovimiento = (TmpDTDetalle.SUM("Descuento", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador + importeMovimiento = (TmpDTDetalle.SUM("Descuento", String.Format("CveClasificacion = {0} And CveSubProyecto = {1} AND PorcentajeIVA = {2}", Row2("CveClasificacion"), Row2("CveSubProyecto"), Row2("PorcentajeIVA"))).ToString().ToDecimal) * ValorMultiplicador importeMX = importeMovimiento * tipoCambio * Multiplicador FechaMovimiento = ObjFactura.FechaPago Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString().ToEntero() > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"), "")} - {If(Row2("CveSubProyecto").ToString().ToEntero() > 0, GlobalDTSubProyectos(UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString()}"), "Sin SubProyecto Asignado")}" @@ -36306,12 +36306,16 @@ Partial Class Ventas End If My.Computer.FileSystem.MoveFile(fileItem.FileUrl, Path) - If File.Exists(Path) AndAlso Me.CveVenta > 0 Then - Using ObjVta As New ClsVentasTemp - If ObjVta.UpdateVentaAdjunto(Me.CveVenta, Adjunto, UsuarioActual.CveEmpresa) Then - Alert("Documento cargado", TipoMensaje.MsgInformacion) - End If - End Using + If File.Exists(Path) Then + If Me.CveVenta > 0 Then + Using ObjVta As New ClsVentas + If ObjVta.UpdateVentaAdjunto(Me.CveVenta, Adjunto, UsuarioActual.CveEmpresa) Then + Alert("Documento cargado", TipoMensaje.MsgInformacion) + End If + End Using + Else + Alert("Documento cargado", TipoMensaje.MsgInformacion) + End If End If BtnAdjuntar.Visible = False @@ -36360,9 +36364,20 @@ Partial Class Ventas Dim objVentas As New ClsVentas Dim Path As String Path = String.Format("{0}Ventas/{1}", UsuarioActual.Empresa.Ruta, Adjunto) + If File.Exists(Path) Then File.Delete(Path) + + If Me.CveVenta > 0 Then + Using ObjVta As New ClsVentas + If ObjVta.UpdateVentaAdjunto(Me.CveVenta, "", UsuarioActual.CveEmpresa) Then + Alert("Documento eliminado", TipoMensaje.MsgInformacion) + End If + End Using + End If + End If + BtnAdjuntar.Visible = True BtnArchivoAdjunto.Text = "" BtnArchivoAdjunto.Visible = False @@ -38927,181 +38942,161 @@ Partial Class Ventas End Sub - Public Class ClsVentasTemp - Implements IDisposable + 'Public Class ClsVentasTemp + ' Implements IDisposable -#Region "Campos" + ' 'SQL + ' Private SqlConexion As SqlClient.SqlConnection + ' Private SqlAdapter As SqlClient.SqlDataAdapter + ' Private SqlCommand As SqlClient.SqlCommand + ' Private SqlTransacc As SqlClient.SqlTransaction + ' Private Data As DataTable + ' Private Dataset As DataSet - 'SQL - Private SqlConexion As SqlClient.SqlConnection - Private SqlAdapter As SqlClient.SqlDataAdapter - Private SqlCommand As SqlClient.SqlCommand - Private SqlTransacc As SqlClient.SqlTransaction - Private Data As DataTable - Private Dataset As DataSet + ' 'Atributos de la clase + ' Private disposedValue As Boolean = False ' Para detectar llamadas redundantes + ' Private CveConexion As Integer = 0 + ' Private EsTransaccionCompartida As Boolean = False - 'Atributos de la clase - Private disposedValue As Boolean = False ' Para detectar llamadas redundantes - Private CveConexion As Integer = 0 - Private EsTransaccionCompartida As Boolean = False - -#End Region - -#Region "Propiedades" - Public ReadOnly Property DtResultados() As DataTable - Get - DtResultados = Data - End Get - End Property - -#End Region - - Public Function IniciaTransacSQL() As SqlClient.SqlTransaction - If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction() - Return SqlTransacc - End Function - - Public Sub Commit() - SqlTransacc.Commit() - End Sub - Public Sub RollBack() - SqlTransacc.Rollback() - End Sub - - Sub New(Optional TransaccionCompartida As SqlClient.SqlTransaction = Nothing, Optional UsuarioActual As Usuario = Nothing) - - If TransaccionCompartida Is Nothing Then - SqlConexion = New SqlClient.SqlConnection - SqlConexion.ConnectionString = If(UsuarioActual IsNot Nothing, UsuarioActual.RutaDB, ClsPaginas.UsuarioActualRutaDB) - - Try - SqlConexion.Open() - Catch ex As Exception - OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex) - End Try - Else - SqlConexion = TransaccionCompartida.Connection - SqlTransacc = TransaccionCompartida - EsTransaccionCompartida = True - End If - SqlAdapter = New SqlClient.SqlDataAdapter("", SqlConexion) - ConexionAdd() - - End Sub - Private Sub DataAdapter(ByVal pStrSQL As String, Optional ByVal TipoComando As CommandType = CommandType.StoredProcedure) - With SqlAdapter.SelectCommand - .Parameters.Clear() - .CommandText = pStrSQL - .CommandType = TipoComando - End With - If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc - Data = New DataTable - End Sub - -#Region "Conexiones" - - Private Sub ConexionAdd() - If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then - Try - DataAdapter("PA_Sis_RegistrarConexion") - With SqlAdapter.SelectCommand.Parameters - .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name - .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) - .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output - End With - SqlAdapter.Fill(Data) - CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero - Catch ex As Exception - OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try - - End If - End Sub - - Private Sub ConexionClose() - If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then - - DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) - - Try - SqlAdapter.Fill(Data) - - Catch ex As Exception - OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try - CveConexion = 0 - End If - - End Sub -#End Region + ' Public ReadOnly Property DtResultados() As DataTable + ' Get + ' DtResultados = Data + ' End Get + ' End Property - Public Function UpdateVentaAdjunto(CveVenta As Integer, Adjunto As String, CveEmpresa As Integer) As Boolean - Dim Retorno As Boolean = False - DataAdapter("PA_Vta_VentaAdjuntoUpdate") + ' Public Function IniciaTransacSQL() As SqlClient.SqlTransaction + ' If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction() + ' Return SqlTransacc + ' End Function - With SqlAdapter.SelectCommand.Parameters - .Add("@CveVenta", SqlDbType.Int).Value = CveVenta - .Add("@Adjunto", SqlDbType.VarChar).Value = Adjunto - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - End With + ' Public Sub Commit() + ' SqlTransacc.Commit() + ' End Sub + ' Public Sub RollBack() + ' SqlTransacc.Rollback() + ' End Sub - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - OnError("Ocurrió un error al actualizar el adjunto de la venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try + ' Sub New(Optional TransaccionCompartida As SqlClient.SqlTransaction = Nothing, Optional UsuarioActual As Usuario = Nothing) - Return Retorno - End Function + ' If TransaccionCompartida Is Nothing Then + ' SqlConexion = New SqlClient.SqlConnection + ' SqlConexion.ConnectionString = If(UsuarioActual IsNot Nothing, UsuarioActual.RutaDB, ClsPaginas.UsuarioActualRutaDB) + + ' Try + ' SqlConexion.Open() + ' Catch ex As Exception + ' OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex) + ' End Try + ' Else + ' SqlConexion = TransaccionCompartida.Connection + ' SqlTransacc = TransaccionCompartida + ' EsTransaccionCompartida = True + ' End If + ' SqlAdapter = New SqlClient.SqlDataAdapter("", SqlConexion) + ' ConexionAdd() + + ' End Sub + ' Private Sub DataAdapter(ByVal pStrSQL As String, Optional ByVal TipoComando As CommandType = CommandType.StoredProcedure) + ' With SqlAdapter.SelectCommand + ' .Parameters.Clear() + ' .CommandText = pStrSQL + ' .CommandType = TipoComando + ' End With + ' If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc + ' Data = New DataTable + ' End Sub + + ' Private Sub ConexionAdd() + ' If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then + ' Try + ' DataAdapter("PA_Sis_RegistrarConexion") + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name + ' .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) + ' .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output + ' End With + ' SqlAdapter.Fill(Data) + ' CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero + ' Catch ex As Exception + ' OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ' End Try + + ' End If + ' End Sub + + ' Private Sub ConexionClose() + ' If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then + + ' DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) + + ' Try + ' SqlAdapter.Fill(Data) + + ' Catch ex As Exception + ' OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ' End Try + ' CveConexion = 0 + ' End If + + ' End Sub -#Region "IDisposable Support" + ' Public Function UpdateVentaAdjunto(CveVenta As Integer, Adjunto As String, CveEmpresa As Integer) As Boolean + ' Dim Retorno As Boolean = False + ' DataAdapter("PA_Vta_VentaAdjuntoUpdate") + + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("@CveVenta", SqlDbType.Int).Value = CveVenta + ' .Add("@Adjunto", SqlDbType.VarChar).Value = Adjunto + ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + ' End With + + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As Exception + ' OnError("Ocurrió un error al actualizar el adjunto de la venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ' End Try + + ' Return Retorno + ' End Function - ' IDisposable - Protected Overridable Sub Dispose(disposing As Boolean) - If Not Me.disposedValue Then - If disposing Then - ' TODO: dispose managed state (managed objects). + ' ' 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 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 + ' 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 + ' 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 + ' ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. + ' ' TODO: set large fields to null. + ' End If + ' Me.disposedValue = True + ' End Sub - ' TODO: override Finalize() only if Dispose(disposing As Boolean) above has code to free unmanaged resources. - 'Protected Overrides Sub Finalize() - ' ' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above. - ' Dispose(False) - ' MyBase.Finalize() - 'End Sub - - ' This code added by Visual Basic to correctly implement the disposable pattern. - Public Sub Dispose() Implements IDisposable.Dispose - ' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above. - ConexionClose() - Dispose(True) - GC.SuppressFinalize(Me) - End Sub -#End Region - End Class + ' ' This code added by Visual Basic to correctly implement the disposable pattern. + ' Public Sub Dispose() Implements IDisposable.Dispose + ' ' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above. + ' ConexionClose() + ' Dispose(True) + ' GC.SuppressFinalize(Me) + ' End Sub + 'End Class End Class