diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 560ea430e..6045b7c57 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -1758,16 +1758,14 @@ Public Class ClsPaginas
Application(AppNombre) = value
End Set
End Property
- Public Property GlobalDTProductosServiciosEquivalencias(CvePS As Integer, CveUM As Integer, CveEmpresa As Integer) As DataTable
+ Public Shared Property GlobalDTProductosServiciosEquivalencias(CvePS As Integer, CveUM As Integer, CveEmpresa As Integer) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTProductosServiciosEquivalencias-{0}", CveEmpresa)
- If CveEmpresa <> -1 Then
- 'sino existe, recarga los datos
- If Application(AppNombre) Is Nothing Then
- Dim ObjPS As New ClsProductosServicios
- If ObjPS.GetPSEquivalencias(-1, CveEmpresa) Then Application(AppNombre) = ObjPS.DtResultados
- ObjPS.Dispose()
- End If
+
+ If HttpContext.Current.Application(AppNombre) Is Nothing Then
+ Dim ObjPS As New ClsProductosServicios
+ If ObjPS.GetPSEquivalencias(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjPS.DtResultados
+ ObjPS.Dispose()
End If
If CvePS <> -1 OrElse CveUM <> -1 Then
@@ -1776,16 +1774,16 @@ Public Class ClsPaginas
If CveUM <> -1 Then StrSQL.AppendFormat(" AND CveUM = {0}", CveUM)
If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
- Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
+ Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
GlobalDTProductosServiciosEquivalencias = Dv.ToTable
Dv.Dispose()
Else
- GlobalDTProductosServiciosEquivalencias = DirectCast(Application(AppNombre), DataTable)
+ GlobalDTProductosServiciosEquivalencias = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTProductosServiciosEquivalencias-{0}", CveEmpresa)
- Application(AppNombre) = value
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
@@ -1967,34 +1965,34 @@ Public Class ClsPaginas
' Application("GlobalDTBancosCuentas") = value
' End Set
'End Property
- Property GlobalDTBancosCuentas(CveUsuario As Integer, Optional CveCuenta As Integer = -1, Optional Estatus As Integer = 1, Optional CveEmpresa As Integer = -1, Optional CveTipoCuenta As Integer = -1) As DataTable
+ Public Shared Property GlobalDTBancosCuentas(CveUsuario As Integer, Optional CveCuenta As Integer = -1, Optional Estatus As Integer = 1, Optional CveEmpresa As Integer = -1, Optional CveTipoCuenta As Integer = -1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTBancosCuentas-{0}", CveEmpresa)
'sino existe, recarga los datos
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Using ObjBancos As New ClsBancos
If ObjBancos.GetBancosCuentasUsuarios(-1, CveEmpresa) Then
- Application(AppNombre) = ObjBancos.DtResultados
+ HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados
Else
- Application(AppNombre) = Nothing
+ HttpContext.Current.Application(AppNombre) = Nothing
End If
End Using
End If
- Dim Str As String = String.Format("CveEmpresa = {0} ", UsuarioActual.CveEmpresa)
+ Dim Str As String = String.Format("CveEmpresa = {0} ", CveEmpresa)
If CveUsuario > -1 Then Str = String.Format("{0} AND CveUsuario = {1}", Str, CveUsuario)
If CveTipoCuenta > -1 Then Str = String.Format("{0} AND CveTipoCuenta = {1}", Str, CveTipoCuenta)
If CveCuenta > -1 Then Str = String.Format("{0} AND CveCuenta = {1}", Str, CveCuenta)
If Estatus > -1 Then Str = String.Format("{0} AND Estatus = '{1}'", Str, If(Estatus = 1, "Activo", "Inactivo"))
- Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str, "", DataViewRowState.CurrentRows)
+ Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str, "", DataViewRowState.CurrentRows)
GlobalDTBancosCuentas = Dv.ToTable
Dv.Dispose()
'GlobalDTBancosCuentas = DirectCast(Application("GlobalDTBancosCuentas"), DataTable)
End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTBancosCuentas-{0}", CveEmpresa)
- Application(AppNombre) = value
+ HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Public Shared Property GlobalDTTipoTransacciones() As DataTable
@@ -2324,13 +2322,13 @@ Public Class ClsPaginas
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
+ Public Shared 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)
'sino existe, recarga los datos
- If Application(AppNombre) Is Nothing Then
+ If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjUsr As New ClsInventarios
- If ObjUsr.GetAlmacenes(-1, -1, CveEmpresa, -1) Then Application(AppNombre) = ObjUsr.DtResultados
+ If ObjUsr.GetAlmacenes(-1, -1, CveEmpresa, -1) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados
ObjUsr.Dispose()
End If
@@ -2341,31 +2339,15 @@ Public Class ClsPaginas
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(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
GlobalDTAlmacen = Dv.ToTable
Dv.Dispose()
End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa)
- Application(AppNombre) = value
+ HttpContext.Current.Application(AppNombre) = value
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
Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1, Optional CveEstatus As Integer = 1) As DataTable
Get
diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb
index 25576d87b..93bb76a17 100644
--- a/App_Code/Modelos.vb
+++ b/App_Code/Modelos.vb
@@ -332,7 +332,7 @@ Namespace Modelos
Else
IniciaValores()
End If
- SetMetodoPago(ObjsClsPaginas)
+ SetMetodoPago()
Timbre = New CFDITimbre
DirectorioServidor = ModExtensiones.DirectorioBaseEmpresas
End Sub
@@ -2278,7 +2278,7 @@ Namespace Modelos
If GenerarPrePoliza AndAlso CveMovimiento > 0 Then
Dim Concepto As String = "Cancelación Usado" & factura.SerieFolio
Dim CvePrePoliza = ObjConta.AddPrePolizas("Mod/CancSalUsados", 74, DtMovimientosEntrada.SUMD("Total"), DtMovimientosEntrada.SUMD("Total"), 1, tFecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
- Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
+ Dim tCveSubProyecto = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
Dim tCveConcepto As Integer = 278
Dim ValorInventario As Decimal = 0
Dim MovAlmacen As Boolean = False 'debe quedar como el anterior, pero negativo
@@ -2503,7 +2503,7 @@ Namespace Modelos
If ValorMultiplicador = -1 AndAlso ConceptoContable = 291 Then
If IdCtaContable <= 0 Then
- CuentasContablesInvalidas.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
+ CuentasContablesInvalidas.Append("
" & ClsPaginas.GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
idCuentaContabilizacion = 0
End If
@@ -2599,7 +2599,7 @@ Namespace Modelos
If ObjInventario.GetMovimientosDetalle(CveMovimientoReferencia, UsuarioActual.CveEmpresa) Then
Dim Importe68 As Decimal = ObjInventario.DtResultados.SUMD("Total").RoundSQL * ValorMultiplicador
- Dim IdCtaContable68 = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacen}").ToEntero
+ Dim IdCtaContable68 = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacen}").ToEntero
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovto68, Importe68, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable68, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoReferencia, ImporteMX:=Importe68, Contabilizable:=False) Then
ErrorPrepoliza = True
@@ -2622,7 +2622,7 @@ Namespace Modelos
If ObjInventario.GetMovimientosDetalle(CveMovimientoReferencia, UsuarioActual.CveEmpresa) Then
Dim Importe68 As Decimal = 0
- Dim IdCtaContable68 = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacen}").ToEntero
+ Dim IdCtaContable68 = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacen}").ToEntero
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovto68, Importe68, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable68, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoReferencia, ImporteMX:=Importe68, Contabilizable:=False) Then
ErrorPrepoliza = True
@@ -2687,7 +2687,7 @@ Namespace Modelos
ImporteConcepto12 = importeMX.RoundSQL
If importeMovimiento <> 0 Then
If IdCtaContable <= 0 Then
- CuentasContablesInvalidas.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
+ CuentasContablesInvalidas.Append("
" & ClsPaginas.GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
idCuentaContabilizacion = 0
End If
@@ -3332,20 +3332,20 @@ Namespace Modelos
importeMovimiento = ((TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString.ToDecimal) * ValorMultiplicador)
importeMX = importeMovimiento * tipoCambio * Multiplicador
FechaMovimiento = ObjFactura.FechaPago
- Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}"
+ Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}"
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas
If ObjFactura.TipoDocto.Contiene("Egs") Then
- IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
Else
- IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
End If
If importeMovimiento <> 0 Then
If IdCtaContable <= 0 Then
- CuentasContablesInvalidas.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"))
+ CuentasContablesInvalidas.Append("
" & ClsPaginas.GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"))
idCuentaContabilizacion = 0
End If
@@ -3407,14 +3407,14 @@ Namespace Modelos
importeMX = importeMovimiento * tipoCambio * Multiplicador
FechaMovimiento = ObjFactura.FechaPago
- Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}"
+ Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}"
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
- IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
Else
- IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
End If
If UsuarioActual.CveEmpresa = 119 Then
@@ -3425,7 +3425,7 @@ Namespace Modelos
If importeMovimiento <> 0 Then
If IdCtaContable <= 0 Then
- CuentasContablesInvalidas.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"))
+ CuentasContablesInvalidas.Append("
" & ClsPaginas.GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"))
idCuentaContabilizacion = 0
End If
@@ -3463,20 +3463,20 @@ Namespace Modelos
importeMovimiento = (TmpDTDetalle.SUM("Descuento", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador
importeMX = importeMovimiento * tipoCambio * Multiplicador
FechaMovimiento = ObjFactura.FechaPago
- Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString().ToEntero() > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"), "")} - {If(Row2("CveSubProyecto").ToString().ToEntero() > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString()}"), "Sin SubProyecto Asignado")}"
+ Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString().ToEntero() > 0, ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"), "")} - {If(Row2("CveSubProyecto").ToString().ToEntero() > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString()}"), "Sin SubProyecto Asignado")}"
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas
If ObjFactura.TipoDocto.Contiene("Egs") Then
- IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
Else
- IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
End If
If importeMovimiento <> 0 Then
If IdCtaContable <= 0 Then
- CuentasContablesInvalidas.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"))
+ CuentasContablesInvalidas.Append("
" & ClsPaginas.GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"))
idCuentaContabilizacion = 0
End If
@@ -3646,12 +3646,12 @@ Namespace Modelos
Dim PorcentajeImpuestoPago As Decimal = TmpDTDetalle.MAX("PorcentajeIVA").ToDecimal
- If GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows.Count = 1 Then
- IdCtaContable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("IdCtaContable").ToString.ToEntero
+ If ClsPaginas.GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows.Count = 1 Then
+ IdCtaContable = ClsPaginas.GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("IdCtaContable").ToString.ToEntero
End If
If IdCtaContable <= 0 Then
- CuentasContablesInvalidas.AppendFormat("
{0}", GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("NumCuentaMoneda").ToString.ToEntero)
+ CuentasContablesInvalidas.AppendFormat("
{0}", ClsPaginas.GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("NumCuentaMoneda").ToString.ToEntero)
idCuentaContabilizacion = 0
End If
@@ -3714,7 +3714,7 @@ Namespace Modelos
If importeMovimiento <> 0 And Not ErrorPrepoliza Then
If IdCtaContable <= 0 Then
- CuentasContablesInvalidas.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
+ CuentasContablesInvalidas.Append("
" & ClsPaginas.GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
idCuentaContabilizacion = 0
End If
@@ -3969,7 +3969,7 @@ Namespace Modelos
Private Function GenerarMovimientoGarantia(CveConceptoMovimiento As Integer, ConceptoPoliza As String, FechaMovimiento As DateTime, factura As Factura, ByRef ObjAcum As ClsAcumuladores, ByRef ObjInventario As ClsInventarios, ObjConta As ClsContabilidad, Optional Modulo As String = "Modelos/SDGA") As Boolean
Dim OcurrioError As Boolean = False
Try
- Dim CveAlmacenGarantia As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=6).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={factura.CveSubProyecto}").ToEntero()
+ Dim CveAlmacenGarantia As Integer = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=6).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={factura.CveSubProyecto}").ToEntero()
Dim DtGarantias As DataTable = Nothing
If ObjAcum.GetGarantiasDetalle(factura.CveVenta) Then
@@ -4248,7 +4248,7 @@ Namespace Modelos
For Each RowInv As DataRow In DtCostosDistinct.Rows
ValorInventario = DtCostos.SUM("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).ToString.ToDecimal
- IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
Try
If ValorInventario <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(Me.CvePrePoliza, False, ValorInventario, Me.SerieFolio, 69, Me.SerieFolio, Me.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=Me.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveSubProyecto:=Me.CveSubProyecto) Then
@@ -4262,7 +4262,7 @@ Namespace Modelos
Next
If Not OcurrioError Then
- IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero
+ IdCtaContable = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero
ValorInventario = (DtCostos.SUM("Total", "").ToDecimal).RoundSQL
If Not ObjConta.AddPrePolizasDetalle(Me.CvePrePoliza, True, ValorInventario, Me.SerieFolio, 68, Me.SerieFolio, Me.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=Me.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveSubProyecto:=Me.CveSubProyecto) Then
OcurrioError = True
@@ -4346,7 +4346,7 @@ Namespace Modelos
If UsuarioActual.CveEmpresa = 1 Then
DtEquivalencias = New DataTable
- DtEquivalencias = GlobalDTProductosServiciosEquivalencias(CveProducto, -1, UsuarioActual.CveEmpresa)
+ DtEquivalencias = ClsPaginas.GlobalDTProductosServiciosEquivalencias(CveProducto, -1, UsuarioActual.CveEmpresa)
Dim CveUnidadBase As Integer = DtEquivalencias.FiltroPrimeroValor("CveUM", "UnidadBase = 'True'").ToEntero
Dim drUMBase As DataRow = DtEquivalencias.FiltroPrimero("UnidadBase = 'True'")
@@ -4408,7 +4408,7 @@ Namespace Modelos
End If
'Concepto = String.Format("{0} - {1}", Row2("Clasificacion").ToString(), Row2("SubProyecto").ToString())
- IdCtaContable = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
'If ValorInventario <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto69, ValorInventario, factura.SerieFolio, 69, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=factura.CveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario) Then
@@ -4418,7 +4418,7 @@ Namespace Modelos
cont += 1
Next
End If
- IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero()
+ IdCtaContable = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero()
'If TotalCosto <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto68, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveSubProyecto:=factura.CveSubProyecto) Then
@@ -4547,7 +4547,7 @@ Namespace Modelos
End If
'Concepto = String.Format("{0} - {1}", Row2("Clasificacion").ToString(), Row2("SubProyecto").ToString())
- IdCtaContable = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
'If ValorInventario <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto69, ValorInventario, factura.SerieFolio, 69, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=factura.CveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario) Then
@@ -4557,7 +4557,7 @@ Namespace Modelos
cont += 1
Next
End If
- IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero()
+ IdCtaContable = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero()
'If TotalCosto <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto68, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveSubProyecto:=factura.CveSubProyecto) Then
@@ -5495,7 +5495,7 @@ Namespace Modelos
DtCostos = ObjInventario.DtResultados
Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
- Dim IdCtaContableAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {CveAlmacenMovimiento}").ToEntero
+ Dim IdCtaContableAlmacen As Integer = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {CveAlmacenMovimiento}").ToEntero
Dim IdCtaContable As Integer = 0
If tmpCostos.Rows.Count > 0 Then
@@ -5524,7 +5524,7 @@ Namespace Modelos
ValorInventario = ValorInventario + (TotalCosto - TotalCostoAcumulado)
End If
- IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
+ IdCtaContable = ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
If Not ErrorCancelar Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaDev, False, Multiplicador * ValorInventario, SerieFolio, 69, SerieFolio, Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveMovimientoAlmacen:=CveMovimientoDevolucion, CveSubProyecto:=ObjFactura.CveSubProyecto, ImporteMX:=Multiplicador * ValorInventario, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero) Then
@@ -6406,7 +6406,7 @@ Namespace Modelos
Dim EsContabilizable As Boolean = False
Dim Concepto As String = "Cancelación"
Dim CvePrePoliza = ObjConta.AddPrePolizas("Mod/CancExAR1", 74, DtEntradaDetalle.SUMD("Total"), DtEntradaDetalle.SUMD("Total"), 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
- Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacen).FiltroPrimeroValor("CveSubProyecto").ToEntero
+ Dim tCveSubProyecto = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacen).FiltroPrimeroValor("CveSubProyecto").ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ValorInventario, Concepto, 68, Concepto, Fecha, 0, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoSalidaDevRem, ImporteMX:=ValorInventario, CveSubProyecto:=tCveSubProyecto, Contabilizable:=EsContabilizable) Then
ErrorCancelar = True
@@ -7245,9 +7245,9 @@ Namespace Modelos
End If
End Sub
Public Sub SetMetodoPago()
- If CveMetodoPago > 0 AndAlso Not IsNothing(GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))) Then
- MetodoPago = GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("MetodoPago").ToString()
- ClaveMetodoPagoSAT = GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("ClaveSAT").ToString()
+ If CveMetodoPago > 0 AndAlso Not IsNothing(ClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))) Then
+ MetodoPago = ClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("MetodoPago").ToString()
+ ClaveMetodoPagoSAT = ClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("ClaveSAT").ToString()
End If
End Sub
Public Sub SetMoneda(ObjClsPaginas As ClsPaginas)
@@ -7262,9 +7262,9 @@ Namespace Modelos
End Sub
Public Sub SetMetodoPago(ObjClsPaginas As ClsPaginas)
If Not IsNothing(ObjClsPaginas) Then
- If Not IsNothing(ObjClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))) Then
- MetodoPago = ObjClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("MetodoPago").ToString()
- ClaveMetodoPagoSAT = ObjClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("ClaveSAT").ToString()
+ If Not IsNothing(ClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))) Then
+ MetodoPago = ClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("MetodoPago").ToString()
+ ClaveMetodoPagoSAT = ClsPaginas.GlobalDTMetodosPago.FiltroPrimero(String.Format(" CveMetodoPago ={0}", CveMetodoPago))("ClaveSAT").ToString()
End If
End If
End Sub
@@ -7478,111 +7478,7 @@ Namespace Modelos
End Set
End Property
- Public ReadOnly Property GlobalDTProductosServiciosEquivalencias(CvePS As Integer, CveUM As Integer, CveEmpresa As Integer) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTProductosServiciosEquivalencias-{0}", CveEmpresa)
-
- If CvePS <> -1 OrElse CveUM <> -1 Then
- Dim StrSQL As New StringBuilder
- If CvePS <> -1 Then StrSQL.AppendFormat(" AND CvePS = {0}", CvePS)
- If CveUM <> -1 Then StrSQL.AppendFormat(" AND CveUM = {0}", CveUM)
- If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
- GlobalDTProductosServiciosEquivalencias = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProductosServiciosEquivalencias = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
- End If
- End Get
-
- End Property
- Property GlobalDTProveedorClasificacion(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProveedorClasificacion"), DataTable), String.Format("CveEmpresa ={0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTProveedorClasificacion = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProveedorClasificacion = DirectCast(HttpContext.Current.Application("GlobalDTProveedorClasificacion"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProveedorClasificacion") = value
- End Set
- End Property
- Property GlobalDTProveedorSucursales(CveProveedor As Integer) As DataTable
- Get
- If CveProveedor <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProveedorSucursales"), DataTable), String.Format("CveProveedor = {0}", CveProveedor), "", DataViewRowState.CurrentRows)
- GlobalDTProveedorSucursales = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTProveedorSucursales = DirectCast(HttpContext.Current.Application("GlobalDTProveedorSucursales"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTProveedorSucursales") = value
- End Set
- End Property
- Property GlobalDTRoles(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTRoles"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTRoles = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTRoles = DirectCast(HttpContext.Current.Application("GlobalDTRoles"), DataTable)
- End If
-
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTRoles") = value
- End Set
- End Property
- Property GlobalDTNomSatBancos() As DataTable
- Get
- GlobalDTNomSatBancos = DirectCast(HttpContext.Current.Application("GlobalDTNomSatBancos"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTNomSatBancos") = value
- End Set
- End Property
- Property GlobalDTNomSatConceptos() As DataTable
- Get
- GlobalDTNomSatConceptos = DirectCast(HttpContext.Current.Application("GlobalDTNomSatConceptos"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTNomSatConceptos") = value
- End Set
- End Property
- Property GlobalDTNomSatRegimenContratacion() As DataTable
- Get
- GlobalDTNomSatRegimenContratacion = DirectCast(HttpContext.Current.Application("GlobalDTNomSatRegimenContratacion"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTNomSatRegimenContratacion") = value
- End Set
- End Property
- Property GlobalDTNomSatRiesgoPuesto() As DataTable
- Get
- GlobalDTNomSatRiesgoPuesto = DirectCast(HttpContext.Current.Application("GlobalDTNomSatRiesgoPuesto"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTNomSatRiesgoPuesto") = value
- End Set
- End Property
- Property GlobalDTNomSatTipoIncapacidad() As DataTable
- Get
- GlobalDTNomSatTipoIncapacidad = DirectCast(HttpContext.Current.Application("GlobalDTNomSatTipoIncapacidad"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTNomSatTipoIncapacidad") = value
- End Set
- End Property
Property GlobalDTEmpresas(Optional CveEmpresa As Integer = -1) As DataTable
Get
@@ -7598,236 +7494,8 @@ Namespace Modelos
HttpContext.Current.Application("GlobalDTEmpresas") = value
End Set
End Property
- Property GlobalDTClasificaciones(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1, Optional UsoClasificacion As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTClasificaciones-{0}", CveEmpresa)
- 'sino existe, recarga los datos
- If HttpContext.Current.Application(AppNombre) Is Nothing Then
- Dim ObjClasificaciones As New ClsClasificaciones
- If ObjClasificaciones.GetClasificaciones(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjClasificaciones.DtResultados
- ObjClasificaciones.Dispose()
- End If
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
- If UsoClasificacion <> -1 Then Str.AppendFormat(" AND UsoClasificacion IN ({0},3) ", UsoClasificacion)
- If CveClasificacion <> -1 Then Str.AppendFormat(" AND CveClasificacion = {0}", CveClasificacion)
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTClasificaciones = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClasificaciones = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTClasificaciones-{0}", CveEmpresa)
- HttpContext.Current.Application(AppNombre) = value
- End Set
- End Property
- Property GlobalDTClasificaciones2(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificaciones2"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTClasificaciones2 = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClasificaciones2 = DirectCast(HttpContext.Current.Application("GlobalDTClasificaciones2"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTClasificaciones2") = value
- End Set
- End Property
- Property GlobalDTClasificacionesSubProyectos(Optional CveClasificacion As Integer = -1, Optional CveEmpresa As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesSubProyecto"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTClasificacionesSubProyectos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClasificacionesSubProyectos = DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesSubProyecto"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTClasificacionesSubProyecto") = value
- End Set
- End Property
- Property GlobalDTACClasificadorObjetoGasto(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTACClasificadorObjetoGasto"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTACClasificadorObjetoGasto = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTACClasificadorObjetoGasto = DirectCast(HttpContext.Current.Application("GlobalDTACClasificadorObjetoGasto"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTACClasificadorObjetoGasto") = value
- End Set
- End Property
- Property GlobalDTClasificacionesDetalle(Optional CveEmpresa As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveClasificacion <> -1 Then Str.AppendFormat(" AND CveClasificacion = {0}", CveClasificacion)
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesDetalle"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTClasificacionesDetalle = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClasificacionesDetalle = DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesDetalle"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTClasificacionesDetalle") = value
- End Set
- End Property
- Property GlobalDTSubFamilias(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSubFamilias"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
- GlobalDTSubFamilias = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTSubFamilias = DirectCast(HttpContext.Current.Application("GlobalDTSubFamilias"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTSubFamilias") = value
- End Set
- End Property
- Property GlobalDTFamilias(Optional CveEmpresa As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTFamilias"), DataTable), String.Format("CveEmpresa = {0} ", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTFamilias = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTFamilias = DirectCast(HttpContext.Current.Application("GlobalDTFamilias"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTFamilias") = value
- End Set
- End Property
- Property GlobalDTClasificacionesPresupuestos(Optional CveEmpresa As Integer = -1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesPresupuestos"), DataTable), String.Format("CveEmpresa = {0} ", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTClasificacionesPresupuestos = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClasificacionesPresupuestos = DirectCast(HttpContext.Current.Application("GlobalDTClasificacionesPresupuestos"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTClasificacionesPresupuestos") = value
- End Set
- End Property
- Property GlobalDTMetodosPago() As DataTable
- Get
- GlobalDTMetodosPago = DirectCast(HttpContext.Current.Application("GlobalDTMetodosPago"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTMetodosPago") = value
- End Set
- End Property
- Property GlobalDTModulos() As DataTable
- Get
- GlobalDTModulos = DirectCast(HttpContext.Current.Application("GlobalDTModulos"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTModulos") = value
- End Set
- End Property
-
- Property GlobalDTEstatusOrdenCompra() As DataTable
- Get
- GlobalDTEstatusOrdenCompra = DirectCast(HttpContext.Current.Application("GlobalDTEstatusOrdenCompra"), DataTable)
- End Get
- Set(ByVal value As DataTable)
- HttpContext.Current.Application("GlobalDTEstatusOrdenCompra") = value
- End Set
- End Property
- Property GlobalDTLeyendasFiscales() As DataTable
- Get
- GlobalDTLeyendasFiscales = DirectCast(HttpContext.Current.Application("GlobalDTLeyendasFiscales"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTLeyendasFiscales") = value
- End Set
- End Property
- Property GlobalDTEstatusFactura() As DataTable
- Get
- GlobalDTEstatusFactura = DirectCast(HttpContext.Current.Application("GlobalDTEstatusFactura"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTEstatusFactura") = value
- End Set
- End Property
- Property GlobalDTProyectos(CveEmpresa As Integer, Optional Estatus As Integer = -1) As DataTable
- Get
-
- 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(-1) Then
- HttpContext.Current.Application("GlobalDTProyectos") = P.DtResultados
- End If
- P.Dispose()
-
- 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(HttpContext.Current.Application("GlobalDTProyectos"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTProyectos = Dv.ToTable
- Dv.Dispose()
-
- Else
- GlobalDTProyectos = DirectCast(HttpContext.Current.Application("GlobalDTProyectos"), DataTable)
- End If
-
- End Get
- Set(ByVal value As DataTable)
- If value Is Nothing OrElse value.Rows.Count = 0 Then
-
- End If
- HttpContext.Current.Application("GlobalDTProyectos") = 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
Get
Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa)
@@ -7942,107 +7610,7 @@ Namespace Modelos
HttpContext.Current.Application("GlobalDTProyectosUsuarios") = value
End Set
End Property
- Property GlobalDTPrecioListas(CveEmpresa As Integer) As DataTable
- Get
- GlobalDTPrecioListas = DirectCast(HttpContext.Current.Application("GlobalDTPrecioListas"), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTPrecioListas") = value
- End Set
- End Property
- 'Property GlobalDTMesas() As DataTable
- ' Get
- ' GlobalDTMesas = DirectCast(HttpContext.Current.Application("GlobalDTMesas"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTMesas") = value
- ' End Set
- 'End Property
- 'Property GlobalDTTipoOrdenServicios(CveEmpresa As Integer) As DataTable
- ' Get
- ' GlobalDTTipoOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTTipoOrdenServicios"), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTTipoOrdenServicios") = value
- ' End Set
- 'End Property
- 'Property GlobalDTSubTipoOrdenServicios() As DataTable
- ' Get
- ' GlobalDTSubTipoOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTSubTipoOrdenServicios"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTSubTipoOrdenServicios") = value
- ' End Set
- 'End Property
- 'Property GlobalDTCaracteristicasOrdenServicios() As DataTable
- ' Get
- ' GlobalDTCaracteristicasOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTCaracteristicasOrdenServicios"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTCaracteristicasOrdenServicios") = value
- ' End Set
- 'End Property
- 'Property GlobalDTOrdenesServiciosCaracteristicas() As DataTable
- ' Get
- ' GlobalDTOrdenesServiciosCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTOrdenesServiciosCaracteristicas"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTOrdenesServiciosCaracteristicas") = value
- ' End Set
- 'End Property
- 'Property GlobalDTCaracteristicasOpciones() As DataTable
- ' Get
- ' GlobalDTCaracteristicasOpciones = DirectCast(HttpContext.Current.Application("GlobalDTCaracteristicasOpciones"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTCaracteristicasOpciones") = value
- ' End Set
- 'End Property
- 'Property GlobalDTTipoCuentasEquipos(CveEmpresa As Integer) As DataTable
- ' Get
- ' If CveEmpresa <> -1 Then
- ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- ' GlobalDTTipoCuentasEquipos = Dv.ToTable
- ' Dv.Dispose()
- ' Else
- ' GlobalDTTipoCuentasEquipos = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquipos"), DataTable)
- ' End If
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTTipoCuentasEquipos") = value
- ' End Set
- 'End Property
- 'Property GlobalDTTipoCuentasEquiposCaracteristicas(CveEmpresa As Integer) As DataTable
- ' Get
- ' If CveEmpresa <> -1 Then
-
- ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- ' GlobalDTTipoCuentasEquiposCaracteristicas = Dv.ToTable
- ' Dv.Dispose()
- ' Else
- ' GlobalDTTipoCuentasEquiposCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas"), DataTable)
- ' End If
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas") = value
- ' End Set
- 'End Property
- 'Property GlobalDTTipoCuentasEquiposOpciones(CveEmpresa As Integer) As DataTable
- ' Get
- ' If CveEmpresa <> -1 Then
-
- ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- ' GlobalDTTipoCuentasEquiposOpciones = Dv.ToTable
- ' Dv.Dispose()
- ' Else
- ' GlobalDTTipoCuentasEquiposOpciones = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones"), DataTable)
- ' End If
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones") = value
- ' End Set
- 'End Property
ReadOnly Property GlobalDTPS(CveEmpresa As Integer, Optional CvePS As Integer = -1, Optional SATClavePS As String = "-1", Optional AplicaParaVenta As Integer = -1) As DataTable
Get
Dim ObjPS As New ClsProductosServicios
@@ -8059,469 +7627,132 @@ Namespace Modelos
- Property GlobalDTInvMetodosInventario() As DataTable
- Get
- GlobalDTInvMetodosInventario = DirectCast(HttpContext.Current.Application("GlobalDTInvMetodosInventario"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTInvMetodosInventario") = value
- End Set
- End Property
- 'Property GlobalDTAFCaracteristicasOpciones() As DataTable
+ 'Property GlobalDTCliente(CveEmpresa As Integer, Optional Estatus As Integer = 1) As DataTable
' Get
- ' GlobalDTAFCaracteristicasOpciones = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicasOpciones"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTAFCaracteristicasOpciones") = value
- ' End Set
- 'End Property
- 'Property GlobalDTAFCaracteristicas() As DataTable
- ' Get
- ' GlobalDTAFCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicas"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTAFCaracteristicas") = value
- ' End Set
- 'End Property
- 'Property GlobalDTAFCaracteristicasClasificaciones() As DataTable
- ' Get
- ' GlobalDTAFCaracteristicasClasificaciones = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicasClasificaciones"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTAFCaracteristicasClasificaciones") = value
- ' End Set
- 'End Property
- 'Property GlobalDTImpuestosLocales(CvePS As Integer, CveEmpresa As Integer) As DataTable
- ' Get
- ' Dim Str As New StringBuilder
- ' If CvePS > 0 Then Str.AppendFormat("CvePS = {0}", CvePS)
- ' If CveEmpresa > 0 Then Str.AppendFormat("{0} CveEmpresa = {1}", If(CvePS > 0, " AND ", ""), CveEmpresa)
-
- ' If CvePS > 0 Then
- ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTImpuestosLocales"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- ' GlobalDTImpuestosLocales = Dv.ToTable
- ' Dv.Dispose()
- ' Else
- ' GlobalDTImpuestosLocales = DirectCast(HttpContext.Current.Application("GlobalDTImpuestosLocales"), DataTable)
- ' End If
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTImpuestosLocales") = value
- ' End Set
- 'End Property
- 'Bancos
- Property GlobalDTBancos() As DataTable
- Get
- GlobalDTBancos = DirectCast(HttpContext.Current.Application("GlobalDTBancos"), DataTable)
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTBancos") = value
- End Set
- End Property
-
-
- Property GlobalDTBancosCuentas(CveUsuario As Integer, Optional CveCuenta As Integer = -1, Optional Estatus As Integer = 1, Optional CveEmpresa As Integer = -1) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTBancosCuentas-{0}", CveEmpresa)
- 'sino existe, recarga los datos
- If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
- Dim ObjBancos As New ClsBancos
- If ObjBancos.GetBancosCuentasUsuarios(-1, CveEmpresa) Then
- HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados
- Else
- HttpContext.Current.Application(AppNombre) = Nothing
- End If
- ObjBancos.Dispose()
- End If
-
- Dim Str As String = String.Format("CveEmpresa = {0} ", UsuarioActual.CveEmpresa)
- If CveUsuario > -1 Then Str = String.Format("{0} AND CveUsuario = {1}", Str, CveUsuario)
- If CveCuenta > -1 Then Str = String.Format("{0} AND CveCuenta = {1}", Str, CveCuenta)
- If Estatus > -1 Then Str = String.Format("{0} AND Estatus = '{1}'", Str, If(Estatus = 1, "Activo", "Inactivo"))
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str, "", DataViewRowState.CurrentRows)
- GlobalDTBancosCuentas = Dv.ToTable
- Dv.Dispose()
- 'GlobalDTBancosCuentas = DirectCast(Application("GlobalDTBancosCuentas"), DataTable)
- End Get
- Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTBancosCuentas-{0}", CveEmpresa)
- HttpContext.Current.Application(AppNombre) = value
- End Set
- End Property
-
-
-
- Property GlobalDTTipoTransacciones() As DataTable
- Get
- If UsuarioActual.CveEmpresa = 66 Then
- GlobalDTTipoTransacciones = DirectCast(HttpContext.Current.Application("GlobalDTTipoTransacciones"), DataTable).FiltraParametros("Estatus = 1")
- Else
- GlobalDTTipoTransacciones = DirectCast(HttpContext.Current.Application("GlobalDTTipoTransacciones"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTTipoTransacciones") = value
- End Set
- End Property
- 'Property GlobalDTEstatusIE() As DataTable
- ' Get
- ' GlobalDTEstatusIE = DirectCast(HttpContext.Current.Application("GlobalDTEstatusIE"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTEstatusIE") = value
- ' End Set
- 'End Property
- 'Property GlobalDTBancosIE() As DataTable
- ' Get
- ' GlobalDTBancosIE = DirectCast(HttpContext.Current.Application("GlobalDTBancosIE"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTBancosIE") = value
- ' End Set
- 'End Property
- 'Property GlobalDTTipoCuenta() As DataTable
- ' Get
- ' GlobalDTTipoCuenta = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuenta"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTTipoCuenta") = value
- ' End Set
- 'End Property
- ''Fin Bancos
-
- ''Fin EstadoCIvil
- ''TipoPerioso
- 'Property GlobalDTTipoPeriodo() As DataTable
- ' Get
- ' GlobalDTTipoPeriodo = DirectCast(HttpContext.Current.Application("GlobalDTTipoPeriodo"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTTipoPeriodo") = value
- ' End Set
- 'End Property
- ''Fin TipoPeriodo
-
- 'Periodos
- 'Property GlobalDTNominasPeriodos(CveTipoPeriodo As Integer, CvePeriodo As Integer, CveEmpresa As Integer) As DataTable
- ' Get
- ' Dim Str As New StringBuilder
- ' If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
- ' If CveTipoPeriodo <> -1 Then Str.AppendFormat(" {0} CveTipoPeriodo = {1}", If(Str.Length > 0, "AND", ""), CveTipoPeriodo)
- ' If CvePeriodo <> -1 Then Str.AppendFormat(" {0} CvePeriodo = {1}", If(Str.Length > 0, "AND", ""), CvePeriodo)
- ' If Str.Length > 0 Then
- ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTNominasPeriodos"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- ' GlobalDTNominasPeriodos = Dv.ToTable
- ' Dv.Dispose()
-
- ' Else
- ' GlobalDTNominasPeriodos = DirectCast(HttpContext.Current.Application("GlobalDTNominasPeriodos"), DataTable)
+ ' 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
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTNominasPeriodos") = value
- ' End Set
- 'End Property
- 'Fin Periodos
- 'Fin Ruta
- '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)
-
- 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(AppNombre), DataTable)
- End If
- End Get
- Set(value As DataTable)
- 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(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTClienteClasificaciones = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClienteClasificaciones = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
- End If
- End Get
- Set(value As DataTable)
- 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
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTEstatusOrdenServicios"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTEstatusOrdenServicios = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTEstatusOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTEstatusOrdenServicios"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTEstatusOrdenServicios") = value
- End Set
- End Property
- 'Variables para Ventas
- Property GlobalDTVendedores(CveEmpresa As Integer, Optional Estatus As Boolean = True, Optional VendedorTipo As Integer = 1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTVendedores"), DataTable), String.Format("CveEmpresa = {0} AND CveEstatus = {1} AND VendedorTipo = {2}", CveEmpresa, If(Estatus, 1, 0), VendedorTipo), "", DataViewRowState.CurrentRows)
- GlobalDTVendedores = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTVendedores = DirectCast(HttpContext.Current.Application("GlobalDTVendedores"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTVendedores") = value
- End Set
- End Property
- Property GlobalDTClientesCorporativo(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClientesCorporativo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTClientesCorporativo = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTClientesCorporativo = DirectCast(HttpContext.Current.Application("GlobalDTClientesCorporativo"), DataTable)
- End If
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTClientesCorporativo") = value
- End Set
- End Property
- Property GlobalDTCompProveedores(CveEmpresa As Integer) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTCompProveedores"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- GlobalDTCompProveedores = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTCompProveedores = DirectCast(HttpContext.Current.Application("GlobalDTCompProveedores"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTCompProveedores") = value
- End Set
- End Property
- 'EstatusFactura
- 'Property GlobalDTCompEstatusFactura() As DataTable
- ' Get
- ' GlobalDTCompEstatusFactura = DirectCast(HttpContext.Current.Application("GlobalDTCompEstatusFactura"), DataTable).FiltraParametros("Estatus = 'Activo'")
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTCompEstatusFactura") = value
- ' End Set
- 'End Property
- 'Property GlobalDTContratosSecciones() As DataTable
- ' Get
- ' GlobalDTContratosSecciones = DirectCast(HttpContext.Current.Application("GlobalDTContratosSecciones"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTContratosSecciones") = value
- ' End Set
- 'End Property
- 'Property GlobalDTContratos() As DataTable
- ' Get
- ' GlobalDTContratos = DirectCast(HttpContext.Current.Application("GlobalDTContratos"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTContratos") = value
- ' End Set
- 'End Property
- 'Property GlobalDTContratosTipos() As DataTable
- ' Get
- ' GlobalDTContratosTipos = DirectCast(HttpContext.Current.Application("GlobalDTContratosTipos"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTContratosTipos") = value
- ' End Set
- 'End Property
- 'Property GlobalDTTipoAlmacen(CveEmpresa As Integer) As DataTable
- ' Get
' If CveEmpresa <> -1 Then
- ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- ' GlobalDTTipoAlmacen = Dv.ToTable
+
+ ' Dim StrSQL As New StringBuilder
+ ' StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
+ ' If Estatus >= 0 Then StrSQL.AppendFormat(" AND EstatusBool = {0} ", Estatus)
+
+ ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
+ ' GlobalDTCliente = Dv.ToTable
' Dv.Dispose()
+
' Else
- ' GlobalDTTipoAlmacen = DirectCast(HttpContext.Current.Application("GlobalDTTipoAlmacen"), DataTable)
+ ' GlobalDTCliente = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
' End If
-
' End Get
' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTTipoAlmacen") = 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 GlobalDTInvConceptos() As DataTable
- ' Get
-
- ' Return DirectCast(HttpContext.Current.Application("GlobalDTInvConceptos"), DataTable)
-
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTInvConceptos") = value
- ' End Set
- 'End Property
- 'Property GlobalDTSeccionAlmacen(CveEmpresa As Integer) As DataTable
+ '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("GlobalDTSeccionAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
- ' GlobalDTSeccionAlmacen = Dv.ToTable
+
+ ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
+ ' GlobalDTClienteClasificaciones = Dv.ToTable
' Dv.Dispose()
' Else
- ' GlobalDTSeccionAlmacen = DirectCast(HttpContext.Current.Application("GlobalDTSeccionAlmacen"), DataTable)
+ ' GlobalDTClienteClasificaciones = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
+ ' End If
+ ' End Get
+ ' Set(value As DataTable)
+ ' 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 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)
+ ' 'sino existe, recarga los datos
+ ' If HttpContext.Current.Application(AppNombre) Is Nothing Then
+ ' Dim ObjUsr As New ClsInventarios
+ ' If ObjUsr.GetAlmacenes(-1, -1, CveEmpresa, -1) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados
+ ' ObjUsr.Dispose()
' 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
' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTSeccionAlmacen") = value
+ ' Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa)
+ ' HttpContext.Current.Application(AppNombre) = value
' 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
- 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)
- 'sino existe, recarga los datos
- If HttpContext.Current.Application(AppNombre) Is Nothing Then
- Dim ObjUsr As New ClsInventarios
- If ObjUsr.GetAlmacenes(-1, -1, CveEmpresa, -1) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados
- ObjUsr.Dispose()
- 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
- Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa)
- HttpContext.Current.Application(AppNombre) = value
- 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
- Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa)
- 'sino existe, recarga los datos
- If HttpContext.Current.Application(AppNombre) Is Nothing Then
- Dim ObjUsr As New ClsSisUsuarios
- If ObjUsr.GetAlmacen(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados
- ObjUsr.Dispose()
- End If
- Dim Str As New StringBuilder
- Str.AppendFormat("CveUsuario = {0} AND CveEmpresa = {1} ", CveUsuario, CveEmpresa)
- If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTAlmacenUsuarios = Dv.ToTable
- Dv.Dispose()
- End Get
- Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa)
- HttpContext.Current.Application(AppNombre) = value
- End Set
- End Property
- 'Property GlobalDTNom_Periodos() As DataTable
+ 'Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1) As DataTable
' Get
- ' GlobalDTNom_Periodos = DirectCast(HttpContext.Current.Application("GlobalDTNom_Periodos"), DataTable)
+ ' Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa)
+ ' 'sino existe, recarga los datos
+ ' If HttpContext.Current.Application(AppNombre) Is Nothing Then
+ ' Dim ObjUsr As New ClsSisUsuarios
+ ' If ObjUsr.GetAlmacen(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados
+ ' ObjUsr.Dispose()
+ ' End If
+ ' Dim Str As New StringBuilder
+ ' Str.AppendFormat("CveUsuario = {0} AND CveEmpresa = {1} ", CveUsuario, CveEmpresa)
+ ' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
+
+ ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ ' GlobalDTAlmacenUsuarios = Dv.ToTable
+ ' Dv.Dispose()
' End Get
' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTNom_Periodos") = value
- ' End Set
- 'End Property
- 'Property GlobalDTVtaFormaPago() As DataTable
- ' Get
- ' GlobalDTVtaFormaPago = DirectCast(HttpContext.Current.Application("GlobalDTVtaFormaPago"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTVtaFormaPago") = value
- ' End Set
- 'End Property
- 'Property GlobalDTVtaMetodoPago() As DataTable
- ' Get
- ' GlobalDTVtaMetodoPago = DirectCast(HttpContext.Current.Application("GlobalDTVtaMetodoPago"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTVtaMetodoPago") = value
- ' End Set
- 'End Property
- 'Property GlobalDTVtaTiposRelacion() As DataTable
- ' Get
- ' GlobalDTVtaTiposRelacion = DirectCast(HttpContext.Current.Application("GlobalDTVtaTiposRelacion"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTVtaTiposRelacion") = value
- ' End Set
- 'End Property
- 'Property GlobalDTTiposDocumentos() As DataTable
- ' Get
- ' GlobalDTTiposDocumentos = DirectCast(HttpContext.Current.Application("GlobalDTTiposDocumentos"), DataTable)
- ' End Get
- ' Set(value As DataTable)
- ' HttpContext.Current.Application("GlobalDTTiposDocumentos") = value
+ ' Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa)
+ ' HttpContext.Current.Application(AppNombre) = value
' End Set
'End Property
+
Public ReadOnly Property GlobalTipoCambioUltimaFluctuacion(Optional Fecha As Date = MinFecha) As ClsPaginas.MTipoCambioFluctuacion
Get
@@ -8597,30 +7828,6 @@ Namespace Modelos
End Set
End Property
- Property GlobalDTContaConceptosContables(CveConceptoContable As Integer) As DataTable
- Get
- Dim AppNombre As String = String.Format("GlobalDTContaConceptosContables")
- 'sino existe, recarga los datos
- If HttpContext.Current.Application(AppNombre) Is Nothing Then
- Using ObjContabilidad As New ClsContabilidad
- If ObjContabilidad.GetConta_ConceptosContables() Then HttpContext.Current.Application(AppNombre) = ObjContabilidad.DtResultados Else HttpContext.Current.Application(AppNombre) = Nothing
- End Using
-
- End If
- If CveConceptoContable <> -1 Then
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Format("CveConceptoContable = {0}", CveConceptoContable), "", DataViewRowState.CurrentRows)
- GlobalDTContaConceptosContables = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTContaConceptosContables = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTContaConceptosContables")
- HttpContext.Current.Application(AppNombre) = value
- End Set
- End Property
#End Region
diff --git a/RMA/Garantias.aspx.vb b/RMA/Garantias.aspx.vb
index 178f130fa..33ed5008a 100644
--- a/RMA/Garantias.aspx.vb
+++ b/RMA/Garantias.aspx.vb
@@ -62,7 +62,7 @@ Partial Class Ventas_Garantias
Private Sub CargaCompra()
Dim objCompras As New ClsCompras
- If objCompras.GetCompraDetalle(DdlFolios.SelectedValue.ToEntero) Then
+ If objCompras.GetCompraDetalle(DdlFolios.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
ViewState("DTCompras") = objCompras.DtResultados
GvPS.Visible = True
BtnSolicitar.Visible = True
diff --git a/Sistemas/CatSesiones.aspx.vb b/Sistemas/CatSesiones.aspx.vb
index a5cd054d6..a554bcc80 100644
--- a/Sistemas/CatSesiones.aspx.vb
+++ b/Sistemas/CatSesiones.aspx.vb
@@ -364,13 +364,14 @@ Partial Class Sistemas_CatSesiones
Private Sub CargaProyectos()
'Carga Proyectos
- Dim ObjProyectos As New ClsProyectos
- If ObjProyectos.GetProyectos Then
- Application("GlobalDTProyectos") = ObjProyectos.DtResultados
- Else
- Application("GlobalDTProyectos") = Nothing
- End If
- ObjProyectos.Dispose()
+ 'Dim ObjProyectos As New ClsProyectos
+ 'If ObjProyectos.GetProyectos(UsuarioActual.CveEmpresa) Then
+ ' Application("GlobalDTProyectos") = ObjProyectos.DtResultados
+ 'Else
+ ' Application("GlobalDTProyectos") = Nothing
+ 'End If
+ 'ObjProyectos.Dispose()
+ GlobalDTProyectos(UsuarioActual.CveEmpresa) = Nothing
'Fin Carga Proyectos
End Sub
diff --git a/UserControl/TareaNueva.ascx.cs b/UserControl/TareaNueva.ascx.cs
index 1ce591d19..b71d5a575 100644
--- a/UserControl/TareaNueva.ascx.cs
+++ b/UserControl/TareaNueva.ascx.cs
@@ -34,24 +34,7 @@ public partial class UserControl_TareaNueva : System.Web.UI.UserControl
{ dt = (System.Data.DataTable)Application["GlobalDTUsuarios"]; }
return dt;
}
- //public DataTable GlobalDTOIRevision
- protected System.Data.DataTable get_GlobalDTOIRevision(int CveEmpresa = -1)
- {
- System.Data.DataTable dt = null;
- System.Text.StringBuilder Str = new System.Text.StringBuilder();
-
- if (CveEmpresa != -1)
- {
- string StrSQL = string.Format("CveEmpresa = {0}", CveEmpresa);
- System.Data.DataView Dv = new System.Data.DataView((System.Data.DataTable)Application["GlobalDTOIRevision"], StrSQL, "", System.Data.DataViewRowState.CurrentRows);
- dt = Dv.ToTable();
- Dv.Dispose();
- }
- else { dt = (System.Data.DataTable)Application["GlobalDTOIRevision"]; }
-
- return dt;
- }
-
+
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
@@ -80,7 +63,7 @@ public partial class UserControl_TareaNueva : System.Web.UI.UserControl
DdlPara.DataSource = GVUsuarios_TareaNueva.DataSource;
DdlPara.DataBind();
- DdlTema.DataSource = get_GlobalDTOIRevision(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("CveUsuario = {0}", UsuarioActual.CveUsuario));
+ DdlTema.DataSource = ClsPaginas.get_GlobalDTOIRevision(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("CveUsuario = {0}", UsuarioActual.CveUsuario));
DdlTema.DataBind();
DdlTema.Items.Insert(0, new ListItem("Seleccione", "-1"));
GVUsuarios_TareaNueva.DataBind();
@@ -296,7 +279,7 @@ public partial class UserControl_TareaNueva : System.Web.UI.UserControl
private void CargaTemas()
{
- DdlTema.DataSource = get_GlobalDTOIRevision(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("CveUsuario = {0}", UsuarioActual.CveUsuario));
+ DdlTema.DataSource = ClsPaginas.get_GlobalDTOIRevision(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("CveUsuario = {0}", UsuarioActual.CveUsuario));
DdlTema.DataBind();
DdlTema.Items.Insert(0, new ListItem("Seleccione", "-1"));