-- mejoras en globalDT
This commit is contained in:
@@ -187,7 +187,7 @@ Public Class ClsPaginas
|
||||
If CveCliente <> -1 Then filtros.Add($"CveCliente = {CveCliente}")
|
||||
If CveProveedor <> -1 Then filtros.Add($"CveProveedor = {CveProveedor}")
|
||||
If filtros.Count > 0 Then
|
||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTUsuarios = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
@@ -572,21 +572,37 @@ Public Class ClsPaginas
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTProveedoresCuentas(CveProveedor As Integer, Estatus As Boolean) As DataTable
|
||||
Property GlobalDTProveedoresCuentas(CveEmpresa As Integer, CveProveedor As Integer, Optional CveCuentaDeposito As Integer = -1) As DataTable
|
||||
Get
|
||||
GlobalDTProveedoresCuentas = DirectCast(Application("GlobalDTProveedoresCuentas"), DataTable)
|
||||
Dim AppNombre As String = $"GlobalDTProveedoresCuentas-{CveEmpresa}"
|
||||
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||
Using ObjProveedoresBancos As New ClsGenerales
|
||||
If ObjProveedoresBancos.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CveProveedor:=-1, CveCliente:=-2, CvePersonal:=-2) Then Application(AppNombre) = ObjProveedoresBancos.DtResultados
|
||||
End Using
|
||||
End If
|
||||
Dim filtros As New List(Of String)
|
||||
If CveProveedor <> -1 Then filtros.Add($"CveProveedor = {CveProveedor}")
|
||||
If CveCuentaDeposito <> -1 Then filtros.Add($"CveCuentaDeposito = {CveCuentaDeposito}")
|
||||
|
||||
If filtros.Count > 0 Then
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTProveedoresCuentas = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTProveedoresCuentas = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTProveedoresCuentas") = value
|
||||
Dim AppNombre As String = $"GlobalDTProveedoresCuentas-{CveEmpresa}"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTCuentasDepositosClientes(CveEmpresa As Integer, Optional CveCliente As Integer = -1, Optional Estatus As Boolean = True) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTCuentasDepositosClientes-{CveEmpresa}"
|
||||
'sino existe, recarga los datos
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
Dim P As New ClsGenerales
|
||||
If P.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CveCliente:=-2) Then Application(AppNombre) = P.DtResultados
|
||||
If P.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CveCliente:=-1, CveProveedor:=-2, CvePersonal:=-2) Then Application(AppNombre) = P.DtResultados
|
||||
P.Dispose()
|
||||
End If
|
||||
Dim Str As New StringBuilder
|
||||
@@ -622,7 +638,6 @@ Public Class ClsPaginas
|
||||
Property GlobalDTProveedorSucursales(CveProveedor As Integer, CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTProveedorSucursales-{CveEmpresa}"
|
||||
'sino existe, recarga los datos
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
Dim P As New ClsCompProveedores
|
||||
If P.GetSucursales(-1, CveEmpresa) Then Application(AppNombre) = P.DtResultados
|
||||
@@ -643,16 +658,19 @@ Public Class ClsPaginas
|
||||
End Property
|
||||
Property GlobalDTRoles(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
If CveEmpresa <> -1 Then
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTRoles"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTRoles = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTRoles = DirectCast(Application("GlobalDTRoles"), DataTable)
|
||||
Dim AppNombre As String = $"GlobalDTRoles-{CveEmpresa}"
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
Using ObjRoles As New ClsSisRoles
|
||||
If ObjRoles.GetRoles(-1, CveEmpresa) Then Application(AppNombre) = ObjRoles.DtResultados
|
||||
End Using
|
||||
End If
|
||||
|
||||
GlobalDTRoles = DirectCast(Application(AppNombre), DataTable)
|
||||
|
||||
End Get
|
||||
Set(ByVal value As DataTable)
|
||||
Application("GlobalDTRoles") = value
|
||||
Dim AppNombre As String = $"GlobalDTRoles-{CveEmpresa}"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTNomSatBancos() As DataTable
|
||||
@@ -809,7 +827,6 @@ Public Class ClsPaginas
|
||||
Public Shared 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 = $"GlobalDTClasificaciones-{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
|
||||
@@ -872,35 +889,48 @@ Public Class ClsPaginas
|
||||
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(Application("GlobalDTClasificacionesSubProyecto"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
|
||||
Dim AppNombre As String = $"GlobalDTClasificacionesSubProyectos-{CveEmpresa}"
|
||||
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||
Dim ObjClasificaciones As New ClsClasificaciones
|
||||
If ObjClasificaciones.GetDTClasificacionesSubProyectos(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjClasificaciones.DtResultados.FiltraParametros("Codigo <> '' ")
|
||||
ObjClasificaciones.Dispose()
|
||||
End If
|
||||
Dim filtros As New List(Of String)
|
||||
If CveClasificacion <> -1 Then filtros.Add($"CveCategoria = {CveClasificacion}")
|
||||
If filtros.Count > 0 Then
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTClasificacionesSubProyectos = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTClasificacionesSubProyectos = DirectCast(Application("GlobalDTClasificacionesSubProyecto"), DataTable)
|
||||
GlobalDTClasificacionesSubProyectos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTClasificacionesSubProyecto") = value
|
||||
Dim AppNombre As String = $"GlobalDTClasificacionesSubProyectos-{CveEmpresa}"
|
||||
Application(AppNombre) = 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(Application("GlobalDTACClasificadorObjetoGasto"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
|
||||
Dim AppNombre As String = $"GlobalDTACClasificadorObjetoGasto-{CveEmpresa}"
|
||||
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||
Dim ObjClasificaciones As New ClsClasificaciones
|
||||
If ObjClasificaciones.GetClasificaciones(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjClasificaciones.DtResultados.FiltraParametros("Codigo <> '' ")
|
||||
ObjClasificaciones.Dispose()
|
||||
End If
|
||||
Dim filtros As New List(Of String)
|
||||
If CveCategoria <> -1 Then filtros.Add($"CveCategoria = {CveCategoria}")
|
||||
If filtros.Count > 0 Then
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTACClasificadorObjetoGasto = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTACClasificadorObjetoGasto = DirectCast(Application("GlobalDTACClasificadorObjetoGasto"), DataTable)
|
||||
GlobalDTACClasificadorObjetoGasto = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTACClasificadorObjetoGasto") = value
|
||||
Dim AppNombre As String = $"GlobalDTACClasificadorObjetoGasto-{CveEmpresa}"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTClasificacionesDetalle(Optional CveEmpresa As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable
|
||||
@@ -960,7 +990,6 @@ Public Class ClsPaginas
|
||||
Property GlobalDTCategoriasPresupuestos(Optional CveEmpresa As Integer = -1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTCategoriasPresupuestos-{CveEmpresa}"
|
||||
'sino existe, recarga los datos
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
Dim ObjGenerales As New ClsGenerales
|
||||
If ObjGenerales.GetCategorias(CveEmpresa, 3) Then Application(AppNombre) = ObjGenerales.DtResultados
|
||||
@@ -976,7 +1005,6 @@ Public Class ClsPaginas
|
||||
Property GlobalDTChoferes(CveEmpresa As Integer, Optional CveChofer As Integer = -1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTChoferes-{CveEmpresa}"
|
||||
'sino existe, recarga los datos
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
Dim ObjAcar As New ClsAcarreos()
|
||||
If ObjAcar.GetChofer(-1, CveEmpresa, 1, -1) Then
|
||||
@@ -1024,12 +1052,29 @@ Public Class ClsPaginas
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTModulos() As DataTable
|
||||
Property GlobalDTModulos(Optional CveModulo As Integer = -1) As DataTable
|
||||
Get
|
||||
GlobalDTModulos = DirectCast(Application("GlobalDTModulos"), DataTable)
|
||||
Dim AppNombre As String = "GlobalDTModulos"
|
||||
If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
|
||||
Using ObjModulos As New ClsModulos
|
||||
If ObjModulos.GetModulos(-1, -1, "-1", "-1") Then Application(AppNombre) = ObjModulos.DtResultados
|
||||
End Using
|
||||
End If
|
||||
Dim filtros As New List(Of String)
|
||||
If CveModulo <> -1 Then filtros.Add($"CveModulo = {CveModulo}")
|
||||
|
||||
If filtros.Count > 0 Then
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTModulos = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTModulos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(ByVal value As DataTable)
|
||||
Application("GlobalDTModulos") = value
|
||||
Dim AppNombre As String = "GlobalDTModulos"
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Public Shared Property GlobalDTMonedas() As DataTable
|
||||
@@ -1932,43 +1977,44 @@ Public Class ClsPaginas
|
||||
End Set
|
||||
End Property
|
||||
'Variables para Ventas
|
||||
Property GlobalDTVendedores(CveEmpresa As Integer, Optional Estatus As Integer = 1, Optional VendedorTipo As Integer = 1) As DataTable
|
||||
Public Shared Property GlobalDTVendedores(CveEmpresa As Integer, Optional Estatus As Integer = 1, Optional VendedorTipo As Integer = 1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTVendedores-{CveEmpresa}"
|
||||
'sino existe, recarga los datos
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||
Dim ObjVendedores As New ClsVtaVendedores
|
||||
If ObjVendedores.GetVendedores(CveEmpresa) Then Application(AppNombre) = ObjVendedores.DtResultados
|
||||
If ObjVendedores.GetVendedores(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjVendedores.DtResultados
|
||||
ObjVendedores.Dispose()
|
||||
End If
|
||||
Dim filtros As New List(Of String)
|
||||
If VendedorTipo >= 0 Then filtros.Add($"VendedorTipo = {VendedorTipo}")
|
||||
If Estatus >= 0 Then filtros.Add($"CveEstatus = {Estatus}")
|
||||
If filtros.Count > 0 Then
|
||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTVendedores = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTVendedores = DirectCast(Application(AppNombre), DataTable)
|
||||
GlobalDTVendedores = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = $"GlobalDTVendedores-{CveEmpresa}"
|
||||
Application(AppNombre) = value
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTClientesCorporativo(CveEmpresa As Integer) As DataTable
|
||||
Public Shared Property GlobalDTClientesCorporativo(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
If CveEmpresa <> -1 Then
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTClientesCorporativo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTClientesCorporativo = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTClientesCorporativo = DirectCast(Application("GlobalDTClientesCorporativo"), DataTable)
|
||||
Dim AppNombre As String = $"GlobalDTClientesCorporativo-{CveEmpresa}"
|
||||
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||
Using ObjCorporativo As New ClsClientes
|
||||
If ObjCorporativo.GetCorporativo(CveEmpresa, -1) Then HttpContext.Current.Application(AppNombre) = ObjCorporativo.DtResultados
|
||||
End Using
|
||||
End If
|
||||
GlobalDTClientesCorporativo = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||
End Get
|
||||
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTClientesCorporativo") = value
|
||||
Dim AppNombre As String = $"GlobalDTClientesCorporativo-{CveEmpresa}"
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Public Shared Property GlobalDTCompProveedores(CveEmpresa As Integer, Optional CveProveedor As Integer = -1, Optional RFC As String = "-1") As DataTable
|
||||
@@ -1997,12 +2043,20 @@ Public Class ClsPaginas
|
||||
End Set
|
||||
End Property
|
||||
'EstatusFactura
|
||||
Property GlobalDTCompEstatusFactura() As DataTable
|
||||
Public Shared Property GlobalDTCompEstatusFactura() As DataTable
|
||||
Get
|
||||
GlobalDTCompEstatusFactura = DirectCast(Application("GlobalDTCompEstatusFactura"), DataTable).FiltraParametros("Estatus = 'Activo'")
|
||||
Dim AppNombre As String = "GlobalDTCompEstatusFactura"
|
||||
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||
Using ObjEstatusFacturaCompra As New ClsCompEstatusFactura
|
||||
If ObjEstatusFacturaCompra.GetEstatusFactura Then HttpContext.Current.Application(AppNombre) = ObjEstatusFacturaCompra.DtResultados
|
||||
End Using
|
||||
End If
|
||||
|
||||
GlobalDTCompEstatusFactura = DirectCast(HttpContext.Current.Application(AppNombre), DataTable).FiltraParametros("Estatus = 'Activo'")
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTCompEstatusFactura") = value
|
||||
Dim AppNombre As String = "GlobalDTCompEstatusFactura"
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTContratosSecciones() As DataTable
|
||||
@@ -2282,17 +2336,17 @@ Public Class ClsPaginas
|
||||
#Region "***********************************************************************DT EVENTOS****************************************************************************************"
|
||||
Property GlobalDTTiposEventos() As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTTiposEventos"
|
||||
Dim AppNombre As String = "GlobalDTTiposEventos"
|
||||
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||
Dim ObjTiposEventos As New ClsTiposEventos
|
||||
If ObjTiposEventos.GetTiposEventos() Then HttpContext.Current.Application(AppNombre) = ObjTiposEventos.DtResultados
|
||||
ObjTiposEventos.Dispose()
|
||||
Using ObjTiposEventos As New ClsTiposEventos
|
||||
If ObjTiposEventos.GetTiposEventos() Then HttpContext.Current.Application(AppNombre) = ObjTiposEventos.DtResultados
|
||||
End Using
|
||||
End If
|
||||
GlobalDTTiposEventos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = $"GlobalDTTiposEventos"
|
||||
Dim AppNombre As String = "GlobalDTTiposEventos"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
@@ -3218,7 +3272,7 @@ Public Class ClsPaginas
|
||||
End If
|
||||
Dim filtros As New List(Of String)
|
||||
If CveUsuario > 0 Then filtros.Add($"CveUsuario = {CveUsuario}")
|
||||
If Tipo <> "" Then filtros.Add($"Tipo = {Tipo}")
|
||||
If Tipo <> "" Then filtros.Add($"Tipo = '{Tipo}'")
|
||||
If filtros.Count > 0 Then
|
||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTOCEstatusUsuarios = Dv.ToTable
|
||||
@@ -6599,18 +6653,18 @@ Public Class ClsPaginas
|
||||
params.Add(New ReportParameter("Comprador", ObjOC.UsuarioAsignado))
|
||||
End If
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
Dim ObjCuentasBancos As New ClsGenerales()
|
||||
If ObjCuentasBancos.GetCuentasDepositos(CveProveedor:=ObjOC.CveProveedor) Then
|
||||
Dim CuentasActivas As DataTable = ObjCuentasBancos.DtResultados.FiltraParametros("EstatusTexto = 'Activo'")
|
||||
Dim CuentasStr As New StringBuilder("")
|
||||
For Each CuentasBancarios As DataRow In CuentasActivas.Rows
|
||||
Dim CuentaClabe As String = If(CuentasBancarios.Item("BancoNombre").ToString.Contains("BBVA") Or CuentasBancarios.Item("BancoNombre").ToString.Contains("BANCOMER"), CuentasBancarios.Item("Cuenta").ToString, CuentasBancarios.Item("CLABE").ToString)
|
||||
Dim infoCuenta As String = String.Format("<br>{0} {1}: {2}", CuentasBancarios.Item("BancoNombre").ToString, CuentasBancarios.Item("Abreviatura").ToString, CuentaClabe)
|
||||
CuentasStr.AppendFormat(infoCuenta)
|
||||
Next
|
||||
params.Add(New ReportParameter("Cuentas", CuentasStr.ToString))
|
||||
End If
|
||||
ObjCuentasBancos.Dispose()
|
||||
'Dim ObjCuentasBancos As New ClsGenerales()
|
||||
'If ObjCuentasBancos.GetCuentasDepositos(CveProveedor:=ObjOC.CveProveedor) Then
|
||||
Dim CuentasActivas As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=ObjOC.CveProveedor).FiltraParametros("EstatusTexto = 'Activo'")
|
||||
Dim CuentasStr As New StringBuilder("")
|
||||
For Each CuentasBancarios As DataRow In CuentasActivas.Rows
|
||||
Dim CuentaClabe As String = If(CuentasBancarios.Item("BancoNombre").ToString.Contains("BBVA") Or CuentasBancarios.Item("BancoNombre").ToString.Contains("BANCOMER"), CuentasBancarios.Item("Cuenta").ToString, CuentasBancarios.Item("CLABE").ToString)
|
||||
Dim infoCuenta As String = String.Format("<br>{0} {1}: {2}", CuentasBancarios.Item("BancoNombre").ToString, CuentasBancarios.Item("Abreviatura").ToString, CuentaClabe)
|
||||
CuentasStr.AppendFormat(infoCuenta)
|
||||
Next
|
||||
params.Add(New ReportParameter("Cuentas", CuentasStr.ToString))
|
||||
'End If
|
||||
'ObjCuentasBancos.Dispose()
|
||||
End If
|
||||
'params.Add(New ReportParameter("FechaOC", ObjOC.Fecha.ToShortDateString))
|
||||
Dim RutaFisicaSol As String = String.Format("Empresas\{0}\Firmas\{1}.png", EmpresaActual.CveEmpresa, CveUsuarioSol)
|
||||
|
||||
@@ -83,18 +83,7 @@ Partial Class Bancos_PopUpBuscarCuentasProveedor
|
||||
|
||||
ObjCuentasBancos.Dispose()
|
||||
CargaPSGridCuentasBancos()
|
||||
RecargaGlobalCuentasBancarias()
|
||||
End Sub
|
||||
|
||||
Private Sub RecargaGlobalCuentasBancarias(Optional ByVal CveCuenta As Integer = -1)
|
||||
If CveProveedor > 0 Then
|
||||
Dim ObjCuentasBancos As New ClsGenerales
|
||||
|
||||
If ObjCuentasBancos.GetCuentasDepositos() Then
|
||||
GlobalDTProveedoresCuentas(-1, True) = ObjCuentasBancos.DtResultados
|
||||
End If
|
||||
ObjCuentasBancos.Dispose()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaPSGridCuentasBancos()
|
||||
|
||||
@@ -1472,19 +1472,6 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
'ESTO NO DEBERIA ESTAR AQUI
|
||||
Private Sub RecargaGlobalCuentasBancarias(Optional ByVal CveCuenta As Integer = -1)
|
||||
If CveProveedor > 0 Then
|
||||
Dim ObjCuentasBancos As New ClsGenerales
|
||||
|
||||
If ObjCuentasBancos.GetCuentasDepositos() Then
|
||||
GlobalDTProveedoresCuentas(-1, True) = ObjCuentasBancos.DtResultados
|
||||
End If
|
||||
ObjCuentasBancos.Dispose()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub DdllOtrosPagos_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlOtrosPagos.SelectedIndexChanged
|
||||
|
||||
If DdlOtrosPagos.SelectedValue <> "-1" Then
|
||||
@@ -2047,17 +2034,15 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
Dim Transferencia = "", Banco = "", CLABE = "", Cuenta = "", Correo = ""
|
||||
If DdlTipoTransaccion.SelectedValue.Contiene("2", "8") Then Transferencia = "Si" Else Transferencia = "No"
|
||||
If DdlCuentaDeposito.SelectedValue.ToEntero > 0 Then
|
||||
Dim ObjGral As New ClsGenerales
|
||||
If ObjGral.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCuentaDeposito:=DdlCuentaDeposito.SelectedValue.ToEntero) Then
|
||||
If ObjGral.DtResultados.Rows.Count > 0 Then
|
||||
Banco = ObjGral.DtResultados.Rows(0)("BancoNombre").ToString
|
||||
CLABE = ObjGral.DtResultados.Rows(0)("CLABE").ToString
|
||||
Cuenta = ObjGral.DtResultados.Rows(0)("Cuenta").ToString
|
||||
Correo = ObjGral.DtResultados.Rows(0)("Correo").ToString
|
||||
End If
|
||||
Dim dtt As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor, CveCuentaDeposito:=DdlCuentaDeposito.SelectedValue.ToEntero)
|
||||
If dtt.Rows.Count > 0 Then
|
||||
Banco = dtt.Rows(0)("BancoNombre").ToString
|
||||
CLABE = dtt.Rows(0)("CLABE").ToString
|
||||
Cuenta = dtt.Rows(0)("Cuenta").ToString
|
||||
Correo = dtt.Rows(0)("Correo").ToString
|
||||
End If
|
||||
ObjGral.Dispose()
|
||||
End If
|
||||
|
||||
params.Add(New ReportParameter("Transferencia", Transferencia))
|
||||
params.Add(New ReportParameter("Banco", Banco))
|
||||
params.Add(New ReportParameter("CLABE", CLABE))
|
||||
|
||||
@@ -690,11 +690,7 @@ Partial Class Bancos_ProveedoresCreditos
|
||||
LblPagueseA.Text = "Beneficiario"
|
||||
End Select
|
||||
|
||||
|
||||
'RecargaCuentas
|
||||
CargaCuenta()
|
||||
RecargaCuentasDepositos()
|
||||
|
||||
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
@@ -1369,7 +1365,6 @@ Partial Class Bancos_ProveedoresCreditos
|
||||
Alert(Msg.ToString, TipoMensaje.MsgInformacion, String.Format("document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery))
|
||||
End If
|
||||
|
||||
RecargaGlobalCuentasBancarias()
|
||||
ObjIE.Dispose()
|
||||
ObjMov.Dispose()
|
||||
ObjComp.Dispose()
|
||||
@@ -1555,7 +1550,6 @@ Partial Class Bancos_ProveedoresCreditos
|
||||
trCuentaDeposito.Visible = False
|
||||
DdlCuentaDeposito.Items.Clear()
|
||||
End If
|
||||
RecargaGlobalCuentasBancarias()
|
||||
UpCuentaDeposito.Update()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
@@ -1573,18 +1567,6 @@ Partial Class Bancos_ProveedoresCreditos
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
'Recaga CuentasBancarias de Proveedor
|
||||
Private Sub RecargaGlobalCuentasBancarias(Optional ByVal CveCuenta As Integer = -1)
|
||||
If CveProveedor > 0 Then
|
||||
Dim ObjCuentasBancos As New ClsGenerales
|
||||
|
||||
If ObjCuentasBancos.GetCuentasDepositos() Then
|
||||
GlobalDTProveedoresCuentas(-1, True) = ObjCuentasBancos.DtResultados
|
||||
End If
|
||||
ObjCuentasBancos.Dispose()
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub DdlCuentaDeposito_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
Dim Dep As New ClsGenerales
|
||||
If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCuentaDeposito:=DdlCuentaDeposito.SelectedValue.ToEntero) AndAlso Dep.DtResultados.Rows.Count = 1 Then
|
||||
|
||||
@@ -3560,22 +3560,19 @@ Partial Class Compras_Proveedores
|
||||
Alert("Cuenta Bancaria borrada con éxito.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
If ObjCuentasBancos.GetCuentasDepositos Then
|
||||
GlobalDTProveedoresCuentas(CveProveedor, True) = ObjCuentasBancos.DtResultados
|
||||
End If
|
||||
|
||||
CargaPSGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString)
|
||||
ObjCuentasBancos.Dispose()
|
||||
RecargaGlobalCuentasBancarias()
|
||||
End Sub
|
||||
Private Sub RecargaGlobalCuentasBancarias(Optional ByVal CveCuenta As Integer = -1)
|
||||
If CveProveedor > 0 Then
|
||||
Dim ObjCuentasBancos As New ClsGenerales
|
||||
GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, -1) = Nothing
|
||||
'Dim ObjCuentasBancos As New ClsGenerales
|
||||
|
||||
If ObjCuentasBancos.GetCuentasDepositos() Then
|
||||
GlobalDTProveedoresCuentas(-1, True) = ObjCuentasBancos.DtResultados
|
||||
End If
|
||||
ObjCuentasBancos.Dispose()
|
||||
'If ObjCuentasBancos.GetCuentasDepositos() Then
|
||||
' GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, -1, True) = ObjCuentasBancos.DtResultados
|
||||
'End If
|
||||
'ObjCuentasBancos.Dispose()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
97
Global.asax
97
Global.asax
@@ -128,42 +128,11 @@
|
||||
End Using
|
||||
|
||||
GuardaLogAsax(String.Format("Globalasax 11:{0}", DateTime.Now))
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'G E N E R A L E S
|
||||
|
||||
'Using ObjGenerales As New ClsGenerales
|
||||
' 'If ObjGenerales.GetGralPaises Then Application("GlobalDTGralPaises") = ObjGenerales.DtResultados Else Application("GlobalDTGralPaises") = Nothing
|
||||
' 'If ObjGenerales.GetGralEstados Then Application("GlobalDTGralEstados") = ObjGenerales.DtResultados Else Application("GlobalDTGralEstados") = Nothing
|
||||
' 'If ObjGenerales.GetGralMunicipios Then Application("GlobalDTGralMunicipios") = ObjGenerales.DtResultados Else Application("GlobalDTGralMunicipios") = Nothing
|
||||
' 'If ObjGenerales.GetGralPoblaciones Then Application("GlobalDTGralPoblaciones") = ObjGenerales.DtResultados Else Application("GlobalDTGralPoblaciones") = Nothing
|
||||
' 'If ObjGenerales.GetEscolaridades Then Application("GlobalDTGralEscolaridades") = ObjGenerales.DtResultados Else Application("GlobalDTGralEscolaridades") = Nothing
|
||||
' 'If ObjGenerales.GetCategorias Then Application("GlobalDTGralCategorias") = ObjGenerales.DtResultados Else Application("GlobalDTGralCategorias") = Nothing
|
||||
' 'If ObjGenerales.GetCategorias(-1, 2) Then Application("GlobalDTFamilias") = ObjGenerales.DtResultados Else Application("GlobalDTFamilias") = Nothing
|
||||
' 'If ObjGenerales.GetCategorias(-1, 3) Then Application("GlobalDTCategoriasPresupuestos") = ObjGenerales.DtResultados Else Application("GlobalDTCategoriasPresupuestos") = Nothing
|
||||
' 'If ObjGenerales.GetCategorias(-1, 4) Then Application("GlobalDTCategorias2") = ObjGenerales.DtResultados Else Application("GlobalDTCategorias2") = Nothing
|
||||
' 'If ObjGenerales.GetColectivas(-1, "-1", "-1", "-1", -1) Then Application("GlobalDTGralColectivas") = ObjGenerales.DtResultados Else Application("GlobalDTGralColectivas") = Nothing
|
||||
' 'If ObjGenerales.GetGralPaqueterias Then Application("GlobalDTPaqueterias") = ObjGenerales.DtResultados Else Application("GlobalDTPaqueterias") = Nothing
|
||||
' 'If ObjGenerales.GetGralPaqueteriasGuiasTipo Then Application("GlobalDTPaqueteriaGuiaTipos") = ObjGenerales.DtResultados Else Application("GlobalDTPaqueteriaGuiaTipos") = Nothing
|
||||
' 'If ObjGenerales.GetClasificacionPorcentaje(-1, -1, -1, -1, 1) Then Application("GlobalDTClasificacionPorcentaje") = ObjGenerales.DtResultados Else Application("GlobalDTClasificacionPorcentaje") = Nothing
|
||||
'End Using
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'C L A S I F I C A C I O N E S
|
||||
|
||||
Using ObjClasificaciones As New ClsClasificaciones()
|
||||
If ObjClasificaciones.GetClasificaciones() Then
|
||||
Application("GlobalDTClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros("Codigo is null OR Codigo = '' ")
|
||||
Application("GlobalDTACClasificadorObjetoGasto") = ObjClasificaciones.DtResultados.FiltraParametros("Codigo <> '' ")
|
||||
Else
|
||||
Application("GlobalDTClasificaciones") = Nothing
|
||||
Application("GlobalDTACClasificadorObjetoGasto") = Nothing
|
||||
End If
|
||||
|
||||
If ObjClasificaciones.GetDTClasificacionesSubProyectos() Then
|
||||
Application("GlobalDTClasificacionesSubProyecto") = ObjClasificaciones.DtResultados
|
||||
Else
|
||||
Application("GlobalDTClasificacionesSubProyecto") = Nothing
|
||||
End If
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'F A M I L I A S
|
||||
@@ -179,55 +148,6 @@
|
||||
End Using
|
||||
GuardaLogAsax(String.Format("Globalasax 20:{0}", DateTime.Now))
|
||||
|
||||
|
||||
'Using ObjVenta As New ClsVentas
|
||||
' If ObjVenta.GetClasificacionDetalle(-1, CveClasificacion:=-1) Then
|
||||
' Application("GlobalDTClasificacionesDetalle") = ObjVenta.DtResultados
|
||||
' End If
|
||||
'End Using
|
||||
'GuardaLogAsax(String.Format("Globalasax 21:{0}", DateTime.Now))
|
||||
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'T I P O S - D E - E V E N T O S
|
||||
Using ObjTiposEventos As New ClsTiposEventos
|
||||
If ObjTiposEventos.GetTiposEventos() Then Application("GlobalDTTiposEventos") = ObjTiposEventos.DtResultados Else Application("GlobalDTTiposEventos") = Nothing
|
||||
End Using
|
||||
GuardaLogAsax(String.Format("Globalasax 27:{0}", DateTime.Now))
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'P R O V E E D O R E S C U E N T A S
|
||||
Using ObjProveedoresBancos As New ClsGenerales
|
||||
If ObjProveedoresBancos.GetCuentasDepositos() Then Application("GlobalDTProveedoresCuentas") = ObjProveedoresBancos.DtResultados Else Application("GlobalDTProveedoresCuentas") = Nothing
|
||||
End Using
|
||||
|
||||
GuardaLogAsax(String.Format("Globalasax 30:{0}", DateTime.Now))
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'V E N D E D O R E S
|
||||
|
||||
Using ObjVendedores As New ClsVtaVendedores
|
||||
If ObjVendedores.GetVendedores(-1) Then Application("GlobalDTVendedores") = ObjVendedores.DtResultados Else Application("GlobalDTVendedores") = Nothing
|
||||
End Using
|
||||
|
||||
GuardaLogAsax(String.Format("Globalasax 31:{0}", DateTime.Now))
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'C O R P O R A T I V O
|
||||
|
||||
Using ObjCorporativo As New ClsClientes
|
||||
If ObjCorporativo.GetCorporativo(-1, -1) Then Application("GlobalDTClientesCorporativo") = ObjCorporativo.DtResultados Else Application("GlobalDTClientesCorporativo") = Nothing
|
||||
End Using
|
||||
GuardaLogAsax(String.Format("Globalasax 32:{0}", DateTime.Now))
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'E S T A T U S - F A C T U R A
|
||||
|
||||
Using ObjEstatusFacturaCompra As New ClsCompEstatusFactura
|
||||
If ObjEstatusFacturaCompra.GetEstatusFactura Then Application("GlobalDTCompEstatusFactura") = ObjEstatusFacturaCompra.DtResultados Else Application("GlobalDTCompEstatusFactura") = Nothing
|
||||
End Using
|
||||
|
||||
GuardaLogAsax(String.Format("Globalasax 33:{0}", DateTime.Now))
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'------------------------------------------------------------------------------S I S T E M A ----------------------------------------------------------------------------------
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -239,23 +159,6 @@
|
||||
|
||||
GuardaLogAsax(String.Format("Globalasax 35:{0}", DateTime.Now))
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'R O L E S
|
||||
|
||||
Using ObjRoles As New ClsSisRoles
|
||||
If ObjRoles.GetRoles(-1, -1) Then Application("GlobalDTRoles") = ObjRoles.DtResultados Else Application("GlobalDTRoles") = Nothing
|
||||
End Using
|
||||
|
||||
GuardaLogAsax(String.Format("Globalasax 37:{0}", DateTime.Now))
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'M O D U L O S
|
||||
|
||||
Using ObjModulos As New ClsModulos
|
||||
If ObjModulos.GetModulos(-1, -1, "-1", "-1") Then Application("GlobalDTModulos") = ObjModulos.DtResultados Else Application("GlobalDTModulos") = Nothing
|
||||
End Using
|
||||
GuardaLogAsax(String.Format("Globalasax 38:{0}", DateTime.Now))
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'C O M B U S T I B L E S
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ Partial Class Inicio
|
||||
Dim Codigo As String = Decripta(Request("ADCod"))
|
||||
Dim Msg As String = ""
|
||||
If Codigo.Substring(0, 10) = "CveModulo=" Then
|
||||
Msg = "No tiene permisos de acceso al módulo:" & GlobalDTModulos().FiltroPrimeroValor("Modulo", Codigo)
|
||||
Msg = "No tiene permisos de acceso al módulo: " & GlobalDTModulos(Codigo.Substring(10).ToEntero).FiltroPrimeroValor("Modulo")
|
||||
End If
|
||||
Alert(Msg, TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
@@ -349,7 +349,7 @@ Partial Class OI_Desarrollo
|
||||
DdlUsuarioPruebas.DataBind()
|
||||
DdlUsuarioPruebas.Items.Insert(0, New ListItem("Selecione uno", "-1"))
|
||||
|
||||
DdlModulo.DataSource = GlobalDTModulos()
|
||||
DdlModulo.DataSource = GlobalDTModulos(-1)
|
||||
DdlModulo.DataBind()
|
||||
DdlModulo.Items.Insert(0, New ListItem("Selecione uno", "-1"))
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ Partial Class OI_RepDesarrollo
|
||||
'DdlResponsable.DataBind()
|
||||
'DdlResponsable.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlModulo.DataSource = GlobalDTModulos()
|
||||
DdlModulo.DataSource = GlobalDTModulos(-1)
|
||||
DdlModulo.DataBind()
|
||||
DdlModulo.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
|
||||
@@ -2178,7 +2178,7 @@ Partial Class OI_SoporteADS
|
||||
|
||||
|
||||
|
||||
DdlModulo.DataSource = GlobalDTModulos
|
||||
DdlModulo.DataSource = GlobalDTModulos(-1)
|
||||
DdlModulo.DataBind()
|
||||
DdlModulo.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ Partial Class Sistemas_EmpresasModulos
|
||||
End Sub
|
||||
|
||||
Private Sub CargaModulosDisponible()
|
||||
Dim DtModulosDisponible = GlobalDTModulos.FiltraParametros("Liga <> ''")
|
||||
Dim DtModulosDisponible = GlobalDTModulos().FiltraParametros("Liga <> ''")
|
||||
|
||||
Dim rowsToDelete = From r1 In DtModulosDisponible.AsEnumerable()
|
||||
Join r2 In DtModulosEmpresa.AsEnumerable() On r1.Field(Of Integer)("CveModulo") Equals r2.Field(Of Integer)("CveModulo")
|
||||
|
||||
@@ -6737,12 +6737,8 @@ Partial Class Clientes
|
||||
Dim index = GvRow.RowIndex
|
||||
TempDTCuentasBancos.Rows.RemoveAt(index)
|
||||
Alert("Cuenta Bancaria borrada con éxito.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
'If ObjCuentasBancos.GetCuentasDepositos Then
|
||||
' GlobalDTProveedoresCuentas(CveCliente, True) = ObjCuentasBancos.DtResultados
|
||||
'End If
|
||||
|
||||
End If
|
||||
|
||||
CargaPSGridCuentasBancos()
|
||||
ObjCuentasBancos.Dispose()
|
||||
RecargaGlobalCuentasBancarias()
|
||||
|
||||
@@ -48,9 +48,8 @@ Partial Class ZDG_MensajeAutomatico
|
||||
|
||||
Private Sub MandaMensajeAutomatico()
|
||||
|
||||
Dim pag As New ClsPaginas
|
||||
pag.Alert("TODO FRENADO!!", TipoMensaje.MsgAdvertencia)
|
||||
pag.Dispose()
|
||||
Alert("TODO FRENADO!!", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
Exit Sub
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user