-- globaldt tipo de venta.

This commit is contained in:
2023-11-22 09:30:02 -07:00
parent e5d409f8b2
commit 6a72ca1b74
2 changed files with 7 additions and 5 deletions

View File

@@ -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

View File

@@ -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