-- ajustes a global
This commit is contained in:
@@ -279,6 +279,12 @@ Public Class ClsPaginas
|
|||||||
End Property
|
End Property
|
||||||
Property GlobalDTPSATPS() As DataTable
|
Property GlobalDTPSATPS() As DataTable
|
||||||
Get
|
Get
|
||||||
|
If Application("GlobalDTPSATPS") Is Nothing Then
|
||||||
|
Dim ObjGrales As New ClsGenerales
|
||||||
|
If ObjGrales.GetSATProductosServicios Then Application("GlobalDTPSATPS") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATPS") = Nothing
|
||||||
|
ObjGrales.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
GlobalDTPSATPS = DirectCast(Application("GlobalDTPSATPS"), EnumerableRowCollection(Of DataRow)).CopyToDataTable
|
GlobalDTPSATPS = DirectCast(Application("GlobalDTPSATPS"), EnumerableRowCollection(Of DataRow)).CopyToDataTable
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
@@ -353,6 +359,12 @@ Public Class ClsPaginas
|
|||||||
|
|
||||||
Property GlobalDTEstado(ClaveSATPais As String) As DataTable
|
Property GlobalDTEstado(ClaveSATPais As String) As DataTable
|
||||||
Get
|
Get
|
||||||
|
If Application("GlobalDTEstado") Is Nothing Then
|
||||||
|
Dim ObjGrales As New ClsGenerales
|
||||||
|
If ObjGrales.GetSATEstado("-1") Then Application("GlobalDTEstado") = ObjGrales.DtResultados Else Application("GlobalDTEstado") = Nothing
|
||||||
|
ObjGrales.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
If ClaveSATPais <> "-1" Then
|
If ClaveSATPais <> "-1" Then
|
||||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTEstado"), DataTable), String.Format("ClaveSATPais = '{0}'", ClaveSATPais), "", DataViewRowState.CurrentRows)
|
Dim Dv As New DataView(DirectCast(Application("GlobalDTEstado"), DataTable), String.Format("ClaveSATPais = '{0}'", ClaveSATPais), "", DataViewRowState.CurrentRows)
|
||||||
GlobalDTEstado = Dv.ToTable
|
GlobalDTEstado = Dv.ToTable
|
||||||
@@ -369,6 +381,12 @@ Public Class ClsPaginas
|
|||||||
|
|
||||||
Property GlobalDTMunicipio(ClaveSATEstado As String) As DataTable
|
Property GlobalDTMunicipio(ClaveSATEstado As String) As DataTable
|
||||||
Get
|
Get
|
||||||
|
If Application("GlobalDTMunicipio") Is Nothing Then
|
||||||
|
Dim ObjGrales As New ClsGenerales
|
||||||
|
If ObjGrales.GetSATMunicipio("-1") Then Application("GlobalDTMunicipio") = ObjGrales.DtResultados Else Application("GlobalDTMunicipio") = Nothing
|
||||||
|
ObjGrales.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
If ClaveSATEstado <> "-1" Then
|
If ClaveSATEstado <> "-1" Then
|
||||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTMunicipio"), DataTable), String.Format("ClaveSATEstado = '{0}'", ClaveSATEstado), "", DataViewRowState.CurrentRows)
|
Dim Dv As New DataView(DirectCast(Application("GlobalDTMunicipio"), DataTable), String.Format("ClaveSATEstado = '{0}'", ClaveSATEstado), "", DataViewRowState.CurrentRows)
|
||||||
GlobalDTMunicipio = Dv.ToTable
|
GlobalDTMunicipio = Dv.ToTable
|
||||||
@@ -385,6 +403,12 @@ Public Class ClsPaginas
|
|||||||
|
|
||||||
Property GlobalDTColonia(ClaveSATMunicipio As String) As DataTable
|
Property GlobalDTColonia(ClaveSATMunicipio As String) As DataTable
|
||||||
Get
|
Get
|
||||||
|
If Application("GlobalDTColonia") Is Nothing Then
|
||||||
|
Dim ObjGrales As New ClsGenerales
|
||||||
|
If ObjGrales.GetSATColonia("-1") Then Application("GlobalDTColonia") = ObjGrales.DtResultados Else Application("GlobalDTColonia") = Nothing
|
||||||
|
ObjGrales.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
If ClaveSATMunicipio <> "-1" Then
|
If ClaveSATMunicipio <> "-1" Then
|
||||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTColonia"), DataTable), String.Format("ClaveSATMunicipio = '{0}'", ClaveSATMunicipio), "", DataViewRowState.CurrentRows)
|
Dim Dv As New DataView(DirectCast(Application("GlobalDTColonia"), DataTable), String.Format("ClaveSATMunicipio = '{0}'", ClaveSATMunicipio), "", DataViewRowState.CurrentRows)
|
||||||
GlobalDTColonia = Dv.ToTable
|
GlobalDTColonia = Dv.ToTable
|
||||||
@@ -403,6 +427,11 @@ Public Class ClsPaginas
|
|||||||
|
|
||||||
Property GlobalDTPSATUM() As DataTable
|
Property GlobalDTPSATUM() As DataTable
|
||||||
Get
|
Get
|
||||||
|
If Application("GlobalDTPSATUM") Is Nothing Then
|
||||||
|
Dim ObjGrales As New ClsGenerales
|
||||||
|
If ObjGrales.GetSATUnidadMedida Then Application("GlobalDTPSATUM") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATUM") = Nothing
|
||||||
|
ObjGrales.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
'System.Data.EnumerableRowCollection
|
'System.Data.EnumerableRowCollection
|
||||||
If Not IsNothing(Application("GlobalDTPSATUM")) Then
|
If Not IsNothing(Application("GlobalDTPSATUM")) Then
|
||||||
@@ -8125,7 +8154,8 @@ Public Class ClsPaginas
|
|||||||
Dim dtsec As DataTable = GlobalDTInvPSSeccionesAlmacen(CveEmpresa, CveAlmacen, CvePS)
|
Dim dtsec As DataTable = GlobalDTInvPSSeccionesAlmacen(CveEmpresa, CveAlmacen, CvePS)
|
||||||
DdlSeccionAlmacen.DataSource = dtsec
|
DdlSeccionAlmacen.DataSource = dtsec
|
||||||
DdlSeccionAlmacen.DataBind()
|
DdlSeccionAlmacen.DataBind()
|
||||||
If dtsec.Rows.Count = 1 Then
|
If dtsec Is Nothing Then Exit Sub
|
||||||
|
If dtsec.Rows.Count = 1 Then
|
||||||
DdlSeccionAlmacen.SelectedIndex = 0
|
DdlSeccionAlmacen.SelectedIndex = 0
|
||||||
DdlSeccionAlmacen.Enabled = False
|
DdlSeccionAlmacen.Enabled = False
|
||||||
Else 'si es mayor a uno que por default seleccione el primero, que seria el predeterminado
|
Else 'si es mayor a uno que por default seleccione el primero, que seria el predeterminado
|
||||||
|
|||||||
Reference in New Issue
Block a user