-- mejora en globalDT
This commit is contained in:
@@ -373,35 +373,35 @@ Public Class ClsPaginas
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Property GlobalDTFraccionArancelaria() As DataTable
|
Public Shared Property GlobalDTFraccionArancelaria() As EnumerableRowCollection(Of DataRow)
|
||||||
Get
|
Get
|
||||||
Dim AppNombre As String = "GlobalDTFraccionArancelaria"
|
Dim AppNombre As String = "GlobalDTFraccionArancelaria"
|
||||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
|
||||||
Dim ObjGrales As New ClsGenerales
|
Dim ObjGrales As New ClsGenerales
|
||||||
If ObjGrales.GetSATFraccionArancelaria() Then Application(AppNombre) = ObjGrales.DtResultados.AsEnumerable()
|
If ObjGrales.GetSATFraccionArancelaria() Then HttpContext.Current.Application(AppNombre) = ObjGrales.DtResultados.AsEnumerable()
|
||||||
ObjGrales.Dispose()
|
ObjGrales.Dispose()
|
||||||
End If
|
End If
|
||||||
GlobalDTFraccionArancelaria = DirectCast(Application(AppNombre), EnumerableRowCollection(Of DataRow)).CopyToDataTable
|
GlobalDTFraccionArancelaria = DirectCast(HttpContext.Current.Application(AppNombre), EnumerableRowCollection(Of DataRow))
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As EnumerableRowCollection(Of DataRow))
|
||||||
Dim AppNombre As String = "GlobalDTFraccionArancelaria"
|
Dim AppNombre As String = "GlobalDTFraccionArancelaria"
|
||||||
Application(AppNombre) = value
|
HttpContext.Current.Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Property GlobalDTIncoterm() As DataTable
|
Public Shared Property GlobalDTIncoterm() As DataTable
|
||||||
Get
|
Get
|
||||||
Dim AppNombre As String = "GlobalDTIncoterm"
|
Dim AppNombre As String = "GlobalDTIncoterm"
|
||||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
|
||||||
Dim ObjGrales As New ClsGenerales
|
Dim ObjGrales As New ClsGenerales
|
||||||
If ObjGrales.GetSATIncoterm() Then Application(AppNombre) = ObjGrales.DtResultados
|
If ObjGrales.GetSATIncoterm() Then HttpContext.Current.Application(AppNombre) = ObjGrales.DtResultados
|
||||||
ObjGrales.Dispose()
|
ObjGrales.Dispose()
|
||||||
End If
|
End If
|
||||||
GlobalDTIncoterm = DirectCast(Application(AppNombre), DataTable)
|
GlobalDTIncoterm = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Dim AppNombre As String = "GlobalDTIncoterm"
|
Dim AppNombre As String = "GlobalDTIncoterm"
|
||||||
Application(AppNombre) = value
|
HttpContext.Current.Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -816,57 +816,55 @@ Public Class ClsPaginas
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
#Region "C A R T A P O R T E "
|
#Region "C A R T A P O R T E "
|
||||||
Property GlobalDTMaterialPeligroso(Optional CveMaterialPeligroso As Integer = -1) As DataTable
|
Public Shared Property GlobalDTMaterialPeligroso(Optional CveMaterialPeligroso As Integer = -1) As DataTable
|
||||||
Get
|
Get
|
||||||
|
|
||||||
Dim AppNombre As String = "GlobalDTMaterialPeligroso"
|
Dim AppNombre As String = "GlobalDTMaterialPeligroso"
|
||||||
'sino existe, recarga los datos
|
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||||
If Application(AppNombre) Is Nothing Then
|
|
||||||
Dim Obj As New ClsGenerales
|
Dim Obj As New ClsGenerales
|
||||||
If Obj.GetMaterialPeligroso() Then Application(AppNombre) = Obj.DtResultados
|
If Obj.GetMaterialPeligroso() Then HttpContext.Current.Application(AppNombre) = Obj.DtResultados
|
||||||
Obj.Dispose()
|
Obj.Dispose()
|
||||||
End If
|
End If
|
||||||
If CveMaterialPeligroso > 0 Then
|
If CveMaterialPeligroso > 0 Then
|
||||||
Dim Str As New StringBuilder
|
Dim Str As New StringBuilder
|
||||||
Str.AppendFormat("CveMaterialPeligroso = {0}", CveMaterialPeligroso)
|
Str.AppendFormat("CveMaterialPeligroso = {0}", CveMaterialPeligroso)
|
||||||
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)
|
||||||
GlobalDTMaterialPeligroso = Dv.ToTable
|
GlobalDTMaterialPeligroso = Dv.ToTable
|
||||||
Dv.Dispose()
|
Dv.Dispose()
|
||||||
Else
|
Else
|
||||||
GlobalDTMaterialPeligroso = DirectCast(Application(AppNombre), DataTable)
|
GlobalDTMaterialPeligroso = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Dim AppNombre As String = "GlobalDTMaterialPeligroso"
|
Dim AppNombre As String = "GlobalDTMaterialPeligroso"
|
||||||
Application(AppNombre) = value
|
HttpContext.Current.Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Property GlobalDTEmbalajes(Optional CveEmbalaje As Integer = -1) As DataTable
|
Public Shared Property GlobalDTEmbalajes(Optional CveEmbalaje As Integer = -1) As DataTable
|
||||||
Get
|
Get
|
||||||
|
|
||||||
Dim AppNombre As String = "GlobalDTEmbalajes"
|
Dim AppNombre As String = "GlobalDTEmbalajes"
|
||||||
'sino existe, recarga los datos
|
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||||
If Application(AppNombre) Is Nothing Then
|
|
||||||
Dim Obj As New ClsGenerales
|
Dim Obj As New ClsGenerales
|
||||||
If Obj.GetEmbalajes() Then Application(AppNombre) = Obj.DtResultados
|
If Obj.GetEmbalajes() Then HttpContext.Current.Application(AppNombre) = Obj.DtResultados
|
||||||
Obj.Dispose()
|
Obj.Dispose()
|
||||||
End If
|
End If
|
||||||
If CveEmbalaje > 0 Then
|
If CveEmbalaje > 0 Then
|
||||||
Dim Str As New StringBuilder
|
Dim Str As New StringBuilder
|
||||||
Str.AppendFormat("CveEmbalaje = {0}", CveEmbalaje)
|
Str.AppendFormat("CveEmbalaje = {0}", CveEmbalaje)
|
||||||
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)
|
||||||
GlobalDTEmbalajes = Dv.ToTable
|
GlobalDTEmbalajes = Dv.ToTable
|
||||||
Dv.Dispose()
|
Dv.Dispose()
|
||||||
Else
|
Else
|
||||||
GlobalDTEmbalajes = DirectCast(Application(AppNombre), DataTable)
|
GlobalDTEmbalajes = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Dim AppNombre As String = "GlobalDTEmbalajes"
|
Dim AppNombre As String = "GlobalDTEmbalajes"
|
||||||
Application(AppNombre) = value
|
HttpContext.Current.Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|||||||
@@ -1271,14 +1271,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
Private Function GETSATMaterialPeligroso(ByVal context As HttpContext) As String
|
Private Function GETSATMaterialPeligroso(ByVal context As HttpContext) As String
|
||||||
Dim retorno As String = ""
|
Dim retorno As String = ""
|
||||||
|
|
||||||
|
Dim DTUM = DirectCast(ClsPaginas.GlobalDTMaterialPeligroso, DataTable).AsEnumerable
|
||||||
If context.Application("GlobalDTMaterialPeligroso") Is Nothing Then
|
|
||||||
Dim ObjGrales As New ClsGenerales
|
|
||||||
If ObjGrales.GetMaterialPeligroso Then context.Application("GlobalDTMaterialPeligroso") = ObjGrales.DtResultados Else context.Application("GlobalDTMaterialPeligroso") = Nothing
|
|
||||||
ObjGrales.Dispose()
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim DTUM = DirectCast(context.Application("GlobalDTMaterialPeligroso"), DataTable).AsEnumerable
|
|
||||||
Dim DtPSRetorno As DataTable
|
Dim DtPSRetorno As DataTable
|
||||||
|
|
||||||
Dim Name = IfNull(context.Request("Name"), "-1").ToString
|
Dim Name = IfNull(context.Request("Name"), "-1").ToString
|
||||||
@@ -1308,14 +1301,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
Private Function GETSATEmbalajes(ByVal context As HttpContext) As String
|
Private Function GETSATEmbalajes(ByVal context As HttpContext) As String
|
||||||
Dim retorno As String = ""
|
Dim retorno As String = ""
|
||||||
|
|
||||||
|
Dim DTUM = DirectCast(ClsPaginas.GlobalDTEmbalajes, DataTable).AsEnumerable
|
||||||
If context.Application("GlobalDTEmbalajes") Is Nothing Then
|
|
||||||
Dim ObjGrales As New ClsGenerales
|
|
||||||
If ObjGrales.GetEmbalajes Then context.Application("GlobalDTEmbalajes") = ObjGrales.DtResultados Else context.Application("GlobalDTEmbalajes") = Nothing
|
|
||||||
ObjGrales.Dispose()
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim DTUM = DirectCast(context.Application("GlobalDTEmbalajes"), DataTable).AsEnumerable
|
|
||||||
Dim DtPSRetorno As DataTable
|
Dim DtPSRetorno As DataTable
|
||||||
|
|
||||||
Dim Name = IfNull(context.Request("Name"), "-1").ToString
|
Dim Name = IfNull(context.Request("Name"), "-1").ToString
|
||||||
@@ -1349,7 +1335,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
Private Function GetFraccionArancelaria(ByVal context As HttpContext) As String
|
Private Function GetFraccionArancelaria(ByVal context As HttpContext) As String
|
||||||
Dim retorno As String = ""
|
Dim retorno As String = ""
|
||||||
|
|
||||||
Dim DT = DirectCast(context.Application("GlobalDTFraccionArancelaria"), EnumerableRowCollection(Of DataRow))
|
Dim DT = ClsPaginas.GlobalDTFraccionArancelaria
|
||||||
Dim DtRetorno As DataTable
|
Dim DtRetorno As DataTable
|
||||||
|
|
||||||
Dim Name = IfNull(context.Request("Name"), "-1").ToString
|
Dim Name = IfNull(context.Request("Name"), "-1").ToString
|
||||||
|
|||||||
Reference in New Issue
Block a user