From 4eaab553d4373889dd1a06d3fb31d35de211a564 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 28 May 2020 13:50:20 -0700 Subject: [PATCH] - permiso proceso 68, bloqueo de txtprecio --- App_Code/ClsBancos.vb | 9 ++++++--- App_Code/ClsCompras.vb | 6 ++++-- Ventas/Ventas.aspx.vb | 4 ++++ vwd.webinfo | 4 ++++ 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index 7ac9a2082..64e685e71 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -26,6 +26,9 @@ Public Class ClsBancos 'Atributos de la clase Private disposedValue As Boolean = False ' Para detectar llamadas redundantes + 'CONTROL DE LA CONEXION + Private CveConexion As Integer = 0 + Private EsTransaccionCompartida As Boolean = False #End Region @@ -50,8 +53,7 @@ Public Class ClsBancos Public Property FechaIngCancelacion As Date Public Property FechaCancelacion As Date - 'CONTROL DE LA CONEXION - Private CveConexion As Integer = 0 + #End Region #Region " P R O P I E D A D E S - B A N C O S - I E" @@ -189,6 +191,7 @@ Public Class ClsBancos Else SqlConexion = TransaccionCompartida.Connection SqlTransacc = TransaccionCompartida + EsTransaccionCompartida = True End If SqlCommand = New SqlCommand("", SqlConexion) @@ -209,7 +212,7 @@ Public Class ClsBancos #Region "Conexiones" Private Sub ConexionAdd() - If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then + 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 diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb index b7a1e8828..7f1873b42 100644 --- a/App_Code/ClsCompras.vb +++ b/App_Code/ClsCompras.vb @@ -22,6 +22,7 @@ Public Class ClsCompras Private disposedValue As Boolean = False ' Para detectar llamadas redundantes 'REGISTRAR CONEXIONES ABIERTAS Private CveConexion As Integer = 0 + Private EsTransaccionCompartida As Boolean = False #End Region @@ -62,7 +63,8 @@ Public Class ClsCompras End Try Else SqlConexion = TransaccionCompartida.Connection - SqlTransacc = TransaccionCompartida + SqlTransacc = TransaccionCompartida + EsTransaccionCompartida = True End If SqlAdapter = New SqlDataAdapter("", SqlConexion) @@ -83,7 +85,7 @@ Public Class ClsCompras #Region "Conexiones" Private Sub ConexionAdd() - If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then + 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 diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 17ef65fca..7e88fa978 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -5728,6 +5728,8 @@ Partial Class Ventas End If + If UsuarioActual.TienePermisoProceso(68) Then e.Row.FCTextBox("TxtPrecio").Enabled = False + 'Si es una devolucion If NuevaFactura = 0 Then e.Row.FCDropDownList("DdlUnidadMedida").Enabled = False @@ -13727,6 +13729,8 @@ Partial Class Ventas TxtPrecio.Enabled = True End If + If UsuarioActual.TienePermisoProceso(68) Then TxtPrecio.Enabled = False + If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count = 0 Then DdlMoneda.SelectedValueExist(drPS("CveMoneda").ToString()) CambiaMoneda() diff --git a/vwd.webinfo b/vwd.webinfo index 7db700c64..c8632d677 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -60,6 +60,10 @@ + + + +