-- cmabio en el context GlobalDT_regimenes

This commit is contained in:
2024-01-29 19:59:04 -07:00
parent bd756f901a
commit 0287ecfdb3

View File

@@ -761,29 +761,29 @@ Public Class ClsPaginas
Application(AppNombre) = value
End Set
End Property
Property GlobalDTRegimenesFiscales(Optional TipoPersona As Integer = -1) As DataTable
Public Shared Property GlobalDTRegimenesFiscales(Optional TipoPersona As Integer = -1) As DataTable
Get
Dim AppNombre As String = "GlobalDTRegimenesFiscales"
If Application(AppNombre) Is Nothing Then
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjGral As New ClsSisEmpresas
If ObjGral.GetRegimenFiscal(-1) Then Application(AppNombre) = ObjGral.DtResultados
If ObjGral.GetRegimenFiscal(-1) Then HttpContext.Current.Application(AppNombre) = ObjGral.DtResultados
ObjGral.Dispose()
End If
If TipoPersona <> -1 Then
Dim Str As New StringBuilder
If TipoPersona = 0 Then Str.Append("AplicaPersonaFisica = 1") '0 - Fisica
If TipoPersona = 1 Then Str.Append("AplicaPersonaMoral = 1") '1 - Moral
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
GlobalDTRegimenesFiscales = Dv.ToTable
Dv.Dispose()
Else
GlobalDTRegimenesFiscales = DirectCast(Application(AppNombre), DataTable)
GlobalDTRegimenesFiscales = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTRegimenesFiscales")
Application(AppNombre) = value
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Property GlobalDTNomSatRiesgoPuesto() As DataTable