--nuevo globadt de cuentas, generales, adicional a la de por usuarios
This commit is contained in:
@@ -2154,18 +2154,30 @@ Public Class ClsPaginas
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
'Property GlobalDTBancosCuentas(CveUsuario As Integer) As DataTable
|
||||
' Get
|
||||
' Dim Str As String = String.Format("CveEmpresa = {0} ", UsuarioActual.CveEmpresa)
|
||||
' If CveUsuario > -1 Then Str = String.Format("{0} AND CveUsuario ={1}", Str, CveUsuario)
|
||||
' Dim Dv As New DataView(DirectCast(Application("GlobalDTBancosCuentas"), DataTable), Str, "", DataViewRowState.CurrentRows)
|
||||
' GlobalDTBancosCuentas = Dv.ToTable
|
||||
' Dv.Dispose()
|
||||
' End Get
|
||||
' Set(value As DataTable)
|
||||
' Application("GlobalDTBancosCuentas") = value
|
||||
' End Set
|
||||
'End Property
|
||||
Public Shared Property GlobalDTBancosCuentasGral(CveEmpresa As Integer, Optional Estatus As Integer = 1, Optional CveTipoCuenta As Integer = -1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTBancosCuentasGral-{CveEmpresa}"
|
||||
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||
Using ObjBancos As New ClsBancos
|
||||
If ObjBancos.GetBancosCuentas(-1, CveEmpresa) Then
|
||||
HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados
|
||||
Else
|
||||
HttpContext.Current.Application(AppNombre) = Nothing
|
||||
End If
|
||||
End Using
|
||||
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
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTBancosCuentas-{CveEmpresa}"
|
||||
|
||||
@@ -2295,8 +2295,8 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
If DdlEmpresaAsignaciones.SelectedValue.ToEntero > 0 Then
|
||||
If UsuarioControlado Then
|
||||
DdlCuentasBancarias.DataSource = DtCuentasBancariasControlado.FiltraParametros($"CveEmpresa = {DdlEmpresaAsignaciones.SelectedValue}")
|
||||
Else
|
||||
DdlCuentasBancarias.DataSource = GlobalDTBancosCuentas(-1, -1, -1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros($"CveEmpresa = {DdlEmpresaAsignaciones.SelectedValue}", "", {"CveCuenta", "NumCuentaMoneda"})
|
||||
Else
|
||||
DdlCuentasBancarias.DataSource = GlobalDTBancosCuentasGral(CveEmpresa)
|
||||
End If
|
||||
End If
|
||||
DdlCuentasBancarias.DataBind()
|
||||
|
||||
Reference in New Issue
Block a user