diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index b287f64dc..7f52bb552 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -986,11 +986,11 @@ Public Class ClsGenerales End Try Return Retorno - End Function + End Function #End Region - + #Region "R I M T A M A N I O S" - Public Function GetRimTamanios(CveEmpresa As Integer, Optional CveRinTamaño As Integer = -1) As Boolean + Public Function GetRinTamanios(CveEmpresa As Integer, Optional CveRinTamaño As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_TamañosGet") diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index b2b9a8172..a78f11f99 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4401,6 +4401,45 @@ Public Class ClsPaginas Application(AppNombre) = value End Set End Property + + Public Shared Property GlobalDTPSRinTamaños(CveEmpresa As Integer, Optional CveRinTamaño As Integer = -1) As DataTable + Get + Dim AppNombre As String = $"GlobalDTPSRinTamaños-{CveEmpresa}" + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Using ObjGral As New ClsGenerales() + If ObjGral.GetRinTamanios(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjGral.DtResultados Else HttpContext.Current.Application(AppNombre) = Nothing + End Using + End If + Dim Str As New StringBuilder + If CveRinTamaño > 0 Then Str.AppendFormat(" CveRinTamaño = {0} ", CveRinTamaño) + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + GlobalDTPSRinTamaños = Dv.ToTable + End Get + Set(value As DataTable) + Dim AppNombre As String = $"GlobalDTPSRinTamaños-{CveEmpresa}" + HttpContext.Current.Application(AppNombre) = value + End Set + End Property + + Public Shared Property GlobalDTPSMedidas(CveEmpresa As Integer, Optional CveMedida As Integer = -1) As DataTable + Get + Dim AppNombre As String = $"GlobalDTPSMedidas-{CveEmpresa}" + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Using ObjGral As New ClsGenerales() + If ObjGral.GetMedidas(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjGral.DtResultados Else HttpContext.Current.Application(AppNombre) = Nothing + End Using + End If + Dim Str As New StringBuilder + If CveMedida <> -1 Then Str.AppendFormat(" CveMedida = {0} ", CveMedida) + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + GlobalDTPSMedidas = Dv.ToTable + End Get + Set(value As DataTable) + Dim AppNombre As String = $"GlobalDTPSMedidas-{CveEmpresa}" + HttpContext.Current.Application(AppNombre) = value + End Set + End Property + #Region "CITRUS GAME" Property GlobalDTGralEmpacados(CveEmpresa As Integer) As DataTable Get