From 6a72ca1b742636373f4d4d5f0e726057538dfd20 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 22 Nov 2023 09:30:02 -0700 Subject: [PATCH] -- globaldt tipo de venta. --- App_Code/ClsPaginas.vb | 6 +++--- App_Code/ClsVentas.vb | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index f925e5065..bcc544f2b 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -2126,17 +2126,17 @@ Public Class ClsPaginas Property GlobalDTTipoVenta(Optional CveEmpresa As Integer = -1) As DataTable Get - Dim AppNombre As String = $"GlobalDTTipoVenta" + Dim AppNombre As String = $"GlobalDTTipoVenta-{CveEmpresa}" 'sino existe, recarga los datos If Application(AppNombre) Is Nothing Then Dim ObjVentas As New ClsVentas - If ObjVentas.GetTipoVenta() Then Application(AppNombre) = ObjVentas.DtResultados + If ObjVentas.GetTipoVenta(CveEmpresa) Then Application(AppNombre) = ObjVentas.DtResultados ObjVentas.Dispose() End If GlobalDTTipoVenta = DirectCast(Application(AppNombre), DataTable) End Get Set(value As DataTable) - Dim AppNombre As String = $"GlobalDTTipoVenta" + Dim AppNombre As String = $"GlobalDTTipoVenta-{CveEmpresa}" Application(AppNombre) = value End Set End Property diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 4c1bf4982..6f2f06af9 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -5953,10 +5953,12 @@ Public Class ClsVentas #Region "TIPO VENTA" - Public Function GetTipoVenta() As Boolean - + Public Function GetTipoVenta(CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_TipoVentaGet") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With Try SqlAdapter.Fill(Data) Retorno = True