Refactorización de código: Mover más GlobalDTs a ClsPaginas.vb y que se carguen solo cuando se ocupen
This commit is contained in:
@@ -1248,7 +1248,7 @@ Public Class ClsGenerales
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "C O L E C T I V A S"
|
#Region "C O L E C T I V A S"
|
||||||
Public Function GetColectivas(CveColectiva As Integer, Colectiva As String, Codigo As String, Tipo As String, CveEmpresa As Integer) As Boolean
|
Public Function GetColectivas(Optional CveColectiva As Integer = -1, Optional Colectiva As String = "-1", Optional Codigo As String = "-1", Optional Tipo As String = "-1", Optional CveEmpresa As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Gral_ColectivasGet")
|
DataAdapter("PA_Gral_ColectivasGet")
|
||||||
|
|
||||||
|
|||||||
@@ -375,61 +375,96 @@ Public Class ClsPaginas
|
|||||||
|
|
||||||
Property GlobalDTFraccionArancelaria() As DataTable
|
Property GlobalDTFraccionArancelaria() As DataTable
|
||||||
Get
|
Get
|
||||||
GlobalDTFraccionArancelaria = DirectCast(Application("GlobalDTFraccionArancelaria"), EnumerableRowCollection(Of DataRow)).CopyToDataTable
|
Dim AppNombre As String = "GlobalDTFraccionArancelaria"
|
||||||
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
|
Dim ObjGrales As New ClsGenerales
|
||||||
|
If ObjGrales.GetSATFraccionArancelaria() Then Application(AppNombre) = ObjGrales.DtResultados.AsEnumerable()
|
||||||
|
ObjGrales.Dispose()
|
||||||
|
End If
|
||||||
|
GlobalDTFraccionArancelaria = DirectCast(Application(AppNombre), EnumerableRowCollection(Of DataRow)).CopyToDataTable
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTFraccionArancelaria") = value
|
Dim AppNombre As String = "GlobalDTFraccionArancelaria"
|
||||||
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Property GlobalDTIncoterm() As DataTable
|
Property GlobalDTIncoterm() As DataTable
|
||||||
Get
|
Get
|
||||||
GlobalDTIncoterm = DirectCast(Application("GlobalDTIncoterm"), DataTable)
|
Dim AppNombre As String = "GlobalDTIncoterm"
|
||||||
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
|
Dim ObjGrales As New ClsGenerales
|
||||||
|
If ObjGrales.GetSATIncoterm() Then Application(AppNombre) = ObjGrales.DtResultados
|
||||||
|
ObjGrales.Dispose()
|
||||||
|
End If
|
||||||
|
GlobalDTIncoterm = DirectCast(Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTIncoterm") = value
|
Dim AppNombre As String = "GlobalDTIncoterm"
|
||||||
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Property GlobalDTTipoOperacion() As DataTable
|
Property GlobalDTTipoOperacion() As DataTable
|
||||||
Get
|
Get
|
||||||
GlobalDTTipoOperacion = DirectCast(Application("GlobalDTTipoOperacion"), DataTable)
|
Dim AppNombre As String = "GlobalDTTipoOperacion"
|
||||||
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
|
Dim ObjGrales As New ClsGenerales
|
||||||
|
If ObjGrales.GetSATTipoOperacion() Then Application(AppNombre) = ObjGrales.DtResultados
|
||||||
|
ObjGrales.Dispose()
|
||||||
|
End If
|
||||||
|
GlobalDTTipoOperacion = DirectCast(Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTTipoOperacion") = value
|
Dim AppNombre As String = "GlobalDTTipoOperacion"
|
||||||
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Property GlobalDTSATMotivoTraslado() As DataTable
|
Property GlobalDTSATMotivoTraslado() As DataTable
|
||||||
Get
|
Get
|
||||||
GlobalDTSATMotivoTraslado = DirectCast(Application("GlobalDTSATMotivoTraslado"), DataTable)
|
Dim AppNombre As String = "GlobalDTSATMotivoTraslado"
|
||||||
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
|
Dim ObjGrales As New ClsGenerales
|
||||||
|
If ObjGrales.GetSATMotivoTraslado() Then Application(AppNombre) = ObjGrales.DtResultados
|
||||||
|
ObjGrales.Dispose()
|
||||||
|
End If
|
||||||
|
GlobalDTSATMotivoTraslado = DirectCast(Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTSATMotivoTraslado") = value
|
Dim AppNombre As String = "GlobalDTSATMotivoTraslado"
|
||||||
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Property GlobalDTUnidadAduana() As DataTable
|
Property GlobalDTUnidadAduana() As DataTable
|
||||||
Get
|
Get
|
||||||
GlobalDTUnidadAduana = DirectCast(Application("GlobalDTUnidadAduana"), DataTable)
|
Dim AppNombre As String = "GlobalDTUnidadAduana"
|
||||||
End Get
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
Set(value As DataTable)
|
|
||||||
Application("GlobalDTUnidadAduana") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
|
|
||||||
Property GlobalDTGralPaises() As DataTable
|
|
||||||
Get
|
|
||||||
If Application("GlobalDTGralPaises") Is Nothing Then
|
|
||||||
Dim ObjGrales As New ClsGenerales
|
Dim ObjGrales As New ClsGenerales
|
||||||
If ObjGrales.GetSATPais() Then Application("GlobalDTGralPaises") = ObjGrales.DtResultados Else Application("GlobalDTGralPaises") = Nothing
|
If ObjGrales.GetSATUnidadesAduana() Then Application(AppNombre) = ObjGrales.DtResultados
|
||||||
ObjGrales.Dispose()
|
ObjGrales.Dispose()
|
||||||
End If
|
End If
|
||||||
GlobalDTGralPaises = DirectCast(Application("GlobalDTGralPaises"), DataTable)
|
GlobalDTUnidadAduana = DirectCast(Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTGralPaises") = value
|
Dim AppNombre As String = "GlobalDTUnidadAduana"
|
||||||
|
Application(AppNombre) = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Property GlobalDTGralPaises() As DataTable
|
||||||
|
Get
|
||||||
|
Dim AppNombre As String = "GlobalDTGralPaises"
|
||||||
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
|
Dim ObjGrales As New ClsGenerales
|
||||||
|
If ObjGrales.GetSATPais() Then Application(AppNombre) = ObjGrales.DtResultados
|
||||||
|
ObjGrales.Dispose()
|
||||||
|
End If
|
||||||
|
GlobalDTGralPaises = DirectCast(Application(AppNombre), DataTable)
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
Dim AppNombre As String = "GlobalDTGralPaises"
|
||||||
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTGralEstados(ClaveSATPais As String, Optional CvePais As Integer = -1) As DataTable
|
Property GlobalDTGralEstados(ClaveSATPais As String, Optional CvePais As Integer = -1) As DataTable
|
||||||
@@ -437,7 +472,7 @@ Public Class ClsPaginas
|
|||||||
Dim AppNombre As String = "GlobalDTGralEstados"
|
Dim AppNombre As String = "GlobalDTGralEstados"
|
||||||
If Application(AppNombre) Is Nothing Then
|
If Application(AppNombre) Is Nothing Then
|
||||||
Dim ObjGrales As New ClsGenerales
|
Dim ObjGrales As New ClsGenerales
|
||||||
If ObjGrales.GetSATEstado("-1") Then Application(AppNombre) = ObjGrales.DtResultados Else Application(AppNombre) = Nothing
|
If ObjGrales.GetSATEstado("-1") Then Application(AppNombre) = ObjGrales.DtResultados
|
||||||
ObjGrales.Dispose()
|
ObjGrales.Dispose()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -463,7 +498,7 @@ Public Class ClsPaginas
|
|||||||
Dim AppNombre As String = "GlobalDTGralMunicipios"
|
Dim AppNombre As String = "GlobalDTGralMunicipios"
|
||||||
If Application(AppNombre) Is Nothing Then
|
If Application(AppNombre) Is Nothing Then
|
||||||
Dim ObjGrales As New ClsGenerales
|
Dim ObjGrales As New ClsGenerales
|
||||||
If ObjGrales.GetSATMunicipio("-1") Then Application(AppNombre) = ObjGrales.DtResultados Else Application(AppNombre) = Nothing
|
If ObjGrales.GetSATMunicipio("-1") Then Application(AppNombre) = ObjGrales.DtResultados
|
||||||
ObjGrales.Dispose()
|
ObjGrales.Dispose()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -490,7 +525,7 @@ Public Class ClsPaginas
|
|||||||
If Application("GlobalDTLocalidad") Is Nothing Then
|
If Application("GlobalDTLocalidad") Is Nothing Then
|
||||||
|
|
||||||
Dim ObjGrales As New ClsGenerales
|
Dim ObjGrales As New ClsGenerales
|
||||||
If ObjGrales.GetSATLocalidad(-1, -1) Then Application("GlobalDTLocalidad") = ObjGrales.DtResultados Else Application("GlobalDTLocalidad") = Nothing
|
If ObjGrales.GetSATLocalidad(-1, -1) Then Application("GlobalDTLocalidad") = ObjGrales.DtResultados
|
||||||
ObjGrales.Dispose()
|
ObjGrales.Dispose()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -523,14 +558,13 @@ Public Class ClsPaginas
|
|||||||
|
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
Property GlobalDTGralColonias(ClaveSATEstado As String, ClaveSATMunicipio As String, ClaveSATColonia As String,
|
Property GlobalDTGralColonias(ClaveSATEstado As String, ClaveSATMunicipio As String, ClaveSATColonia As String,
|
||||||
Optional CveMunicipio As Integer = -1, Optional CodigoPostal As Integer = -1, Optional CveColonia As Integer = -1) As DataTable
|
Optional CveMunicipio As Integer = -1, Optional CodigoPostal As Integer = -1, Optional CveColonia As Integer = -1) As DataTable
|
||||||
Get
|
Get
|
||||||
Dim AppNombre As String = "GlobalDTGralColonias"
|
Dim AppNombre As String = "GlobalDTGralColonias"
|
||||||
If Application(AppNombre) Is Nothing Then
|
If Application(AppNombre) Is Nothing Then
|
||||||
Dim ObjGrales As New ClsGenerales
|
Dim ObjGrales As New ClsGenerales
|
||||||
If ObjGrales.GetSATColonia("-1", "-1", "-1") Then Application(AppNombre) = ObjGrales.DtResultados Else Application(AppNombre) = Nothing
|
If ObjGrales.GetSATColonia("-1", "-1", "-1") Then Application(AppNombre) = ObjGrales.DtResultados
|
||||||
ObjGrales.Dispose()
|
ObjGrales.Dispose()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -561,7 +595,7 @@ Public Class ClsPaginas
|
|||||||
Get
|
Get
|
||||||
If Application("GlobalDTPSATUM") Is Nothing Then
|
If Application("GlobalDTPSATUM") Is Nothing Then
|
||||||
Dim ObjGrales As New ClsGenerales
|
Dim ObjGrales As New ClsGenerales
|
||||||
If ObjGrales.GetSATUnidadMedida Then Application("GlobalDTPSATUM") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATUM") = Nothing
|
If ObjGrales.GetSATUnidadMedida Then Application("GlobalDTPSATUM") = ObjGrales.DtResultados.AsEnumerable()
|
||||||
ObjGrales.Dispose()
|
ObjGrales.Dispose()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -1007,18 +1041,36 @@ Public Class ClsPaginas
|
|||||||
End Property
|
End Property
|
||||||
Property GlobalDTFamilias(Optional CveEmpresa As Integer = -1) As DataTable
|
Property GlobalDTFamilias(Optional CveEmpresa As Integer = -1) As DataTable
|
||||||
Get
|
Get
|
||||||
If CveEmpresa <> -1 Then
|
Dim AppNombre As String = $"GlobalDTFamilias-{CveEmpresa}"
|
||||||
|
'sino existe, recarga los datos
|
||||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTFamilias"), DataTable), String.Format("CveEmpresa = {0} ", CveEmpresa), "", DataViewRowState.CurrentRows)
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
GlobalDTFamilias = Dv.ToTable
|
Dim ObjGenerales As New ClsGenerales
|
||||||
Dv.Dispose()
|
If ObjGenerales.GetCategorias(CveEmpresa, 2) Then Application(AppNombre) = ObjGenerales.DtResultados
|
||||||
Else
|
ObjGenerales.Dispose()
|
||||||
GlobalDTFamilias = DirectCast(Application("GlobalDTFamilias"), DataTable)
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
GlobalDTFamilias = DirectCast(Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTFamilias") = value
|
Dim AppNombre As String = $"GlobalDTFamilias-{CveEmpresa}"
|
||||||
|
Application(AppNombre) = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Property GlobalDTCategoriasPresupuestos(Optional CveEmpresa As Integer = -1) As DataTable
|
||||||
|
Get
|
||||||
|
Dim AppNombre As String = $"GlobalDTCategoriasPresupuestos-{CveEmpresa}"
|
||||||
|
'sino existe, recarga los datos
|
||||||
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
|
Dim ObjGenerales As New ClsGenerales
|
||||||
|
If ObjGenerales.GetCategorias(CveEmpresa, 3) Then Application(AppNombre) = ObjGenerales.DtResultados
|
||||||
|
ObjGenerales.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
GlobalDTCategoriasPresupuestos = DirectCast(Application(AppNombre), DataTable)
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
Dim AppNombre As String = $"GlobalDTCategoriasPresupuestos-{CveEmpresa}"
|
||||||
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -1109,6 +1161,14 @@ Public Class ClsPaginas
|
|||||||
'End Property
|
'End Property
|
||||||
Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1, Optional RegimenFiscalReceptor As String = "-1") As DataTable
|
Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1, Optional RegimenFiscalReceptor As String = "-1") As DataTable
|
||||||
Get
|
Get
|
||||||
|
Dim AppNombre As String = "GlobalDTSATUsosCFDI"
|
||||||
|
'sino existe, recarga los datos
|
||||||
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
|
Dim ObjGrales As New ClsGenerales
|
||||||
|
If ObjGrales.GetSATUsosCFDI() Then Application(AppNombre) = ObjGrales.DtResultados
|
||||||
|
ObjGrales.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
If EsPersonaFisica <> -1 Then
|
If EsPersonaFisica <> -1 Then
|
||||||
Dim Tipo As New StringBuilder
|
Dim Tipo As New StringBuilder
|
||||||
If EsPersonaFisica = 1 Then Tipo.Append("AplicaPersonaFisica = 1") Else Tipo.Append("AplicaPersonaMoral = 1")
|
If EsPersonaFisica = 1 Then Tipo.Append("AplicaPersonaFisica = 1") Else Tipo.Append("AplicaPersonaMoral = 1")
|
||||||
@@ -1117,16 +1177,17 @@ Public Class ClsPaginas
|
|||||||
Tipo.AppendFormat("AND RegimenFiscalReceptor LIKE '%{0}%'", RegimenFiscalReceptor)
|
Tipo.AppendFormat("AND RegimenFiscalReceptor LIKE '%{0}%'", RegimenFiscalReceptor)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTSATUsosCFDI"), DataTable), Tipo.ToString(), " UsoCFDIDescripcion", DataViewRowState.CurrentRows)
|
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Tipo.ToString(), " UsoCFDIDescripcion", DataViewRowState.CurrentRows)
|
||||||
GlobalDTSATUsosCFDI = Dv.ToTable
|
GlobalDTSATUsosCFDI = Dv.ToTable
|
||||||
Dv.Dispose()
|
Dv.Dispose()
|
||||||
Else
|
Else
|
||||||
GlobalDTSATUsosCFDI = DirectCast(Application("GlobalDTSATUsosCFDI"), DataTable)
|
GlobalDTSATUsosCFDI = DirectCast(Application(AppNombre), DataTable)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Get
|
End Get
|
||||||
Set(ByVal value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTSATUsosCFDI") = value
|
Dim AppNombre As String = "GlobalDTSATUsosCFDI"
|
||||||
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Public Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable
|
Public Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable
|
||||||
@@ -2616,11 +2677,11 @@ Public Class ClsPaginas
|
|||||||
#Region "***********************************************************************DT GENERALES**************************************************************************************"
|
#Region "***********************************************************************DT GENERALES**************************************************************************************"
|
||||||
Property GlobalDTGralCategorias(CveEmpresa As Integer) As DataTable
|
Property GlobalDTGralCategorias(CveEmpresa As Integer) As DataTable
|
||||||
Get
|
Get
|
||||||
Dim AppNombre As String = String.Format("GlobalDTGralCategorias-{0}", CveEmpresa)
|
Dim AppNombre As String = $"GlobalDTGralCategorias-{CveEmpresa}"
|
||||||
'sino existe, recarga los datos
|
'sino existe, recarga los datos
|
||||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
Dim ObjGenerales As New ClsGenerales
|
Dim ObjGenerales As New ClsGenerales
|
||||||
If ObjGenerales.GetCategorias(CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados Else Application(AppNombre) = Nothing
|
If ObjGenerales.GetCategorias(CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados
|
||||||
ObjGenerales.Dispose()
|
ObjGenerales.Dispose()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -2634,54 +2695,69 @@ Public Class ClsPaginas
|
|||||||
Dv.Dispose()
|
Dv.Dispose()
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Dim AppNombre As String = String.Format("GlobalDTGralCategorias-{0}", CveEmpresa)
|
Dim AppNombre As String = $"GlobalDTGralCategorias-{CveEmpresa}"
|
||||||
Application(AppNombre) = value
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
|
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTGralCategorias2(CveEmpresa As Integer) As DataTable
|
Property GlobalDTGralCategorias2(CveEmpresa As Integer) As DataTable
|
||||||
|
|
||||||
Get
|
Get
|
||||||
If CveEmpresa <> -1 Then
|
Dim AppNombre As String = $"GlobalDTGralCategorias2-{CveEmpresa}"
|
||||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTCategorias2"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
|
'sino existe, recarga los datos
|
||||||
GlobalDTGralCategorias2 = Dv.ToTable
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
Dv.Dispose()
|
Dim ObjGenerales As New ClsGenerales
|
||||||
Else
|
If ObjGenerales.GetCategorias(CveEmpresa, 4) Then Application(AppNombre) = ObjGenerales.DtResultados
|
||||||
GlobalDTGralCategorias2 = DirectCast(Application("GlobalDTCategorias2"), DataTable)
|
ObjGenerales.Dispose()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim filtro As New StringBuilder
|
||||||
|
'If CveMarca > 0 Then
|
||||||
|
' filtro.AppendFormat(" CveMarca={0} ", CveMarca)
|
||||||
|
'End If
|
||||||
|
|
||||||
|
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), filtro.ToString, "", DataViewRowState.CurrentRows)
|
||||||
|
GlobalDTGralCategorias2 = Dv.ToTable
|
||||||
|
Dv.Dispose()
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTCategorias2") = value
|
Dim AppNombre As String = $"GlobalDTGralCategorias2-{CveEmpresa}"
|
||||||
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Property GlobalDTGralEscolaridades() As DataTable
|
Property GlobalDTGralEscolaridades() As DataTable
|
||||||
Get
|
Get
|
||||||
GlobalDTGralEscolaridades = DirectCast(Application("GlobalDTGralEscolaridades"), DataTable)
|
Dim AppNombre As String = "GlobalDTGralEscolaridades"
|
||||||
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
|
Dim ObjGenerales As New ClsGenerales
|
||||||
|
If ObjGenerales.GetEscolaridades() Then Application(AppNombre) = ObjGenerales.DtResultados
|
||||||
|
ObjGenerales.Dispose()
|
||||||
|
End If
|
||||||
|
GlobalDTGralEscolaridades = DirectCast(Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTGralEscolaridades") = value
|
Dim AppNombre As String = "GlobalDTGralEscolaridades"
|
||||||
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Property GlobalDTGralColectivas(CveEmpresa As Integer) As DataTable
|
Property GlobalDTGralColectivas(CveEmpresa As Integer) As DataTable
|
||||||
Get
|
Get
|
||||||
If CveEmpresa <> -1 Then
|
Dim AppNombre As String = $"GlobalDTGralColectivas-{CveEmpresa}"
|
||||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTGralColectivas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
GlobalDTGralColectivas = Dv.ToTable
|
Dim ObjGenerales As New ClsGenerales
|
||||||
Dv.Dispose()
|
If ObjGenerales.GetColectivas(CveEmpresa:=CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados
|
||||||
Else
|
ObjGenerales.Dispose()
|
||||||
GlobalDTGralColectivas = DirectCast(Application("GlobalDTGralColectivas"), DataTable)
|
|
||||||
End If
|
End If
|
||||||
|
GlobalDTGralColectivas = DirectCast(Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTGralColectivas") = value
|
Dim AppNombre As String = $"GlobalDTGralColectivas-{CveEmpresa}"
|
||||||
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Property GlobalDTGralMarcas(CveEmpresa As Integer, Optional CveMarca As Integer = -1) As DataTable
|
Property GlobalDTGralMarcas(CveEmpresa As Integer, Optional CveMarca As Integer = -1) As DataTable
|
||||||
Get
|
Get
|
||||||
Dim AppNombre As String = String.Format("GlobalDTGralMarcas-{0}", CveEmpresa)
|
Dim AppNombre As String = $"GlobalDTGralMarcas-{CveEmpresa}"
|
||||||
'sino existe, recarga los datos
|
'sino existe, recarga los datos
|
||||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
Dim ObjMarcas As New ClsProductosServicios
|
Dim ObjMarcas As New ClsProductosServicios
|
||||||
@@ -2701,7 +2777,7 @@ Public Class ClsPaginas
|
|||||||
|
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Dim AppNombre As String = String.Format("GlobalDTGralMarcas-{0}", CveEmpresa)
|
Dim AppNombre As String = $"GlobalDTGralMarcas-{CveEmpresa}"
|
||||||
Application(AppNombre) = value
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
@@ -3496,33 +3572,58 @@ Public Class ClsPaginas
|
|||||||
#Region "**********************************************************************GLOBAL DT RH (RECURSOS HUMANOS)********************************************************************"
|
#Region "**********************************************************************GLOBAL DT RH (RECURSOS HUMANOS)********************************************************************"
|
||||||
Property GlobalDTAsistenciaDetalle() As DataTable
|
Property GlobalDTAsistenciaDetalle() As DataTable
|
||||||
Get
|
Get
|
||||||
GlobalDTAsistenciaDetalle = DirectCast(Application("GlobalDTAsistenciaDetalle"), DataTable)
|
Dim AppNombre As String = "GlobalDTAsistenciaDetalle"
|
||||||
|
'sino existe, recarga los datos
|
||||||
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
|
Dim ObjPersonal As New ClsRH
|
||||||
|
If ObjPersonal.GetAsistenciasDetalle() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||||
|
ObjPersonal.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
GlobalDTAsistenciaDetalle = DirectCast(Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTAsistenciaDetalle") = value
|
Dim AppNombre As String = "GlobalDTAsistenciaDetalle"
|
||||||
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTAsistenciasInasistencias() As DataTable
|
Property GlobalDTAsistenciasInasistencias() As DataTable
|
||||||
Get
|
Get
|
||||||
GlobalDTAsistenciasInasistencias = DirectCast(Application("GlobalDTAsistenciasInasistencias"), DataTable)
|
Dim AppNombre As String = "GlobalDTAsistenciasInasistencias"
|
||||||
|
'sino existe, recarga los datos
|
||||||
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
|
Dim ObjPersonal As New ClsRH
|
||||||
|
If ObjPersonal.GetAsistenciasInasistencias() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||||
|
ObjPersonal.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
GlobalDTAsistenciasInasistencias = DirectCast(Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTAsistenciasInasistencias") = value
|
Dim AppNombre As String = "GlobalDTAsistenciasInasistencias"
|
||||||
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTEstatusPersonal() As DataTable
|
Property GlobalDTEstatusPersonal() As DataTable
|
||||||
Get
|
Get
|
||||||
GlobalDTEstatusPersonal = DirectCast(Application("GlobalDTEstatusPersonal"), DataTable)
|
Dim AppNombre As String = "GlobalDTEstatusPersonal"
|
||||||
|
'sino existe, recarga los datos
|
||||||
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
|
Dim ObjPersonal As New ClsRH
|
||||||
|
If ObjPersonal.GetEstatusPersonal() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||||
|
ObjPersonal.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
GlobalDTEstatusPersonal = DirectCast(Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTEstatusPersonal") = value
|
Dim AppNombre As String = "GlobalDTEstatusPersonal"
|
||||||
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Property GlobalDTRHPersonal(CveEmpresa As Integer, Optional CvePersonal As Integer = -1) As DataTable
|
Property GlobalDTRHPersonal(CveEmpresa As Integer, Optional CvePersonal As Integer = -1) As DataTable
|
||||||
|
|
||||||
Get
|
Get
|
||||||
Dim AppNombre As String = String.Format("GlobalDTRHPersonal-{0}", CveEmpresa)
|
Dim AppNombre As String = $"GlobalDTRHPersonal-{CveEmpresa}"
|
||||||
'sino existe, recarga los datos
|
'sino existe, recarga los datos
|
||||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
Dim ObjPersonal As New ClsRH
|
Dim ObjPersonal As New ClsRH
|
||||||
@@ -3530,145 +3631,239 @@ Public Class ClsPaginas
|
|||||||
ObjPersonal.Dispose()
|
ObjPersonal.Dispose()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveEmpresa <> -1 Or CvePersonal <> -1 Then
|
GlobalDTRHPersonal = DirectCast(Application(AppNombre), DataTable)
|
||||||
Dim Str As StringBuilder = New StringBuilder()
|
|
||||||
If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
|
|
||||||
If CvePersonal <> -1 Then Str.AppendFormat(" {0} CvePersonal = {1}", If(Str.Length > 0, "AND", ""), CvePersonal)
|
|
||||||
|
|
||||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
|
||||||
GlobalDTRHPersonal = Dv.ToTable
|
|
||||||
Dv.Dispose()
|
|
||||||
Else
|
|
||||||
GlobalDTRHPersonal = DirectCast(Application(AppNombre), DataTable)
|
|
||||||
End If
|
|
||||||
|
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Dim AppNombre As String = String.Format("GlobalDTRHPersonal-{0}", CveEmpresa)
|
Dim AppNombre As String = $"GlobalDTRHPersonal-{CveEmpresa}"
|
||||||
Application(AppNombre) = value
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
|
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
Property GlobalDTDepartamentos() As DataTable
|
Property GlobalDTDepartamentos() As DataTable
|
||||||
Get
|
Get
|
||||||
GlobalDTDepartamentos = DirectCast(Application("GlobalDTDepartamentos"), DataTable)
|
Dim AppNombre As String = "GlobalDTDepartamentos"
|
||||||
|
'sino existe, recarga los datos
|
||||||
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
|
Dim ObjPersonal As New ClsRH
|
||||||
|
If ObjPersonal.GetDepartamentos() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||||
|
ObjPersonal.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
GlobalDTDepartamentos = DirectCast(Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTDepartamentos") = value
|
Dim AppNombre As String = "GlobalDTDepartamentos"
|
||||||
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTRHPuestos(CveEmpresa As Integer) As DataTable
|
Property GlobalDTRHPuestos(CveEmpresa As Integer) As DataTable
|
||||||
Get
|
Get
|
||||||
If CveEmpresa <> -1 Then
|
Dim AppNombre As String = $"GlobalDTRHPuestos-{CveEmpresa}"
|
||||||
Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa)
|
'sino existe, recarga los datos
|
||||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTRHPuestos"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
GlobalDTRHPuestos = Dv.ToTable
|
Dim ObjPersonal As New ClsRH
|
||||||
Dv.Dispose()
|
If ObjPersonal.GetPuestos(CveEmpresa) Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||||
Else
|
ObjPersonal.Dispose()
|
||||||
GlobalDTRHPuestos = DirectCast(Application("GlobalDTRHPuestos"), DataTable)
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
GlobalDTRHPuestos = DirectCast(Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTRHPuestos") = value
|
Dim AppNombre As String = $"GlobalDTRHPuestos-{CveEmpresa}"
|
||||||
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTEscolaridad() As DataTable
|
Property GlobalDTEscolaridad() As DataTable
|
||||||
Get
|
Get
|
||||||
GlobalDTEscolaridad = DirectCast(Application("GlobalDTEscolaridad"), DataTable)
|
Dim AppNombre As String = "GlobalDTEscolaridad"
|
||||||
|
'sino existe, recarga los datos
|
||||||
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
|
Dim ObjPersonal As New ClsRH
|
||||||
|
If ObjPersonal.GetEscolaridades() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||||
|
ObjPersonal.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
GlobalDTEscolaridad = DirectCast(Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTEscolaridad") = value
|
Dim AppNombre As String = "GlobalDTEscolaridad"
|
||||||
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTEstadoCivil() As DataTable
|
Property GlobalDTEstadoCivil() As DataTable
|
||||||
Get
|
Get
|
||||||
GlobalDTEstadoCivil = DirectCast(Application("GlobalDTEstadoCivil"), DataTable)
|
Dim AppNombre As String = "GlobalDTEstadoCivil"
|
||||||
|
'sino existe, recarga los datos
|
||||||
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
|
Dim ObjPersonal As New ClsRH
|
||||||
|
If ObjPersonal.GetEstadoCivil() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||||
|
ObjPersonal.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
GlobalDTEstadoCivil = DirectCast(Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTEstadoCivil") = value
|
Dim AppNombre As String = "GlobalDTEstadoCivil"
|
||||||
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTDocumentos() As DataTable
|
Property GlobalDTDocumentos() As DataTable
|
||||||
Get
|
Get
|
||||||
GlobalDTDocumentos = DirectCast(Application("GlobalDTDocumentos"), DataTable)
|
Dim AppNombre As String = "GlobalDTDocumentos"
|
||||||
|
'sino existe, recarga los datos
|
||||||
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
|
Dim ObjPersonal As New ClsRH
|
||||||
|
If ObjPersonal.GetDocumentos() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||||
|
ObjPersonal.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
GlobalDTDocumentos = DirectCast(Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTDocumentos") = value
|
Dim AppNombre As String = "GlobalDTDocumentos"
|
||||||
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTGenero() As DataTable
|
Property GlobalDTGenero() As DataTable
|
||||||
Get
|
Get
|
||||||
GlobalDTGenero = DirectCast(Application("GlobalDTGenero"), DataTable)
|
Dim AppNombre As String = "GlobalDTGenero"
|
||||||
|
'sino existe, recarga los datos
|
||||||
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
|
Dim ObjPersonal As New ClsRH
|
||||||
|
If ObjPersonal.GetGeneros() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||||
|
ObjPersonal.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
GlobalDTGenero = DirectCast(Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTGenero") = value
|
Dim AppNombre As String = "GlobalDTGenero"
|
||||||
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTMotivoBaja() As DataTable
|
Property GlobalDTMotivoBaja() As DataTable
|
||||||
Get
|
Get
|
||||||
GlobalDTMotivoBaja = DirectCast(Application("GlobalDTMotivoBaja"), DataTable)
|
Dim AppNombre As String = "GlobalDTMotivoBaja"
|
||||||
|
'sino existe, recarga los datos
|
||||||
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
|
Dim ObjPersonal As New ClsRH
|
||||||
|
If ObjPersonal.GetMotivoBaja() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||||
|
ObjPersonal.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
GlobalDTMotivoBaja = DirectCast(Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTMotivoBaja") = value
|
Dim AppNombre As String = "GlobalDTMotivoBaja"
|
||||||
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTTiposContrato() As DataTable
|
Property GlobalDTTiposContrato() As DataTable
|
||||||
Get
|
Get
|
||||||
GlobalDTTiposContrato = DirectCast(Application("GlobalDTTiposContrato"), DataTable)
|
Dim AppNombre As String = "GlobalDTTiposContrato"
|
||||||
|
'sino existe, recarga los datos
|
||||||
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
|
Dim ObjPersonal As New ClsRH
|
||||||
|
If ObjPersonal.GetTiposContrato() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||||
|
ObjPersonal.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
GlobalDTTiposContrato = DirectCast(Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTTiposContrato") = value
|
Dim AppNombre As String = "GlobalDTTiposContrato"
|
||||||
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTRutas() As DataTable
|
Property GlobalDTRutas() As DataTable
|
||||||
Get
|
Get
|
||||||
GlobalDTRutas = DirectCast(Application("GlobalDTRutas"), DataTable)
|
Dim AppNombre As String = "GlobalDTRutas"
|
||||||
|
'sino existe, recarga los datos
|
||||||
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
|
Dim ObjPersonal As New ClsRH
|
||||||
|
If ObjPersonal.GetRutas() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||||
|
ObjPersonal.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
GlobalDTRutas = DirectCast(Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTRutas") = value
|
Dim AppNombre As String = "GlobalDTRutas"
|
||||||
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTTurno() As DataTable
|
Property GlobalDTTurno() As DataTable
|
||||||
Get
|
Get
|
||||||
GlobalDTTurno = DirectCast(Application("GlobalDTTurno"), DataTable)
|
Dim AppNombre As String = "GlobalDTTurno"
|
||||||
|
'sino existe, recarga los datos
|
||||||
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
|
Dim ObjPersonal As New ClsRH
|
||||||
|
If ObjPersonal.GetTurnos() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||||
|
ObjPersonal.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
GlobalDTTurno = DirectCast(Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTTurno") = value
|
Dim AppNombre As String = "GlobalDTTurno"
|
||||||
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTJornadas() As DataTable
|
Property GlobalDTJornadas() As DataTable
|
||||||
Get
|
Get
|
||||||
GlobalDTJornadas = DirectCast(Application("GlobalDTJornadas"), DataTable)
|
Dim AppNombre As String = "GlobalDTJornadas"
|
||||||
|
'sino existe, recarga los datos
|
||||||
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
|
Dim ObjPersonal As New ClsRH
|
||||||
|
If ObjPersonal.GetJornadas() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||||
|
ObjPersonal.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
GlobalDTJornadas = DirectCast(Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTJornadas") = value
|
Dim AppNombre As String = "GlobalDTJornadas"
|
||||||
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTMotivosHorasExtras() As DataTable
|
Property GlobalDTMotivosHorasExtras() As DataTable
|
||||||
Get
|
Get
|
||||||
GlobalDTMotivosHorasExtras = DirectCast(Application("GlobalDTMotivosHorasExtras"), DataTable)
|
Dim AppNombre As String = "GlobalDTMotivosHorasExtras"
|
||||||
|
'sino existe, recarga los datos
|
||||||
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
|
Dim ObjPersonal As New ClsRH
|
||||||
|
If ObjPersonal.GetMotivoHorasExtras() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||||
|
ObjPersonal.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
GlobalDTMotivosHorasExtras = DirectCast(Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTMotivosHorasExtras") = value
|
Dim AppNombre As String = "GlobalDTMotivosHorasExtras"
|
||||||
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTTipoBuzon() As DataTable
|
Property GlobalDTTipoBuzon() As DataTable
|
||||||
Get
|
Get
|
||||||
GlobalDTTipoBuzon = DirectCast(Application("GlobalDTTipoBuzon"), DataTable)
|
Dim AppNombre As String = "GlobalDTTipoBuzon"
|
||||||
|
'sino existe, recarga los datos
|
||||||
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
|
Dim ObjPersonal As New ClsRH
|
||||||
|
If ObjPersonal.GetTipoBuzon() Then Application(AppNombre) = ObjPersonal.DtResultados
|
||||||
|
ObjPersonal.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
GlobalDTTipoBuzon = DirectCast(Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTTipoBuzon") = value
|
Dim AppNombre As String = "GlobalDTTipoBuzon"
|
||||||
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "*********** D T - C O M B U S T I B L E S ***********"
|
#Region "*********** D T - C O M B U S T I B L E S ***********"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Property GlobalDTCombustibles(CveEmpresa As Integer) As DataTable
|
Property GlobalDTCombustibles(CveEmpresa As Integer) As DataTable
|
||||||
Get
|
Get
|
||||||
If CveEmpresa <> -1 Then
|
If CveEmpresa <> -1 Then
|
||||||
@@ -3884,19 +4079,20 @@ Public Class ClsPaginas
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTPaqueteriaGuiaTipos(CveEmpresa As Integer) As DataTable
|
Property GlobalDTPaqueteriaGuiaTipos(CveEmpresa As Integer) As DataTable
|
||||||
|
|
||||||
Get
|
Get
|
||||||
If CveEmpresa <> -1 Then
|
Dim AppNombre As String = $"GlobalDTPaqueteriaGuiaTipos-{CveEmpresa}"
|
||||||
Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa)
|
'sino existe, recarga los datos
|
||||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTPaqueteriaGuiaTipos"), DataTable), StrSQL, "", DataViewRowState.CurrentRows)
|
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||||
GlobalDTPaqueteriaGuiaTipos = Dv.ToTable
|
Dim ObjGenerales As New ClsGenerales
|
||||||
Dv.Dispose()
|
If ObjGenerales.GetGralPaqueteriasGuiasTipo(CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados
|
||||||
Else
|
ObjGenerales.Dispose()
|
||||||
GlobalDTPaqueteriaGuiaTipos = DirectCast(Application("GlobalDTPaqueteriaGuiaTipos"), DataTable)
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
GlobalDTPaqueteriaGuiaTipos = DirectCast(Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTPaqueteriaGuiaTipos") = value
|
Dim AppNombre As String = $"GlobalDTPaqueteriaGuiaTipos-{CveEmpresa}"
|
||||||
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Public Shared Property GlobalDTClasificacionPorcentaje(CveEmpresa As Integer, Optional CveClasicacionPorcentaje As Integer = -1, Optional CveClasicacion As Integer = -1,
|
Public Shared Property GlobalDTClasificacionPorcentaje(CveEmpresa As Integer, Optional CveClasicacionPorcentaje As Integer = -1, Optional CveClasicacion As Integer = -1,
|
||||||
|
|||||||
65
Global.asax
65
Global.asax
@@ -9,36 +9,37 @@
|
|||||||
|
|
||||||
<script RunAt="server">
|
<script RunAt="server">
|
||||||
|
|
||||||
Public ReadOnly Property EsProduccion As String
|
Public ReadOnly Property EsProduccion As String
|
||||||
Get
|
Get
|
||||||
If IsNothing(System.Configuration.ConfigurationManager.AppSettings("EsProduccion")) Then
|
If IsNothing(System.Configuration.ConfigurationManager.AppSettings("EsProduccion")) Then
|
||||||
Return "0"
|
Return "0"
|
||||||
Else
|
Else
|
||||||
Return System.Configuration.ConfigurationManager.AppSettings("EsProduccion").ToString()
|
Return System.Configuration.ConfigurationManager.AppSettings("EsProduccion").ToString()
|
||||||
End If
|
End If
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Private Sub GuardaLogAsax(str As String)
|
Private Sub GuardaLogAsax(str As String)
|
||||||
'GuardaLog(str)
|
'GuardaLog(str)
|
||||||
End Sub
|
End Sub
|
||||||
Sub Application_Start(sender As Object, e As EventArgs)
|
Sub Application_Start(sender As Object, e As EventArgs)
|
||||||
Stimulsoft.Base.StiLicense.Key = "6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHmhQEs54hwXWiqhb7jE6yoykR4jHwP3Mz0nuxn0JR9fNMeDKv" + "sS5s+rCYr7Ex4DRTHaUJIUDqrvGmvWyMjzUl9RAEz/XG8RenfJvoEilBZ9Wqq8Uu/n92YhChB4PbAh9FeH3abSU3PF" + "LuVa6GydYWQvZGpHhFs98Idp754TAgWZatzcF3Ksp6q4laYxnyUY0cA0hYejanRBjIT1Nu59xmlOKE7EGIb9wKlLn/" + "XnW8k8PUNuReOk7ATeHO07JSMLikmvIytkWET2bXDmBI43tAX3fLUE+KlOe7FR/hvfQ6oqqtVRlSZ22QBanel09+XE" + "X8aVC8b+WuRv1nInJeQHBD9zF8b67n4ouKRgv2/vSxopOhCZXdaqdyO4ct+FmSC8cAAcMIGeiKnc5ww8Cq44ClTqJl" + "V2qsCjoS4bb8Nzd2Gy+q/TG/D3dAEKSpPGUx2EEksora/kIkNooq6+bgyH7hqCG2bHKaSQwr2g0keNrYIUcTIwROn1" + "cnQDetzsBqX4lvu64VZWq5+cQD+dyPJwOS6M"
|
Stimulsoft.Base.StiLicense.Key = "6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHmhQEs54hwXWiqhb7jE6yoykR4jHwP3Mz0nuxn0JR9fNMeDKv" + "sS5s+rCYr7Ex4DRTHaUJIUDqrvGmvWyMjzUl9RAEz/XG8RenfJvoEilBZ9Wqq8Uu/n92YhChB4PbAh9FeH3abSU3PF" + "LuVa6GydYWQvZGpHhFs98Idp754TAgWZatzcF3Ksp6q4laYxnyUY0cA0hYejanRBjIT1Nu59xmlOKE7EGIb9wKlLn/" + "XnW8k8PUNuReOk7ATeHO07JSMLikmvIytkWET2bXDmBI43tAX3fLUE+KlOe7FR/hvfQ6oqqtVRlSZ22QBanel09+XE" + "X8aVC8b+WuRv1nInJeQHBD9zF8b67n4ouKRgv2/vSxopOhCZXdaqdyO4ct+FmSC8cAAcMIGeiKnc5ww8Cq44ClTqJl" + "V2qsCjoS4bb8Nzd2Gy+q/TG/D3dAEKSpPGUx2EEksora/kIkNooq6+bgyH7hqCG2bHKaSQwr2g0keNrYIUcTIwROn1" + "cnQDetzsBqX4lvu64VZWq5+cQD+dyPJwOS6M"
|
||||||
|
|
||||||
'Dim Licence As String = String.Format("{0}/Bin/ASS151026R37.license", AppDomain.CurrentDomain.BaseDirectory)
|
'Dim Licence As String = String.Format("{0}/Bin/ASS151026R37.license", AppDomain.CurrentDomain.BaseDirectory)
|
||||||
'Dim stream As System.IO.MemoryStream = New System.IO.MemoryStream(System.IO.File.ReadAllBytes(Licence))
|
'Dim stream As System.IO.MemoryStream = New System.IO.MemoryStream(System.IO.File.ReadAllBytes(Licence))
|
||||||
|
|
||||||
'HyperSoft.ElectronicDocument.Download.Activation.Activation.LoadActivationFile(stream)
|
'HyperSoft.ElectronicDocument.Download.Activation.Activation.LoadActivationFile(stream)
|
||||||
|
|
||||||
|
|
||||||
Dim sessionData As New Dictionary(Of String, HttpSessionState)()
|
Dim sessionData As New Dictionary(Of String, HttpSessionState)()
|
||||||
Application("s") = sessionData
|
Application("s") = sessionData
|
||||||
|
|
||||||
|
|
||||||
'BANDERA PARA VALIDACION DE CFDI
|
'BANDERA PARA VALIDACION DE CFDI
|
||||||
Application("GlobalValidarCFDI") = True
|
Application("GlobalValidarCFDI") = True
|
||||||
|
|
||||||
'----------------------------------------------------------------------------------------------------------------------
|
'----------------------------------------------------------------------------------------------------------------------
|
||||||
'C A R G A - R H
|
'C A R G A - R H
|
||||||
|
#If False Then
|
||||||
GuardaLogAsax(String.Format("Globalasax 1:{0}", DateTime.Now))
|
GuardaLogAsax(String.Format("Globalasax 1:{0}", DateTime.Now))
|
||||||
Using ObjRH As New ClsRH
|
Using ObjRH As New ClsRH
|
||||||
|
|
||||||
@@ -59,6 +60,7 @@
|
|||||||
If ObjRH.GetMotivoHorasExtras() Then Application("GlobalDTMotivosHorasExtras") = ObjRH.DtResultados Else Application("GlobalDTMotivosHorasExtras") = Nothing
|
If ObjRH.GetMotivoHorasExtras() Then Application("GlobalDTMotivosHorasExtras") = ObjRH.DtResultados Else Application("GlobalDTMotivosHorasExtras") = Nothing
|
||||||
If ObjRH.GetAsistenciasDetalle() Then Application("GlobalDTAsistenciaDetalle") = ObjRH.DtResultados Else Application("GlobalDTAsistenciaDetalle") = Nothing
|
If ObjRH.GetAsistenciasDetalle() Then Application("GlobalDTAsistenciaDetalle") = ObjRH.DtResultados Else Application("GlobalDTAsistenciaDetalle") = Nothing
|
||||||
End Using
|
End Using
|
||||||
|
#End If
|
||||||
'----------------------------------------------------------------------------------------------------------------------
|
'----------------------------------------------------------------------------------------------------------------------
|
||||||
'C A R G A - O S
|
'C A R G A - O S
|
||||||
GuardaLogAsax(String.Format("Globalasax 2:{0}", DateTime.Now))
|
GuardaLogAsax(String.Format("Globalasax 2:{0}", DateTime.Now))
|
||||||
@@ -89,7 +91,6 @@
|
|||||||
'If ObjOC.GetEstatusUsuarios(-1, -1, -1, -1, -1) Then Application("GlobalDTOCEstatusUsuarios") = ObjOC.DtResultados Else Application("GlobalDTOCEstatusUsuarios") = Nothing
|
'If ObjOC.GetEstatusUsuarios(-1, -1, -1, -1, -1) Then Application("GlobalDTOCEstatusUsuarios") = ObjOC.DtResultados Else Application("GlobalDTOCEstatusUsuarios") = Nothing
|
||||||
End Using
|
End Using
|
||||||
|
|
||||||
|
|
||||||
'-------------------------------------------------------------------------------------------------------------------------
|
'-------------------------------------------------------------------------------------------------------------------------
|
||||||
'A M O R T I Z A C I O N - C O N T A B L E
|
'A M O R T I Z A C I O N - C O N T A B L E
|
||||||
|
|
||||||
@@ -234,20 +235,20 @@
|
|||||||
'If ObjGenerales.GetGralEstados Then Application("GlobalDTGralEstados") = ObjGenerales.DtResultados Else Application("GlobalDTGralEstados") = Nothing
|
'If ObjGenerales.GetGralEstados Then Application("GlobalDTGralEstados") = ObjGenerales.DtResultados Else Application("GlobalDTGralEstados") = Nothing
|
||||||
'If ObjGenerales.GetGralMunicipios Then Application("GlobalDTGralMunicipios") = ObjGenerales.DtResultados Else Application("GlobalDTGralMunicipios") = Nothing
|
'If ObjGenerales.GetGralMunicipios Then Application("GlobalDTGralMunicipios") = ObjGenerales.DtResultados Else Application("GlobalDTGralMunicipios") = Nothing
|
||||||
'If ObjGenerales.GetGralPoblaciones Then Application("GlobalDTGralPoblaciones") = ObjGenerales.DtResultados Else Application("GlobalDTGralPoblaciones") = Nothing
|
'If ObjGenerales.GetGralPoblaciones Then Application("GlobalDTGralPoblaciones") = ObjGenerales.DtResultados Else Application("GlobalDTGralPoblaciones") = Nothing
|
||||||
If ObjGenerales.GetEscolaridades Then Application("GlobalDTGralEscolaridades") = ObjGenerales.DtResultados Else Application("GlobalDTGralEscolaridades") = Nothing
|
'If ObjGenerales.GetEscolaridades Then Application("GlobalDTGralEscolaridades") = ObjGenerales.DtResultados Else Application("GlobalDTGralEscolaridades") = Nothing
|
||||||
'If ObjGenerales.GetCategorias Then Application("GlobalDTGralCategorias") = ObjGenerales.DtResultados Else Application("GlobalDTGralCategorias") = Nothing
|
'If ObjGenerales.GetCategorias Then Application("GlobalDTGralCategorias") = ObjGenerales.DtResultados Else Application("GlobalDTGralCategorias") = Nothing
|
||||||
If ObjGenerales.GetCategorias(-1, 2) Then Application("GlobalDTFamilias") = ObjGenerales.DtResultados Else Application("GlobalDTFamilias") = Nothing
|
'If ObjGenerales.GetCategorias(-1, 2) Then Application("GlobalDTFamilias") = ObjGenerales.DtResultados Else Application("GlobalDTFamilias") = Nothing
|
||||||
If ObjGenerales.GetCategorias(-1, 3) Then Application("GlobalDTCategoriasPresupuestos") = ObjGenerales.DtResultados Else Application("GlobalDTCategoriasPresupuestos") = Nothing
|
'If ObjGenerales.GetCategorias(-1, 3) Then Application("GlobalDTCategoriasPresupuestos") = ObjGenerales.DtResultados Else Application("GlobalDTCategoriasPresupuestos") = Nothing
|
||||||
If ObjGenerales.GetCategorias(-1, 4) Then Application("GlobalDTCategorias2") = ObjGenerales.DtResultados Else Application("GlobalDTCategorias2") = Nothing
|
'If ObjGenerales.GetCategorias(-1, 4) Then Application("GlobalDTCategorias2") = ObjGenerales.DtResultados Else Application("GlobalDTCategorias2") = Nothing
|
||||||
If ObjGenerales.GetColectivas(-1, "-1", "-1", "-1", -1) Then Application("GlobalDTObjGralColectivas") = ObjGenerales.DtResultados Else Application("GlobalDTObjGralColectivas") = Nothing
|
'If ObjGenerales.GetColectivas(-1, "-1", "-1", "-1", -1) Then Application("GlobalDTGralColectivas") = ObjGenerales.DtResultados Else Application("GlobalDTGralColectivas") = Nothing
|
||||||
'If ObjGenerales.GetGralPaqueterias Then Application("GlobalDTPaqueterias") = ObjGenerales.DtResultados Else Application("GlobalDTPaqueterias") = Nothing
|
'If ObjGenerales.GetGralPaqueterias Then Application("GlobalDTPaqueterias") = ObjGenerales.DtResultados Else Application("GlobalDTPaqueterias") = Nothing
|
||||||
If ObjGenerales.GetGralPaqueteriasGuiasTipo Then Application("GlobalDTPaqueteriaGuiaTipos") = ObjGenerales.DtResultados Else Application("GlobalDTPaqueteriaGuiaTipos") = Nothing
|
'If ObjGenerales.GetGralPaqueteriasGuiasTipo Then Application("GlobalDTPaqueteriaGuiaTipos") = ObjGenerales.DtResultados Else Application("GlobalDTPaqueteriaGuiaTipos") = Nothing
|
||||||
If ObjGenerales.GetClasificacionPorcentaje(-1, -1, -1, -1, 1) Then Application("GlobalDTClasificacionPorcentaje") = ObjGenerales.DtResultados Else Application("GlobalDTClasificacionPorcentaje") = Nothing
|
If ObjGenerales.GetClasificacionPorcentaje(-1, -1, -1, -1, 1) Then Application("GlobalDTClasificacionPorcentaje") = ObjGenerales.DtResultados Else Application("GlobalDTClasificacionPorcentaje") = Nothing
|
||||||
|
|
||||||
End Using
|
End Using
|
||||||
|
#If False Then
|
||||||
'SAT
|
'SAT
|
||||||
Using ObjGrales As New ClsGenerales
|
Using ObjGrales As New ClsGenerales
|
||||||
If ObjGrales.GetSATProductosServicios Then Application("GlobalDTPSATPS") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATPS") = Nothing
|
'If ObjGrales.GetSATProductosServicios Then Application("GlobalDTPSATPS") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATPS") = Nothing
|
||||||
'If ObjGrales.GetSATUnidadMedida Then Application("GlobalDTPSATUM") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATUM") = Nothing
|
'If ObjGrales.GetSATUnidadMedida Then Application("GlobalDTPSATUM") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATUM") = Nothing
|
||||||
If ObjGrales.GetSATUsosCFDI Then Application("GlobalDTSATUsosCFDI") = ObjGrales.DtResultados Else Application("GlobalDTSATUsosCFDI") = Nothing
|
If ObjGrales.GetSATUsosCFDI Then Application("GlobalDTSATUsosCFDI") = ObjGrales.DtResultados Else Application("GlobalDTSATUsosCFDI") = Nothing
|
||||||
If ObjGrales.GetSATFraccionArancelaria Then Application("GlobalDTFraccionArancelaria") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTFraccionArancelaria") = Nothing
|
If ObjGrales.GetSATFraccionArancelaria Then Application("GlobalDTFraccionArancelaria") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTFraccionArancelaria") = Nothing
|
||||||
@@ -261,7 +262,7 @@
|
|||||||
'If ObjGrales.GetSATMunicipio("-1") Then Application("GlobalDTMunicipio") = ObjGrales.DtResultados Else Application("GlobalDTMunicipio") = Nothing
|
'If ObjGrales.GetSATMunicipio("-1") Then Application("GlobalDTMunicipio") = ObjGrales.DtResultados Else Application("GlobalDTMunicipio") = Nothing
|
||||||
'If ObjGrales.GetSATColonia("-1") Then Application("GlobalDTColonia") = ObjGrales.DtResultados Else Application("GlobalDTColonia") = Nothing
|
'If ObjGrales.GetSATColonia("-1") Then Application("GlobalDTColonia") = ObjGrales.DtResultados Else Application("GlobalDTColonia") = Nothing
|
||||||
End Using
|
End Using
|
||||||
|
#End If
|
||||||
GuardaLogAsax(String.Format("Globalasax 16:{0}", DateTime.Now))
|
GuardaLogAsax(String.Format("Globalasax 16:{0}", DateTime.Now))
|
||||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
'E V E N T O S
|
'E V E N T O S
|
||||||
|
|||||||
Reference in New Issue
Block a user