cambio de GlobalDTAlmacenUsuarios
This commit is contained in:
@@ -1014,7 +1014,7 @@ Public Class ClsPaginas
|
||||
Property GlobalDTProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, CveEstatus As Integer) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTProyectosUsuarios-{0}", CveEmpresa)
|
||||
If Application("GlobalDTProyectosUsuarios") Is Nothing Then
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
Dim ObjSubProyectos As New ClsSubProyectos()
|
||||
If ObjSubProyectos.GetSubProyectosUsuarios Then Application(AppNombre) = ObjSubProyectos.DtResultados.FiltraParametros("", "", {"Proyecto", "CveProyecto", "CveUsuario", "CveEmpresa", "CveEstatusProyecto"}) Else Alert("Ocurrió un error al cargar los Proyectos. Por favor comuniquese con sistemas.", TipoMensaje.MsgError)
|
||||
ObjSubProyectos.Dispose()
|
||||
@@ -1772,20 +1772,26 @@ Public Class ClsPaginas
|
||||
End Property
|
||||
Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1, Optional CveEstatus As Integer = 1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa)
|
||||
'sino existe, recarga los datos
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
Dim ObjUsr As New ClsSisUsuarios
|
||||
If ObjUsr.GetAlmacen(-1, CveEmpresa) Then Application(AppNombre) = ObjUsr.DtResultados
|
||||
ObjUsr.Dispose()
|
||||
End If
|
||||
|
||||
Dim Str As New StringBuilder
|
||||
If CveEmpresa <> -1 Then Str.AppendFormat("CveUsuario = {0} AND CveEmpresa = {1} ", CveUsuario, CveEmpresa)
|
||||
If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
|
||||
If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus)
|
||||
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTAlmacenUsuarios"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
||||
GlobalDTAlmacenUsuarios = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTAlmacenUsuarios") = value
|
||||
Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa)
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
@@ -1571,13 +1571,14 @@ Public Class ClsSisUsuarios
|
||||
|
||||
#End Region
|
||||
#Region " A L M A C E N "
|
||||
Public Function GetAlmacen(CveUsuario As Integer) As Boolean
|
||||
Public Function GetAlmacen(CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Sis_UsuariosAlmacenesGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
Reference in New Issue
Block a user