Cambio en GLOBAL Almacen
This commit is contained in:
@@ -7503,20 +7503,48 @@ Namespace Modelos
|
|||||||
HttpContext.Current.Application("GlobalDTSeccionAlmacen") = value
|
HttpContext.Current.Application("GlobalDTSeccionAlmacen") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTAlmacen(CveEmpresa As Integer) As DataTable
|
Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1, Optional CveAlmacen As Integer = -1) As DataTable
|
||||||
Get
|
Get
|
||||||
If CveEmpresa <> -1 Then
|
Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa)
|
||||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
|
'sino existe, recarga los datos
|
||||||
GlobalDTAlmacen = Dv.ToTable
|
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||||
Dv.Dispose()
|
Dim ObjUsr As New ClsInventarios
|
||||||
Else
|
If ObjUsr.GetAlmacenes(-1, -1, CveEmpresa, -1) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados
|
||||||
GlobalDTAlmacen = DirectCast(HttpContext.Current.Application("GlobalDTAlmacen"), DataTable)
|
ObjUsr.Dispose()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim Str As New StringBuilder
|
||||||
|
Str.Append("1=1 AND ")
|
||||||
|
If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa)
|
||||||
|
If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
|
||||||
|
If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus)
|
||||||
|
If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen)
|
||||||
|
|
||||||
|
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
||||||
|
GlobalDTAlmacen = Dv.ToTable
|
||||||
|
Dv.Dispose()
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
HttpContext.Current.Application("GlobalDTAlmacen") = value
|
Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa)
|
||||||
|
HttpContext.Current.Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
|
'Get
|
||||||
|
|
||||||
|
' Dim Str As New StringBuilder
|
||||||
|
' Str.Append("1=1 AND ")
|
||||||
|
' If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa)
|
||||||
|
' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
|
||||||
|
' If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus)
|
||||||
|
' If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen)
|
||||||
|
|
||||||
|
' Dim Dv As New DataView(DirectCast(Application("GlobalDTAlmacen"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
||||||
|
' GlobalDTAlmacen = Dv.ToTable
|
||||||
|
' Dv.Dispose()
|
||||||
|
|
||||||
|
'End Get
|
||||||
|
'Set(value As DataTable)
|
||||||
|
' Application("GlobalDTAlmacen") = value
|
||||||
|
'End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1) As DataTable
|
Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1) As DataTable
|
||||||
Get
|
Get
|
||||||
|
|||||||
@@ -215,11 +215,11 @@ Partial Class Inventarios_CatAlmacenes
|
|||||||
|
|
||||||
Private Sub RecargaGlobalAlmacenes()
|
Private Sub RecargaGlobalAlmacenes()
|
||||||
GlobalDTAlmacen(UsuarioActual.CveEmpresa) = Nothing
|
GlobalDTAlmacen(UsuarioActual.CveEmpresa) = Nothing
|
||||||
'Dim ObjAlmacen As New ClsInventarios
|
Dim ObjAlmacen As New ClsInventarios
|
||||||
'If ObjAlmacen.GetAlmacenes(-1, -1, -1, -1) Then
|
If ObjAlmacen.GetAlmacenes(-1, -1, -1, -1) Then
|
||||||
' GlobalDTAlmacen(-1) = ObjAlmacen.DtResultados
|
HttpContext.Current.Application("GlobalDTAlmacen") = ObjAlmacen.DtResultados
|
||||||
'End If
|
End If
|
||||||
'ObjAlmacen.Dispose()
|
ObjAlmacen.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub RecargaGlobalAlmacenesUsuarios()
|
Private Sub RecargaGlobalAlmacenesUsuarios()
|
||||||
|
|||||||
Reference in New Issue
Block a user