This commit is contained in:
@@ -183,7 +183,23 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
Else
|
Else
|
||||||
CveEmpresa = usuario.CveEmpresa
|
CveEmpresa = usuario.CveEmpresa
|
||||||
Dim Name = IfNull(context.Request("Name"), "-1").ToString
|
Dim Name = IfNull(context.Request("Name"), "-1").ToString
|
||||||
Dim dt As DataTable = DirectCast(context.Application("GlobalDTCliente"), DataTable).FiltraParametros($"CveEmpresa = {CveEmpresa}")
|
Dim AppNombre As String = String.Format("GlobalDTCliente{0}", CveEmpresa)
|
||||||
|
'sino existe, recarga los datos
|
||||||
|
If context.Application(AppNombre) Is Nothing Then
|
||||||
|
Dim ObjClientes As New ClsClientes
|
||||||
|
If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, Estatus:=-1) Then
|
||||||
|
context.Application(AppNombre) = ObjClientes.DtResultados
|
||||||
|
End If
|
||||||
|
ObjClientes.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Dim ObjClientes As New ClsClientes
|
||||||
|
'If ObjClientes.GetClientes(-1, Name, "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, Estatus:=-1) Then
|
||||||
|
' DtRetorno = ObjClientes.DtResultados
|
||||||
|
'End If
|
||||||
|
'ObjClientes.Dispose()
|
||||||
|
|
||||||
|
Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable).FiltraParametros($"CveEmpresa = {CveEmpresa}")
|
||||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||||
DtRetorno = dt.FiltraParametros($"NombreComercial like '%{Name}%'")
|
DtRetorno = dt.FiltraParametros($"NombreComercial like '%{Name}%'")
|
||||||
End If
|
End If
|
||||||
@@ -214,7 +230,22 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
Else
|
Else
|
||||||
CveEmpresa = usuario.CveEmpresa
|
CveEmpresa = usuario.CveEmpresa
|
||||||
Dim Name = IfNull(context.Request("Name"), "-1").ToString
|
Dim Name = IfNull(context.Request("Name"), "-1").ToString
|
||||||
Dim dt As DataTable = DirectCast(context.Application("GlobalDTCompProveedores"), DataTable).FiltraParametros($"CveEmpresa = {CveEmpresa}")
|
Dim AppNombre As String = String.Format("GlobalDTCompProveedores{0}", CveEmpresa)
|
||||||
|
'sino existe, recarga los datos
|
||||||
|
If context.Application(AppNombre) Is Nothing Then
|
||||||
|
Dim ObjProveedores As New ClsCompProveedores
|
||||||
|
If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaGlobalDT, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa) Then
|
||||||
|
context.Application(AppNombre) = ObjProveedores.DtResultados
|
||||||
|
End If
|
||||||
|
ObjProveedores.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Dim ObjProveedores As New ClsCompProveedores
|
||||||
|
'If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, -1, "-1", Name, "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa) Then
|
||||||
|
' DtRetorno = ObjProveedores.DtResultados
|
||||||
|
'End If
|
||||||
|
'ObjProveedores.Dispose()
|
||||||
|
Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable).FiltraParametros($"CveEmpresa = {CveEmpresa}")
|
||||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||||
DtRetorno = dt.FiltraParametros($"RazonSocial like '%{Name}%'")
|
DtRetorno = dt.FiltraParametros($"RazonSocial like '%{Name}%'")
|
||||||
End If
|
End If
|
||||||
@@ -320,6 +351,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
If objInv.GetExistenciasProductosLike(Name, CveClasificacion, CveSubProyecto, Estatus.ToEntero, AplicaParaVenta, CveEmpresa) Then
|
If objInv.GetExistenciasProductosLike(Name, CveClasificacion, CveSubProyecto, Estatus.ToEntero, AplicaParaVenta, CveEmpresa) Then
|
||||||
|
|
||||||
' limpio los almacenes donde no tiene ningun producto existencia
|
' limpio los almacenes donde no tiene ningun producto existencia
|
||||||
|
|
||||||
Dim i As Integer = 0
|
Dim i As Integer = 0
|
||||||
While i < objInv.DtResultados.Columns.Count
|
While i < objInv.DtResultados.Columns.Count
|
||||||
|
|
||||||
@@ -348,9 +380,18 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If UsaGlobal Then
|
If UsaGlobal Then
|
||||||
|
'se recarga el global, y el clspaginas, son los unicos 2 lugares
|
||||||
|
Dim AppNombre As String = String.Format("GlobalDTPSSimplificado{0}", CveEmpresa)
|
||||||
|
If context.Application(String.Format("GlobalDTPSSimplificado{0}", CveEmpresa)) Is Nothing Then
|
||||||
|
Dim ObjPS As New ClsProductosServicios
|
||||||
|
If ObjPS.GetPSSimplificado(CveEmpresa) Then context.Application(AppNombre) = ObjPS.DtResultados.AsEnumerable()
|
||||||
|
ObjPS.Dispose()
|
||||||
|
|
||||||
'Dim DTPS = DirectCast(context.Application("GlobalDTPSSimplificado"), EnumerableRowCollection(Of DataRow))
|
End If
|
||||||
Dim DTPS = ClsPaginas.GlobalDTPSSimplificado(CveEmpresa).AsEnumerable
|
|
||||||
|
|
||||||
|
Dim DTPS = DirectCast(context.Application(AppNombre), EnumerableRowCollection(Of DataRow))
|
||||||
|
'Dim DTPS = ClsPaginas.GlobalDTPSSimplificado(CveEmpresa).AsEnumerable
|
||||||
|
|
||||||
If DTPS IsNot Nothing Then
|
If DTPS IsNot Nothing Then
|
||||||
|
|
||||||
@@ -580,14 +621,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
Dim UsaGlobal As Boolean = True
|
Dim UsaGlobal As Boolean = True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If UsaGlobal Then
|
If UsaGlobal Then
|
||||||
|
|
||||||
|
Dim DTPS = DirectCast(context.Application(String.Format("GlobalDTPSSimplificado{0}", CveEmpresa)), EnumerableRowCollection(Of DataRow))
|
||||||
|
|
||||||
Dim DTPS = ClsPaginas.GlobalDTPSSimplificado(CveEmpresa).AsEnumerable ' DirectCast(context.Application("GlobalDTPSSimplificado"), EnumerableRowCollection(Of DataRow))
|
|
||||||
|
|
||||||
|
|
||||||
If DTPS IsNot Nothing Then
|
If DTPS IsNot Nothing Then
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user