From 7eafa124794db2de74f0f3ad10d6385f15b588b7 Mon Sep 17 00:00:00 2001 From: MLopez Date: Mon, 30 Jan 2023 21:38:30 -0700 Subject: [PATCH] =?UTF-8?q?Refactorizaci=C3=B3n/Mejoras=20en=20GlobalDTs?= =?UTF-8?q?=20CAMBIOS=20EN=20BD=20-=20Se=20MODIFIC=C3=93=20PA=5FProyectosG?= =?UTF-8?q?et=20en=20SIG=5FResp=5FMLR=20=20=20(se=20le=20agreg=C3=B3=20el?= =?UTF-8?q?=20par=C3=A1metro:=20CveEmpresa)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsPaginas.vb | 397 +++++++++++++++++++++++------------- App_Code/ClsProyectos.vb | 3 +- App_Code/Modelos.vb | 2 +- Ashx/SIGFacturacion.ashx | 2 +- CxC/GestionCobranza.aspx.vb | 4 +- CxC/RepCxC.aspx.vb | 2 +- CxC/RepCxCDetalle.aspx.vb | 4 +- CxC/RepCxCPeriodo.aspx.cs | 2 +- Global.asax | 90 ++++---- 9 files changed, 305 insertions(+), 201 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 59b3e072a..c07323a4c 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -1113,12 +1113,19 @@ Public Class ClsPaginas Application("GlobalDTClasificacionesPresupuestos") = value End Set End Property - Property GlobalDTMetodosPago() As DataTable + Public Shared Property GlobalDTMetodosPago() As DataTable Get - GlobalDTMetodosPago = DirectCast(Application("GlobalDTMetodosPago"), DataTable) + Dim AppNombre As String = "GlobalDTMetodosPago" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjMetodoPago As New ClsMetodosPagos + If ObjMetodoPago.GetMetodosPago() Then HttpContext.Current.Application(AppNombre) = ObjMetodoPago.DtResultados + ObjMetodoPago.Dispose() + End If + GlobalDTMetodosPago = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTMetodosPago") = value + Dim AppNombre As String = "GlobalDTMetodosPago" + HttpContext.Current.Application(AppNombre) = value End Set End Property Property GlobalDTModulos() As DataTable @@ -1337,67 +1344,72 @@ Public Class ClsPaginas Application("GlobalDTEstatusOrdenCompra") = value End Set End Property - Property GlobalDTLeyendasFiscales() As DataTable + Public Shared Property GlobalDTLeyendasFiscales() As DataTable Get - GlobalDTLeyendasFiscales = DirectCast(Application("GlobalDTLeyendasFiscales"), DataTable) + Dim AppNombre As String = "GlobalDTLeyendasFiscales" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjLeyendasFiscales As New ClsLeyendasFiscales + If ObjLeyendasFiscales.GetLeyendasFiscales() Then HttpContext.Current.Application(AppNombre) = ObjLeyendasFiscales.DtResultados + ObjLeyendasFiscales.Dispose() + End If + GlobalDTLeyendasFiscales = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTLeyendasFiscales") = value + Dim AppNombre As String = "GlobalDTLeyendasFiscales" + HttpContext.Current.Application(AppNombre) = value End Set End Property - - Property GlobalDTEstatusFactura() As DataTable + Public Shared Property GlobalDTEstatusFactura() As DataTable Get - GlobalDTEstatusFactura = DirectCast(Application("GlobalDTEstatusFactura"), DataTable) + Dim AppNombre As String = "GlobalDTEstatusFactura" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjEstatusFactura As New ClsEstatusFactura + If ObjEstatusFactura.GetEstatusFactura() Then HttpContext.Current.Application(AppNombre) = ObjEstatusFactura.DtResultados + ObjEstatusFactura.Dispose() + End If + GlobalDTEstatusFactura = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTEstatusFactura") = value + Dim AppNombre As String = "GlobalDTEstatusFactura" + HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTProyectos(CveEmpresa As Integer, Optional Estatus As Integer = -1) As DataTable + Public Shared Property GlobalDTProyectos(CveEmpresa As Integer, Optional Estatus As Integer = -1) As DataTable Get - - If DirectCast(Application("GlobalDTProyectos"), DataTable) Is Nothing Or (DirectCast(Application("GlobalDTProyectos"), DataTable) IsNot Nothing AndAlso DirectCast(Application("GlobalDTProyectos"), DataTable).Rows.Count = 0) Then - Dim P As New ClsProyectos - If P.GetProyectos Then - Application("GlobalDTProyectos") = P.DtResultados - End If - P.Dispose() + Dim AppNombre As String = $"GlobalDTProyectos-{CveEmpresa}" + 'sino existe, recarga los datos + If HttpContext.Current.Application(AppNombre) Is Nothing OrElse DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0 Then + Dim ObjProyectos As New ClsProyectos + If ObjProyectos.GetProyectos(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjProyectos.DtResultados + ObjProyectos.Dispose() Dim msg As String = "aqui no se carga proyectos" - If Request IsNot Nothing Then - msg = msg & Request.ServerVariables("URL") + If HttpContext.Current.Request IsNot Nothing Then + msg += HttpContext.Current.Request.ServerVariables("URL") End If msg.GuardaLog() - End If - - If CveEmpresa <> -1 OrElse Estatus <> -1 Then 'OrElse CveProyecto <> -1 - - Dim StrSQL As New StringBuilder - If CveEmpresa <> -1 Then StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa) - ' If CveProyecto <> -1 Then StrSQL.AppendFormat(" {0} CveProyecto = {1}", If(StrSQL.Length > 0, "AND", ""), CveProyecto) - If Estatus <> -1 Then StrSQL.AppendFormat(" {0} CveEstatus = {1}", If(StrSQL.Length > 0, "AND", ""), Estatus) - - Dim Dv As New DataView(DirectCast(Application("GlobalDTProyectos"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows) + If Estatus <> -1 Then 'OrElse CveProyecto <> -1 + 'Dim StrSQL As New StringBuilder + 'If Estatus <> -1 Then StrSQL.Append($"Estatus = {Estatus}") + 'If CveProyecto <> -1 Then StrSQL.Append(" {If(StrSQL.Length > 0, "AND", "")} CveProyecto = {CveProyecto}") + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), $"CveEstatus = {Estatus}", "", DataViewRowState.CurrentRows) GlobalDTProyectos = Dv.ToTable Dv.Dispose() - Else - GlobalDTProyectos = DirectCast(Application("GlobalDTProyectos"), DataTable) + GlobalDTProyectos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End If - End Get - Set(ByVal value As DataTable) + Set(value As DataTable) If value Is Nothing OrElse value.Rows.Count = 0 Then Dim msg As String = "aqui no se carga proyectos" - If Request IsNot Nothing Then - msg = msg & Request.ServerVariables("URL") + If HttpContext.Current.Request IsNot Nothing Then + msg += HttpContext.Current.Request.ServerVariables("URL") End If msg.GuardaLog() - End If - Application("GlobalDTProyectos") = value + Dim AppNombre As String = $"GlobalDTProyectos-{CveEmpresa}" + HttpContext.Current.Application(AppNombre) = value End Set End Property Public Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable @@ -1500,12 +1512,20 @@ Public Class ClsPaginas Application(AppNombre) = value End Set End Property - Property GlobalDTPrecioListas(CveEmpresa As Integer) As DataTable + Public Shared Property GlobalDTPrecioListas(CveEmpresa As Integer) As DataTable Get - GlobalDTPrecioListas = DirectCast(Application("GlobalDTPrecioListas"), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa)) + Dim AppNombre As String = $"GlobalDTPrecioListas-{CveEmpresa}" + 'sino existe, recarga los datos + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim ObjVentas As New ClsVentas + If ObjVentas.GetPrecioListas(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados + ObjVentas.Dispose() + End If + GlobalDTPrecioListas = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTPrecioListas") = value + Dim AppNombre As String = $"GlobalDTPrecioListas-{CveEmpresa}" + HttpContext.Current.Application(AppNombre) = value End Set End Property 'Property GlobalDTMesas() As DataTable @@ -1918,12 +1938,19 @@ Public Class ClsPaginas End Set End Property 'Bancos - Property GlobalDTBancos() As DataTable + Public Shared Property GlobalDTBancos() As DataTable Get - GlobalDTBancos = DirectCast(Application("GlobalDTBancos"), DataTable) + Dim AppNombre As String = "GlobalDTBancos" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjBancos As New ClsBancos + If ObjBancos.GetBancos() Then HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados + ObjBancos.Dispose() + End If + GlobalDTBancos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTBancos") = value + Dim AppNombre As String = "GlobalDTBancos" + HttpContext.Current.Application(AppNombre) = value End Set End Property 'Property GlobalDTBancosCuentas(CveUsuario As Integer) As DataTable @@ -1970,24 +1997,34 @@ Public Class ClsPaginas Application(AppNombre) = value End Set End Property - Property GlobalDTTipoTransacciones() As DataTable + Public Shared Property GlobalDTTipoTransacciones() As DataTable Get - If UsuarioActual.CveEmpresa = 66 Then - GlobalDTTipoTransacciones = DirectCast(Application("GlobalDTTipoTransacciones"), DataTable).FiltraParametros("Estatus = 1") - Else - GlobalDTTipoTransacciones = DirectCast(Application("GlobalDTTipoTransacciones"), DataTable) + Dim AppNombre As String = "GlobalDTTipoTransacciones" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjBancos As New ClsBancos + If ObjBancos.GetBancos_TiposTransaccion(-1) Then HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados + ObjBancos.Dispose() End If + GlobalDTTipoTransacciones = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTTipoTransacciones") = value + Dim AppNombre As String = "GlobalDTTipoTransacciones" + HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTBancosEstatusIE() As DataTable + Public Shared Property GlobalDTBancosEstatusIE() As DataTable Get - GlobalDTBancosEstatusIE = DirectCast(Application("GlobalDTBancosEstatusIE"), DataTable) + Dim AppNombre As String = "GlobalDTBancosEstatusIE" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjBancos As New ClsBancos + If ObjBancos.GetBancos_EstatusIE() Then HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados + ObjBancos.Dispose() + End If + GlobalDTBancosEstatusIE = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTBancosEstatusIE") = value + Dim AppNombre As String = "GlobalDTBancosEstatusIE" + HttpContext.Current.Application(AppNombre) = value End Set End Property Property GlobalDTBancosIE() As DataTable @@ -1998,12 +2035,19 @@ Public Class ClsPaginas Application("GlobalDTBancosIE") = value End Set End Property - Property GlobalDTTipoCuenta() As DataTable + Public Shared Property GlobalDTTipoCuenta() As DataTable Get - GlobalDTTipoCuenta = DirectCast(Application("GlobalDTTipoCuenta"), DataTable) + Dim AppNombre As String = "GlobalDTTipoCuenta" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjBancos As New ClsBancos + If ObjBancos.GetBancos_TiposCuenta() Then HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados + ObjBancos.Dispose() + End If + GlobalDTTipoCuenta = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTTipoCuenta") = value + Dim AppNombre As String = "GlobalDTTipoCuenta" + HttpContext.Current.Application(AppNombre) = value End Set End Property 'Fin Bancos @@ -2249,32 +2293,37 @@ Public Class ClsPaginas Application(AppNombre) = value End Set End Property - Property GlobalDTTipoAlmacen(CveEmpresa As Integer) As DataTable + Public Shared Property GlobalDTTipoAlmacen(CveEmpresa As Integer) As DataTable Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(Application("GlobalDTTipoAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTTipoAlmacen = Dv.ToTable - Dv.Dispose() - Else - GlobalDTTipoAlmacen = DirectCast(Application("GlobalDTTipoAlmacen"), DataTable) + Dim AppNombre As String = $"GlobalDTTipoAlmacen-{CveEmpresa}" + 'sino existe, recarga los datos + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim Objinventarios As New ClsInventarios + If Objinventarios.GetTiposAlmacenes() Then HttpContext.Current.Application(AppNombre) = Objinventarios.DtResultados + Objinventarios.Dispose() End If - + GlobalDTTipoAlmacen = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTTipoAlmacen") = value + Dim AppNombre As String = $"GlobalDTTipoAlmacen-{CveEmpresa}" + HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTInvConceptos() As DataTable + Public Shared Property GlobalDTInvConceptos() As DataTable Get - - Return DirectCast(Application("GlobalDTInvConceptos"), DataTable) - + Dim AppNombre As String = "GlobalDTInvConceptos" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim Objinventarios As New ClsInventarios + If Objinventarios.GetConceptos() Then HttpContext.Current.Application(AppNombre) = Objinventarios.DtResultados + Objinventarios.Dispose() + End If + GlobalDTInvConceptos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTInvConceptos") = value + Dim AppNombre As String = "GlobalDTInvConceptos" + HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1, Optional CveAlmacen As Integer = -1) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa) @@ -2343,31 +2392,26 @@ Public Class ClsPaginas End Set End Property - Property GlobalDTSeccionAlmacen(CveEmpresa As Integer, CveAlmacen As Integer) As DataTable + Public Shared Property GlobalDTSeccionAlmacen(CveEmpresa As Integer, CveAlmacen As Integer) As DataTable Get - Dim AppNombre As String = String.Format("GlobalDTSeccionAlmacen-{0}", CveEmpresa) + Dim AppNombre As String = $"GlobalDTSeccionAlmacen-{CveEmpresa}" 'sino existe, recarga los datos - If Application(AppNombre) Is Nothing Then + If HttpContext.Current.Application(AppNombre) Is Nothing Then Dim ObjInv As New ClsInventarios - If ObjInv.GetSeccionesAlmacenes(CveEmpresa, -1) Then Application(AppNombre) = ObjInv.DtResultados + If ObjInv.GetSeccionesAlmacenes(CveEmpresa, -1) Then HttpContext.Current.Application(AppNombre) = ObjInv.DtResultados ObjInv.Dispose() End If - If CveEmpresa <> -1 Then - Dim Str As New StringBuilder - - If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa) - If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen) - Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + If CveAlmacen > 0 Then + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), $"CveAlmacen = {CveAlmacen}", "", DataViewRowState.CurrentRows) GlobalDTSeccionAlmacen = Dv.ToTable Dv.Dispose() Else - GlobalDTSeccionAlmacen = DirectCast(Application("GlobalDTSeccionAlmacen"), DataTable) + GlobalDTSeccionAlmacen = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End If - End Get Set(value As DataTable) - Dim AppNombre As String = String.Format("GlobalDTSeccionAlmacen-{0}", CveEmpresa) - Application(AppNombre) = value + Dim AppNombre As String = $"GlobalDTSeccionAlmacen-{CveEmpresa}" + HttpContext.Current.Application(AppNombre) = value End Set End Property @@ -2425,54 +2469,89 @@ Public Class ClsPaginas Application("GlobalDTNom_Periodos") = value End Set End Property - Public Property GlobalDTVtaFormaPago() As DataTable + Public Shared Property GlobalDTVtaFormaPago() As DataTable Get - GlobalDTVtaFormaPago = DirectCast(Application("GlobalDTVtaFormaPago"), DataTable) + Dim AppNombre As String = "GlobalDTVtaFormaPago" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjVentas As New ClsVentas + If ObjVentas.GetFormaPago() Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados + ObjVentas.Dispose() + End If + GlobalDTVtaFormaPago = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTVtaFormaPago") = value + Dim AppNombre As String = "GlobalDTVtaFormaPago" + HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTVtaMetodoPago() As DataTable + Public Shared Property GlobalDTVtaMetodoPago() As DataTable Get - GlobalDTVtaMetodoPago = DirectCast(Application("GlobalDTVtaMetodoPago"), DataTable) + Dim AppNombre As String = "GlobalDTVtaMetodoPago" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjVentas As New ClsVentas + If ObjVentas.GetMetodoPago() Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados + ObjVentas.Dispose() + End If + GlobalDTVtaMetodoPago = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTVtaMetodoPago") = value + Dim AppNombre As String = "GlobalDTVtaMetodoPago" + HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTVtaTiposRelacion() As DataTable + Public Shared Property GlobalDTVtaTiposRelacion() As DataTable Get - GlobalDTVtaTiposRelacion = DirectCast(Application("GlobalDTVtaTiposRelacion"), DataTable) + Dim AppNombre As String = "GlobalDTVtaTiposRelacion" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjVentas As New ClsVentas + If ObjVentas.GetTiposRelacion() Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados + ObjVentas.Dispose() + End If + GlobalDTVtaTiposRelacion = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTVtaTiposRelacion") = value + Dim AppNombre As String = "GlobalDTVtaTiposRelacion" + HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTTiposDocumentos() As DataTable + Public Shared Property GlobalDTTiposDocumentos() As DataTable Get - GlobalDTTiposDocumentos = DirectCast(Application("GlobalDTTiposDocumentos"), DataTable) + Dim AppNombre As String = "GlobalDTTiposDocumentos" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjVentas As New ClsVentas + If ObjVentas.GetTiposDocumentos() Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados + ObjVentas.Dispose() + End If + GlobalDTTiposDocumentos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTTiposDocumentos") = value + Dim AppNombre As String = "GlobalDTTiposDocumentos" + HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTCobranzaEstatus(CveEmpresa As Integer) As DataTable + Public Shared Property GlobalDTVtaCobranzaEstatus(CveEmpresa As Integer, Optional CveCobranzaEstatus As Integer = -1) As DataTable Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(Application("GlobalDTVtaCobranzaEstatus"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTCobranzaEstatus = Dv.ToTable + Dim AppNombre As String = $"GlobalDTVtaCobranzaEstatus-{CveEmpresa}" + 'sino existe, recarga los datos + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim ObjVentas As New ClsVentas + If ObjVentas.GetCobranzaEstatus(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados + ObjVentas.Dispose() + End If + If CveCobranzaEstatus <> -1 Then + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), $"CveCobranzaEstatus = {CveCobranzaEstatus}", "", DataViewRowState.CurrentRows) + GlobalDTVtaCobranzaEstatus = Dv.ToTable Dv.Dispose() Else - GlobalDTCobranzaEstatus = DirectCast(Application("GlobalDTVtaCobranzaEstatus"), DataTable) + GlobalDTVtaCobranzaEstatus = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End If End Get Set(value As DataTable) - Application("GlobalDTVtaCobranzaEstatus") = value + Dim AppNombre As String = $"GlobalDTVtaCobranzaEstatus-{CveEmpresa}" + HttpContext.Current.Application(AppNombre) = value End Set End Property - #Region "***********************************************************************DT EVENTOS****************************************************************************************" Property GlobalDTTiposEventos() As DataTable Get @@ -2492,21 +2571,48 @@ Public Class ClsPaginas End Set End Property - Property GlobalDTOIEventoTarea() As DataTable + Public Shared Property GlobalDTOIEventoTarea(CveEmpresa As Integer, Optional CveUsuario As Integer = -1) As DataTable Get - GlobalDTOIEventoTarea = DirectCast(Application("GlobalDTOIEventoTarea"), DataTable) + Dim AppNombre As String = $"GlobalDTOIEventoTarea-{CveEmpresa}" + 'sino existe, recarga los datos + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim ObjEventos As New ClsOIEventos + If ObjEventos.GetEventoTarea(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjEventos.DtResultados + ObjEventos.Dispose() + End If + If CveUsuario <> -1 Then + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), $"CveUsuario = {CveUsuario}", "", DataViewRowState.CurrentRows) + GlobalDTOIEventoTarea = Dv.ToTable + Dv.Dispose() + Else + GlobalDTOIEventoTarea = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) + End If End Get Set(value As DataTable) - Application("GlobalDTOIEventoTarea") = value + Dim AppNombre As String = $"GlobalDTOIEventoTarea-{CveEmpresa}" + HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTOIEstatusEventos() As DataTable + Public Shared Property GlobalDTOIEstatusEventos(Optional CveEventoEstatus As Integer = -1) As DataTable Get - GlobalDTOIEstatusEventos = DirectCast(Application("GlobalDTOIEstatusEventos"), DataTable) + Dim AppNombre As String = "GlobalDTOIEstatusEventos" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjEventos As New ClsOIEventos + If ObjEventos.GetEstatusEventos(-1) Then HttpContext.Current.Application(AppNombre) = ObjEventos.DtResultados + ObjEventos.Dispose() + End If + If CveEventoEstatus > 0 Then + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), $"CveEventoEstatus = {CveEventoEstatus}", "", DataViewRowState.CurrentRows) + GlobalDTOIEstatusEventos = Dv.ToTable + Dv.Dispose() + Else + GlobalDTOIEstatusEventos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) + End If End Get Set(value As DataTable) - Application("GlobalDTOIEstatusEventos") = value + Dim AppNombre As String = "GlobalDTOIEstatusEventos" + HttpContext.Current.Application(AppNombre) = value End Set End Property #End Region @@ -4030,50 +4136,53 @@ Public Class ClsPaginas End Get End Property - Property GlobalDTOIRevision(CveEmpresa As Integer) As DataTable + Public Shared Property GlobalDTOIRevision(CveEmpresa As Integer) As DataTable Get - If CveEmpresa <> -1 Then - Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(Application("GlobalDTOIRevision"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTOIRevision = Dv.ToTable - Dv.Dispose() - Else - GlobalDTOIRevision = DirectCast(Application("GlobalDTOIRevision"), DataTable) + Dim AppNombre As String = $"GlobalDTOIRevision-{CveEmpresa}" + 'sino existe, recarga los datos + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim ObjEventos As New ClsOIEventos + If ObjEventos.GetRevisionesEventos(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjEventos.DtResultados + ObjEventos.Dispose() End If + GlobalDTOIRevision = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTOIRevision") = value + Dim AppNombre As String = $"GlobalDTOIRevision-{CveEmpresa}" + HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTOIAgendaTipo() As DataTable + + Public Shared Property GlobalDTOIAgendaTipo() As DataTable Get - GlobalDTOIAgendaTipo = DirectCast(Application("GlobalDTOIAgendaTipo"), DataTable) - End Get - Set(value As DataTable) - Application("GlobalDTOIAgendaTipo") = value - End Set - End Property - Property GlobalDTOIAgenda() As DataTable - Get - GlobalDTOIAgenda = DirectCast(Application("GlobalDTOIAgenda"), DataTable) - End Get - Set(value As DataTable) - Application("GlobalDTOIAgenda") = value - End Set - End Property - Property GlobalDTVtaCondicionesEntrega(Optional CveEmpresa As Integer = -1) As DataTable - Get - If CveEmpresa <> -1 Then - Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(Application("GlobalDTVtaCondicionesEntrega"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTVtaCondicionesEntrega = Dv.ToTable - Dv.Dispose() - Else - GlobalDTVtaCondicionesEntrega = DirectCast(Application("GlobalDTVtaCondicionesEntrega"), DataTable) + Dim AppNombre As String = "GlobalDTOIAgendaTipo" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjEventos As New ClsOIEventos + If ObjEventos.GetAgendaTipo() Then HttpContext.Current.Application(AppNombre) = ObjEventos.DtResultados + ObjEventos.Dispose() End If + GlobalDTOIAgendaTipo = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTVtaCondicionesEntrega") = value + Dim AppNombre As String = "GlobalDTOIAgendaTipo" + HttpContext.Current.Application(AppNombre) = value + End Set + End Property + + Public Shared Property GlobalDTVtaCondicionesEntrega(Optional CveEmpresa As Integer = -1) As DataTable + Get + Dim AppNombre As String = $"GlobalDTVtaCondicionesEntrega-{CveEmpresa}" + 'sino existe, recarga los datos + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim ObjVentas As New ClsVentas + If ObjVentas.GetCondicionesEntrega(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados + ObjVentas.Dispose() + End If + GlobalDTVtaCondicionesEntrega = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) + End Get + Set(value As DataTable) + Dim AppNombre As String = $"GlobalDTVtaCondicionesEntrega-{CveEmpresa}" + HttpContext.Current.Application(AppNombre) = value End Set End Property Property GlobalDTPaqueteriaGuiaTipos(CveEmpresa As Integer) As DataTable diff --git a/App_Code/ClsProyectos.vb b/App_Code/ClsProyectos.vb index 38f6a15dd..f26258873 100644 --- a/App_Code/ClsProyectos.vb +++ b/App_Code/ClsProyectos.vb @@ -128,11 +128,12 @@ Public Class ClsProyectos SqlTransacc = Nothing End Sub - Public Function GetProyectos(Optional Opcion As Integer = -1) As Boolean + Public Function GetProyectos(CveEmpresa As Integer, Optional Opcion As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_ProyectosGet") With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@Opcion", SqlDbType.Int).Value = Opcion End With Try diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index d1a3e66b5..25576d87b 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -7797,7 +7797,7 @@ Namespace Modelos If DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable).Rows.Count = 0) Then Dim P As New ClsProyectos - If P.GetProyectos Then + If P.GetProyectos(-1) Then HttpContext.Current.Application("GlobalDTProyectos") = P.DtResultados End If P.Dispose() diff --git a/Ashx/SIGFacturacion.ashx b/Ashx/SIGFacturacion.ashx index d9fa69a59..590b27b3c 100644 --- a/Ashx/SIGFacturacion.ashx +++ b/Ashx/SIGFacturacion.ashx @@ -1650,7 +1650,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState If DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable).Rows.Count = 0) Then Dim P As New ClsProyectos - If P.GetProyectos Then + If P.GetProyectos(-1) Then HttpContext.Current.Application("GlobalDTProyectos") = P.DtResultados End If P.Dispose() diff --git a/CxC/GestionCobranza.aspx.vb b/CxC/GestionCobranza.aspx.vb index 183098cf2..836c147bf 100644 --- a/CxC/GestionCobranza.aspx.vb +++ b/CxC/GestionCobranza.aspx.vb @@ -57,11 +57,11 @@ Partial Class Ventas_GestionCobranza DdlResponsableCobranza.DataBind() DdlResponsableCobranza.Items.Insert(0, New ListItem("Todos", "-1")) - DdlCobranzaEstatus.DataSource = GlobalDTCobranzaEstatus(UsuarioActual.CveEmpresa) + DdlCobranzaEstatus.DataSource = GlobalDTVtaCobranzaEstatus(UsuarioActual.CveEmpresa) DdlCobranzaEstatus.DataBind() DdlCobranzaEstatus.Items.Insert(0, New ListItem("Todos", "-1")) - DdlCobranzaEstatusEdit.DataSource = GlobalDTCobranzaEstatus(UsuarioActual.CveEmpresa) + DdlCobranzaEstatusEdit.DataSource = GlobalDTVtaCobranzaEstatus(UsuarioActual.CveEmpresa) DdlCobranzaEstatusEdit.DataBind() If ObjVentas.GetCobranzaTurnoEstatus(-1, UsuarioActual.CveEmpresa) Then diff --git a/CxC/RepCxC.aspx.vb b/CxC/RepCxC.aspx.vb index f6030f5be..4b47b850e 100644 --- a/CxC/RepCxC.aspx.vb +++ b/CxC/RepCxC.aspx.vb @@ -152,7 +152,7 @@ Partial Class RepCxC txtCorteA.Text = $"31/12/{Now.Year}" 'Carga Cobranza Estatus - DdlCobranzaEstatus.DataSource = GlobalDTCobranzaEstatus(UsuarioActual.CveEmpresa) + DdlCobranzaEstatus.DataSource = GlobalDTVtaCobranzaEstatus(UsuarioActual.CveEmpresa) DdlCobranzaEstatus.DataBind() DdlCobranzaEstatus.Items.Insert(0, New ListItem("Todos", "-1")) diff --git a/CxC/RepCxCDetalle.aspx.vb b/CxC/RepCxCDetalle.aspx.vb index ee74096fa..98befc41c 100644 --- a/CxC/RepCxCDetalle.aspx.vb +++ b/CxC/RepCxCDetalle.aspx.vb @@ -280,7 +280,7 @@ Partial Class RepCxCDetalle DdlTipoDocto.Items.Add(New ListItem("Ing X Comp", "IxC")) 'Carga Cobranza Estatus - DdlCobranzaEstatusFiltro.DataSource = GlobalDTCobranzaEstatus(UsuarioActual.CveEmpresa) + DdlCobranzaEstatusFiltro.DataSource = GlobalDTVtaCobranzaEstatus(UsuarioActual.CveEmpresa) DdlCobranzaEstatusFiltro.DataBind() DdlCobranzaEstatusFiltro.Items.Insert(0, New ListItem("Todos", "-1")) @@ -1062,7 +1062,7 @@ Partial Class RepCxCDetalle DdlUsuarioCobranza.DataBind() DdlUsuarioCobranza.Items.Insert(0, New ListItem("Sin Cobrador", "-1")) - DdlCobranzaEstatus.DataSource = GlobalDTCobranzaEstatus(UsuarioActual.CveEmpresa) + DdlCobranzaEstatus.DataSource = GlobalDTVtaCobranzaEstatus(UsuarioActual.CveEmpresa) DdlCobranzaEstatus.DataBind() DdlCobranzaEstatus.Items.Insert(0, New ListItem("Sin Estatus", "-1")) diff --git a/CxC/RepCxCPeriodo.aspx.cs b/CxC/RepCxCPeriodo.aspx.cs index ab35f80f1..83ab94427 100644 --- a/CxC/RepCxCPeriodo.aspx.cs +++ b/CxC/RepCxCPeriodo.aspx.cs @@ -81,7 +81,7 @@ public partial class CxC_RepCxCPeriodo : ClsPaginas txtCorteA.Text = $"31/12/{DateTime.Now.Year}"; //Carga Cobranza Estatus - DdlCobranzaEstatus.DataSource = get_GlobalDTCobranzaEstatus(UsuarioActual.CveEmpresa); + DdlCobranzaEstatus.DataSource = get_GlobalDTVtaCobranzaEstatus(UsuarioActual.CveEmpresa); DdlCobranzaEstatus.DataBind(); DdlCobranzaEstatus.Items.Insert(0, new ListItem("Todos", "-1")); diff --git a/Global.asax b/Global.asax index 7c4e7e04d..4590b7858 100644 --- a/Global.asax +++ b/Global.asax @@ -193,27 +193,27 @@ 'B A N C O S - GuardaLogAsax(String.Format("Globalasax 12:{0}", DateTime.Now)) - Using ObjBancos As New ClsBancos - 'If ObjBancos.GetBancosCuentasUsuarios(-1) Then Application("GlobalDTBancosCuentas") = ObjBancos.DtResultados Else Application("GlobalDTBancosCuentas") = Nothing - 'If ObjBancos.GetBancosCuentasUsuarios(-1) Then Application("GlobalDTBancosCuentas") = ObjBancos.DtResultados Else Application("GlobalDTBancosCuentas") = Nothing - If ObjBancos.GetBancos_TiposTransaccion(-1) Then Application("GlobalDTTipoTransacciones") = ObjBancos.DtResultados Else Application("GlobalDTTipoTransacciones") = Nothing - If ObjBancos.GetBancos_EstatusIE() Then Application("GlobalDTBancosEstatusIE") = ObjBancos.DtResultados Else Application("GlobalDTBancosEstatusIE") = Nothing - If ObjBancos.GetBancos() Then Application("GlobalDTBancos") = ObjBancos.DtResultados Else Application("GlobalDTBancos") = Nothing - If ObjBancos.GetBancos_TiposCuenta() Then Application("GlobalDTTipoCuenta") = ObjBancos.DtResultados Else Application("GlobalDTTipoCuenta") = Nothing - End Using + 'GuardaLogAsax(String.Format("Globalasax 12:{0}", DateTime.Now)) + 'Using ObjBancos As New ClsBancos + 'If ObjBancos.GetBancosCuentasUsuarios(-1) Then Application("GlobalDTBancosCuentas") = ObjBancos.DtResultados Else Application("GlobalDTBancosCuentas") = Nothing + 'If ObjBancos.GetBancosCuentasUsuarios(-1) Then Application("GlobalDTBancosCuentas") = ObjBancos.DtResultados Else Application("GlobalDTBancosCuentas") = Nothing + 'If ObjBancos.GetBancos_TiposTransaccion(-1) Then Application("GlobalDTTipoTransacciones") = ObjBancos.DtResultados Else Application("GlobalDTTipoTransacciones") = Nothing + 'If ObjBancos.GetBancos_EstatusIE() Then Application("GlobalDTBancosEstatusIE") = ObjBancos.DtResultados Else Application("GlobalDTBancosEstatusIE") = Nothing + 'If ObjBancos.GetBancos() Then Application("GlobalDTBancos") = ObjBancos.DtResultados Else Application("GlobalDTBancos") = Nothing + 'If ObjBancos.GetBancos_TiposCuenta() Then Application("GlobalDTTipoCuenta") = ObjBancos.DtResultados Else Application("GlobalDTTipoCuenta") = Nothing + 'End Using - GuardaLogAsax(String.Format("Globalasax 13:{0}", DateTime.Now)) + 'GuardaLogAsax(String.Format("Globalasax 13:{0}", DateTime.Now)) '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 'I N V E N T A R I O S - Using Objinventarios As New ClsInventarios - 'If Objinventarios.GetAlmacenes(-1, -1, -1, -1) Then Application("GlobalDTAlmacen") = Objinventarios.DtResultados Else Application("GlobalDTAlmacen") = Nothing - If Objinventarios.GetSeccionesAlmacenes(-1, -1) Then Application("GlobalDTSeccionAlmacen") = Objinventarios.DtResultados Else Application("GlobalDTSeccionAlmacen") = Nothing - If Objinventarios.GetTiposAlmacenes Then Application("GlobalDTTipoAlmacen") = Objinventarios.DtResultados Else Application("GlobalDTTipoAlmacen") = Nothing - If Objinventarios.GetConceptos Then Application("GlobalDTInvConceptos") = Objinventarios.DtResultados Else Application("GlobalDTInvConceptos") = Nothing - End Using + 'Using Objinventarios As New ClsInventarios + 'If Objinventarios.GetAlmacenes(-1, -1, -1, -1) Then Application("GlobalDTAlmacen") = Objinventarios.DtResultados Else Application("GlobalDTAlmacen") = Nothing + 'If Objinventarios.GetSeccionesAlmacenes(-1, -1) Then Application("GlobalDTSeccionAlmacen") = Objinventarios.DtResultados Else Application("GlobalDTSeccionAlmacen") = Nothing + 'If Objinventarios.GetTiposAlmacenes Then Application("GlobalDTTipoAlmacen") = Objinventarios.DtResultados Else Application("GlobalDTTipoAlmacen") = Nothing + 'If Objinventarios.GetConceptos Then Application("GlobalDTInvConceptos") = Objinventarios.DtResultados Else Application("GlobalDTInvConceptos") = Nothing + 'End Using GuardaLogAsax(String.Format("Globalasax 14:{0}", DateTime.Now)) '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ @@ -262,18 +262,16 @@ 'If ObjGrales.GetSATMunicipio("-1") Then Application("GlobalDTMunicipio") = ObjGrales.DtResultados Else Application("GlobalDTMunicipio") = Nothing 'If ObjGrales.GetSATColonia("-1") Then Application("GlobalDTColonia") = ObjGrales.DtResultados Else Application("GlobalDTColonia") = Nothing End Using -#End If - GuardaLogAsax(String.Format("Globalasax 16:{0}", DateTime.Now)) + 'GuardaLogAsax(String.Format("Globalasax 16:{0}", DateTime.Now)) '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 'E V E N T O S - Using ObjEventos As New ClsOIEventos - If ObjEventos.GetEstatusEventos(-1) Then Application("GlobalDTOIEstatusEventos") = ObjEventos.DtResultados Else Application("GlobalDTOIEstatusEventos") = Nothing - If ObjEventos.GetRevisionesEventos(-1) Then Application("GlobalDTOIRevision") = ObjEventos.DtResultados Else Application("GlobalDTOIRevision") = Nothing - If ObjEventos.GetAgendaTipo() Then Application("GlobalDTOIAgendaTipo") = ObjEventos.DtResultados Else Application("GlobalDTOIAgendaTipo") = Nothing - If ObjEventos.GetEventoTarea(-1, -1) Then Application("GlobalDTOIEventoTarea") = ObjEventos.DtResultados Else Application("GlobalDTOIEventoTarea") = Nothing - End Using - + 'Using ObjEventos As New ClsOIEventos + 'If ObjEventos.GetEstatusEventos(-1) Then Application("GlobalDTOIEstatusEventos") = ObjEventos.DtResultados Else Application("GlobalDTOIEstatusEventos") = Nothing + 'If ObjEventos.GetRevisionesEventos(-1) Then Application("GlobalDTOIRevision") = ObjEventos.DtResultados Else Application("GlobalDTOIRevision") = Nothing + 'If ObjEventos.GetAgendaTipo() Then Application("GlobalDTOIAgendaTipo") = ObjEventos.DtResultados Else Application("GlobalDTOIAgendaTipo") = Nothing + 'If ObjEventos.GetEventoTarea(-1, -1) Then Application("GlobalDTOIEventoTarea") = ObjEventos.DtResultados Else Application("GlobalDTOIEventoTarea") = Nothing + 'End Using GuardaLogAsax(String.Format("Globalasax 17:{0}", DateTime.Now)) '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 'V E N T A S @@ -289,11 +287,7 @@ If ObjVentas.GetCobranzaEstatus(-1, -1) Then Application("GlobalDTVtaCobranzaEstatus") = ObjVentas.DtResultados Else Application("GlobalDTVtaCobranzaEstatus") = Nothing End Using - GuardaLogAsax(String.Format("Globalasax 18:{0}", DateTime.Now)) - '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - - GuardaLogAsax(String.Format("Globalasax 19:{0}", DateTime.Now)) - + 'GuardaLogAsax(String.Format("Globalasax 19:{0}", DateTime.Now)) '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ''MF @@ -304,7 +298,7 @@ 'ObjMF.Dispose() - +#End If '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 'C L A S I F I C A C I O N E S @@ -365,10 +359,10 @@ '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 'M E T O D O S - D E - P A G O - Using ObjMetodoPago As New ClsMetodosPagos() - If ObjMetodoPago.GetMetodosPago() Then Application("GlobalDTMetodosPago") = ObjMetodoPago.DtResultados Else Application("GlobalDTMetodosPago") = Nothing - End Using - GuardaLogAsax(String.Format("Globalasax 21:{0}", DateTime.Now)) + 'Using ObjMetodoPago As New ClsMetodosPagos() + ' If ObjMetodoPago.GetMetodosPago() Then Application("GlobalDTMetodosPago") = ObjMetodoPago.DtResultados Else Application("GlobalDTMetodosPago") = Nothing + 'End Using + 'GuardaLogAsax(String.Format("Globalasax 21:{0}", DateTime.Now)) '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ @@ -379,34 +373,34 @@ ' If ObjMonedas.GetMonedasAlias() Then Application("GlobalDTMonedasAlias") = ObjMonedas.DtResultados Else Application("GlobalDTMonedasAlias") = Nothing 'End Using - GuardaLogAsax(String.Format("Globalasax 22:{0}", DateTime.Now)) + 'GuardaLogAsax(String.Format("Globalasax 22:{0}", DateTime.Now)) '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 'L E Y E N D A S - F I S C A L E S - Using ObjLeyendasFiscales As New ClsLeyendasFiscales() - If ObjLeyendasFiscales.GetLeyendasFiscales() Then Application("GlobalDTLeyendasFiscales") = ObjLeyendasFiscales.DtResultados Else Application("GlobalDTLeyendasFiscales") = Nothing - End Using - GuardaLogAsax(String.Format("Globalasax 23:{0}", DateTime.Now)) + 'Using ObjLeyendasFiscales As New ClsLeyendasFiscales() + ' If ObjLeyendasFiscales.GetLeyendasFiscales() Then Application("GlobalDTLeyendasFiscales") = ObjLeyendasFiscales.DtResultados Else Application("GlobalDTLeyendasFiscales") = Nothing + 'End Using + 'GuardaLogAsax(String.Format("Globalasax 23:{0}", DateTime.Now)) '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 'F A C T U R A S - Using ObjEstatusFactura As New ClsEstatusFactura() - If ObjEstatusFactura.GetEstatusFactura() Then Application("GlobalDTEstatusFactura") = ObjEstatusFactura.DtResultados Else Application("GlobalDTEstatusFactura") = Nothing + 'Using ObjEstatusFactura As New ClsEstatusFactura() + ' If ObjEstatusFactura.GetEstatusFactura() Then Application("GlobalDTEstatusFactura") = ObjEstatusFactura.DtResultados Else Application("GlobalDTEstatusFactura") = Nothing - End Using - GuardaLogAsax(String.Format("Globalasax 24:{0}", DateTime.Now)) + 'End Using + 'GuardaLogAsax(String.Format("Globalasax 24:{0}", DateTime.Now)) '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 'P R O Y E C T O S - Using ObjProyectos As New ClsProyectos - If ObjProyectos.GetProyectos Then Application("GlobalDTProyectos") = ObjProyectos.DtResultados Else Application("GlobalDTProyectos") = Nothing - End Using - GuardaLogAsax(String.Format("Globalasax 25:{0}", DateTime.Now)) + 'Using ObjProyectos As New ClsProyectos + ' If ObjProyectos.GetProyectos Then Application("GlobalDTProyectos") = ObjProyectos.DtResultados Else Application("GlobalDTProyectos") = Nothing + 'End Using + 'GuardaLogAsax(String.Format("Globalasax 25:{0}", DateTime.Now)) '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 'S U B P R O Y E C T O S