nuevo globaldt de cuentas contables

This commit is contained in:
2023-06-10 10:06:35 -07:00
parent 6daf282654
commit 3dc213e1d3

View File

@@ -3519,6 +3519,33 @@ Public Class ClsPaginas
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Public Shared Property GlobalDTContaCuentasContables(CveEmpresa As Integer, Optional Codigo As String = "-1", Optional Afectable As Integer = -1, Optional CvePadre As Integer = -1) As DataTable
Get
Dim AppNombre As String = $"GlobalDTContaCuentasContables-{CveEmpresa}"
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Using ObjContabilidad As New ClsContabilidad
If ObjContabilidad.GetCuentas(-1, "-1", -1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjContabilidad.DtResultados Else HttpContext.Current.Application(AppNombre) = Nothing
End Using
End If
Dim filtros As New List(Of String)
If Codigo <> "-1" Then filtros.Add($"Codigo = '{Codigo}'")
If Afectable <> -1 Then filtros.Add($"Afectable = {Afectable}")
If CvePadre <> -1 Then filtros.Add($"CvePadre = {CvePadre}")
If filtros.Count > 0 Then
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
GlobalDTContaCuentasContables = Dv.ToTable
Dv.Dispose()
Else
GlobalDTContaCuentasContables = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
End Get
Set(value As DataTable)
Dim AppNombre As String = $"GlobalDTContaCuentasContables-{CveEmpresa}"
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
#End Region
#Region "**********************************************************************GLOBAL DT RH (RECURSOS HUMANOS)********************************************************************"
Property GlobalDTAsistenciaDetalle() As DataTable