--nuevo globadt de cuentas, generales, adicional a la de por usuarios

This commit is contained in:
2024-12-09 10:03:50 -07:00
parent 7e260847ed
commit 7195c8834b
2 changed files with 26 additions and 14 deletions

View File

@@ -2154,18 +2154,30 @@ Public Class ClsPaginas
HttpContext.Current.Application(AppNombre) = value HttpContext.Current.Application(AppNombre) = value
End Set End Set
End Property End Property
'Property GlobalDTBancosCuentas(CveUsuario As Integer) As DataTable Public Shared Property GlobalDTBancosCuentasGral(CveEmpresa As Integer, Optional Estatus As Integer = 1, Optional CveTipoCuenta As Integer = -1) As DataTable
' Get Get
' Dim Str As String = String.Format("CveEmpresa = {0} ", UsuarioActual.CveEmpresa) Dim AppNombre As String = $"GlobalDTBancosCuentasGral-{CveEmpresa}"
' If CveUsuario > -1 Then Str = String.Format("{0} AND CveUsuario ={1}", Str, CveUsuario) If HttpContext.Current.Application(AppNombre) Is Nothing Then
' Dim Dv As New DataView(DirectCast(Application("GlobalDTBancosCuentas"), DataTable), Str, "", DataViewRowState.CurrentRows) Using ObjBancos As New ClsBancos
' GlobalDTBancosCuentas = Dv.ToTable If ObjBancos.GetBancosCuentas(-1, CveEmpresa) Then
' Dv.Dispose() HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados
' End Get Else
' Set(value As DataTable) HttpContext.Current.Application(AppNombre) = Nothing
' Application("GlobalDTBancosCuentas") = value End If
' End Set End Using
'End Property End If
Dim Str As String = String.Format("CveEmpresa = {0} ", CveEmpresa)
If CveTipoCuenta > -1 Then Str = String.Format("{0} AND CveTipoCuenta = {1}", Str, CveTipoCuenta)
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)
GlobalDTBancosCuentasGral = Dv.ToTable
Dv.Dispose()
End Get
Set(value As DataTable)
Dim AppNombre As String = $"GlobalDTBancosCuentasGral-{CveEmpresa}"
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
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 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 Get
Dim AppNombre As String = $"GlobalDTBancosCuentas-{CveEmpresa}" Dim AppNombre As String = $"GlobalDTBancosCuentas-{CveEmpresa}"

View File

@@ -2295,8 +2295,8 @@ Partial Class Sistemas_UsuarioDetalle
If DdlEmpresaAsignaciones.SelectedValue.ToEntero > 0 Then If DdlEmpresaAsignaciones.SelectedValue.ToEntero > 0 Then
If UsuarioControlado Then If UsuarioControlado Then
DdlCuentasBancarias.DataSource = DtCuentasBancariasControlado.FiltraParametros($"CveEmpresa = {DdlEmpresaAsignaciones.SelectedValue}") DdlCuentasBancarias.DataSource = DtCuentasBancariasControlado.FiltraParametros($"CveEmpresa = {DdlEmpresaAsignaciones.SelectedValue}")
Else Else
DdlCuentasBancarias.DataSource = GlobalDTBancosCuentas(-1, -1, -1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros($"CveEmpresa = {DdlEmpresaAsignaciones.SelectedValue}", "", {"CveCuenta", "NumCuentaMoneda"}) DdlCuentasBancarias.DataSource = GlobalDTBancosCuentasGral(CveEmpresa)
End If End If
End If End If
DdlCuentasBancarias.DataBind() DdlCuentasBancarias.DataBind()