-cambios en globalsDT2

This commit is contained in:
janeth arvizu
2020-01-02 12:55:04 -07:00
parent 7dcdf8bc22
commit b9f942cb72
30 changed files with 878 additions and 649 deletions

View File

@@ -1562,34 +1562,34 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
HttpContext.Current.Application("GlobalDTSATUsosCFDI") = value
End Set
End Property
Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable
Get
If CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTUnidadesMedida"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " UnidadMedida", DataViewRowState.CurrentRows)
GlobalDTUnidadesMedida = Dv.ToTable
Dv.Dispose()
Else
GlobalDTUnidadesMedida = DirectCast(HttpContext.Current.Application("GlobalDTUnidadesMedida"), DataTable)
End If
End Get
Set(value As DataTable)
HttpContext.Current.Application("GlobalDTUnidadesMedida") = value
End Set
End Property
Property GlobalDTUnidadesMedidaAlias(Optional CveEmpresa As Integer = -1) As DataTable
Get
If CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTUnidadesMedidaAlias"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
GlobalDTUnidadesMedidaAlias = Dv.ToTable
Dv.Dispose()
Else
GlobalDTUnidadesMedidaAlias = DirectCast(HttpContext.Current.Application("GlobalDTUnidadesMedidaAlias"), DataTable)
End If
End Get
Set(value As DataTable)
HttpContext.Current.Application("GlobalDTUnidadesMedidaAlias") = value
End Set
End Property
'Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable
' Get
' If CveEmpresa <> -1 Then
' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTUnidadesMedida"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " UnidadMedida", DataViewRowState.CurrentRows)
' GlobalDTUnidadesMedida = Dv.ToTable
' Dv.Dispose()
' Else
' GlobalDTUnidadesMedida = DirectCast(HttpContext.Current.Application("GlobalDTUnidadesMedida"), DataTable)
' End If
' End Get
' Set(value As DataTable)
' HttpContext.Current.Application("GlobalDTUnidadesMedida") = value
' End Set
'End Property
'Property GlobalDTUnidadesMedidaAlias(Optional CveEmpresa As Integer = -1) As DataTable
' Get
' If CveEmpresa <> -1 Then
' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTUnidadesMedidaAlias"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
' GlobalDTUnidadesMedidaAlias = Dv.ToTable
' Dv.Dispose()
' Else
' GlobalDTUnidadesMedidaAlias = DirectCast(HttpContext.Current.Application("GlobalDTUnidadesMedidaAlias"), DataTable)
' End If
' End Get
' Set(value As DataTable)
' HttpContext.Current.Application("GlobalDTUnidadesMedidaAlias") = value
' End Set
'End Property
Property GlobalDTEstatusOrdenCompra() As DataTable
Get
GlobalDTEstatusOrdenCompra = DirectCast(HttpContext.Current.Application("GlobalDTEstatusOrdenCompra"), DataTable)
@@ -1657,44 +1657,44 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
HttpContext.Current.Application("GlobalDTProyectos") = value
End Set
End Property
Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable
Get
'Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable
' Get
If DirectCast(HttpContext.Current.Application("GlobalDTSubProyectos"), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application("GlobalDTSubProyectos"), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application("GlobalDTSubProyectos"), DataTable).Rows.Count = 0) Then
Dim P As New ClsSubProyectos
If P.GetSubProyectos Then
HttpContext.Current.Application("GlobalDTSubProyectos") = P.DtResultados
End If
P.Dispose()
' If DirectCast(HttpContext.Current.Application("GlobalDTSubProyectos"), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application("GlobalDTSubProyectos"), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application("GlobalDTSubProyectos"), DataTable).Rows.Count = 0) Then
' Dim P As New ClsSubProyectos
' If P.GetSubProyectos Then
' HttpContext.Current.Application("GlobalDTSubProyectos") = P.DtResultados
' End If
' P.Dispose()
Dim msg As String = "aqui no se carga subproyectos"
' Dim msg As String = "aqui no se carga subproyectos"
End If
' End If
If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then
Dim StrSQL As New StringBuilder
If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
If Estatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", Estatus)
If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
' If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then
' Dim StrSQL As New StringBuilder
' If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
' If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
' If Estatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", Estatus)
' If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSubProyectos"), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
GlobalDTSubProyectos = Dv.ToTable
Dv.Dispose()
' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSubProyectos"), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
' GlobalDTSubProyectos = Dv.ToTable
' Dv.Dispose()
Else
GlobalDTSubProyectos = DirectCast(HttpContext.Current.Application("GlobalDTSubProyectos"), DataTable)
End If
' Else
' GlobalDTSubProyectos = DirectCast(HttpContext.Current.Application("GlobalDTSubProyectos"), DataTable)
' End If
End Get
Set(ByVal value As DataTable)
If value Is Nothing OrElse value.Rows.Count = 0 Then
Dim msg As String = "aqui no se carga subproyectos"
' End Get
' Set(ByVal value As DataTable)
' If value Is Nothing OrElse value.Rows.Count = 0 Then
' Dim msg As String = "aqui no se carga subproyectos"
End If
HttpContext.Current.Application("GlobalDTSubProyectos") = value
End Set
End Property
' End If
' HttpContext.Current.Application("GlobalDTSubProyectos") = value
' End Set
'End Property
Property GlobalDTSubProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEstatus As Integer = -1) As DataTable
Get
@@ -2085,48 +2085,61 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
'Cliente
Property GlobalDTCliente(CveEmpresa As Integer, Optional Estatus As Integer = 1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTCliente{0}", CveEmpresa)
'sino existe, recarga los datos
If HttpContext.Current.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 HttpContext.Current.Application(AppNombre) = ObjClientes.DtResultados
ObjClientes.Dispose()
End If
If CveEmpresa <> -1 Then
Dim StrSQL As New StringBuilder
StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
If Estatus >= 0 Then StrSQL.AppendFormat(" AND EstatusBool = {0} ", Estatus)
If HttpContext.Current.Application("GlobalDTCliente") Is Nothing Then
Dim ObjClientes As New ClsClientes
If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, -1, Estatus:=-1) Then HttpContext.Current.Application("GlobalDTCliente") = ObjClientes.DtResultados Else HttpContext.Current.Application("GlobalDTCliente") = Nothing
ObjClientes.Dispose()
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTCliente"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
GlobalDTCliente = Dv.ToTable
Dv.Dispose()
Else
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTCliente"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
GlobalDTCliente = Dv.ToTable
Dv.Dispose()
End If
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
GlobalDTCliente = Dv.ToTable
Dv.Dispose()
Else
GlobalDTCliente = DirectCast(HttpContext.Current.Application("GlobalDTCliente"), DataTable)
GlobalDTCliente = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
End Get
Set(value As DataTable)
HttpContext.Current.Application("GlobalDTCliente") = value
Dim AppNombre As String = String.Format("GlobalDTCliente{0}", CveEmpresa)
HttpContext.Current.Application(AppNombre) = value
'Dim ObjClientes As New ClsClientes
'If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, Estatus:=-1) Then Application(AppNombre) = ObjClientes.DtResultados
'ObjClientes.Dispose()
End Set
End Property
Property GlobalDTClienteClasificaciones(CveEmpresa As Integer) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTClienteClasificaciones{0}", CveEmpresa)
'sino existe, recarga los datos
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjClientes As New ClsClientes
If ObjClientes.GetClienteClasificacion(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjClientes.DtResultados
ObjClientes.Dispose()
End If
If CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClienteClasificaciones"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
GlobalDTClienteClasificaciones = Dv.ToTable
Dv.Dispose()
Else
GlobalDTClienteClasificaciones = DirectCast(HttpContext.Current.Application("GlobalDTClienteClasificaciones"), DataTable)
GlobalDTClienteClasificaciones = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
End Get
Set(value As DataTable)
HttpContext.Current.Application("GlobalDTClasificacionesCliente") = value
Dim AppNombre As String = String.Format("GlobalDTClienteClasificaciones{0}", CveEmpresa)
HttpContext.Current.Application(AppNombre) = value
'Dim ObjClientes As New ClsClientes
'If ObjClientes.GetClienteClasificacion(CveEmpresa) Then Application(AppNombre) = ObjClientes.DtResultados
'ObjClientes.Dispose()
End Set
End Property
Property GlobalDTEstatusOrdenServicios(CveEmpresa As Integer) As DataTable