ImporteDeduccionesPago, cuentas bancarias tarjetas
This commit is contained in:
@@ -2,18 +2,22 @@
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports System.IO
|
||||
Imports System.Data
|
||||
|
||||
'Imports DocumentFormat.OpenXml.Office.CustomUI
|
||||
|
||||
Partial Class Bancos_CuentasBancariasDetalle
|
||||
Inherits ClsPaginas
|
||||
|
||||
'Configuración
|
||||
Inherits ClsPaginas
|
||||
|
||||
'Configuración
|
||||
#Region "P R O P I E D A D E S"
|
||||
Private ReadOnly Property CveCuenta As Integer
|
||||
Get
|
||||
Get
|
||||
|
||||
If ViewState("CveCuenta") Is Nothing Then
|
||||
ViewState("CveCuenta") = -1
|
||||
End If
|
||||
Return ViewState("CveCuenta").ToString.ToEntero
|
||||
|
||||
End Get
|
||||
End Property
|
||||
Private Property DTUsuarios As DataTable
|
||||
@@ -23,14 +27,15 @@ Partial Class Bancos_CuentasBancariasDetalle
|
||||
Set(value As DataTable)
|
||||
ViewState("DTUsuarios") = value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
CargarTipoCuenta()
|
||||
CargarBanco()
|
||||
CargarMoneda()
|
||||
CargaCuentasPadre()
|
||||
ViewState("DTUsuarios") = Nothing
|
||||
|
||||
Dim tablaUsuariosAux As DataTable = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "Nombre", DistinctColumns:={"CveUsuario", "Nombre", "Usuario"})
|
||||
@@ -68,9 +73,36 @@ Partial Class Bancos_CuentasBancariasDetalle
|
||||
ActivarRegistroAutomatico()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCuentasPadre()
|
||||
|
||||
Dim DTCuentasPadre As New DataTable
|
||||
|
||||
DdlCuentaPadre.DataSource = GlobalDTBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa, CveTipoCuenta:=-1).FiltraParametros($" CveCuenta <> {CveCuenta} ", "", {"CveCuenta", "NumCuentaMoneda"})
|
||||
|
||||
'Dim ObjBancos As New ClsBancos
|
||||
'If ObjBancos.GetBancosCuentas(-1, UsuarioActual.CveEmpresa) Then
|
||||
' DTCuentasPadre = ObjBancos.DtResultados.FiltraParametros("", "", {"CveCuenta", "TipoCuenta", "Banco", "NumCuenta", "CLABE", "Moneda", "FInicial", "Estatus", "Fecha", "Usuario"})
|
||||
|
||||
' If CveCuenta > 0 Then
|
||||
' DTCuentasPadre = DTCuentasPadre.FiltraParametros($" CveCuenta <> {CveCuenta} ")
|
||||
' End If
|
||||
|
||||
' DdlCuentaPadre.DataSource = DTCuentasPadre
|
||||
|
||||
'Else
|
||||
' DdlCuentaPadre.DataSource = Nothing
|
||||
'End If
|
||||
|
||||
'ObjBancos.Dispose()
|
||||
|
||||
DdlCuentaPadre.DataBind()
|
||||
DdlCuentaPadre.Items.Insert(0, New ListItem("Sin Selección", "-1"))
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " CARGA VALORES INICIALES "
|
||||
Private Sub SetValues()
|
||||
ViewState("Orden") = ""
|
||||
@@ -186,9 +218,10 @@ Partial Class Bancos_CuentasBancariasDetalle
|
||||
ChkUsaTarjeta.Checked = ObjCuentasBancariasDetalle.UsaTarjeta
|
||||
|
||||
ChkTieneTerminal.Checked = ObjCuentasBancariasDetalle.TieneTerminal
|
||||
|
||||
ChkUsaTarjeta_CheckedChanged(Nothing, Nothing)
|
||||
|
||||
DdlCuentaPadre.SelectedValueExist(ObjCuentasBancariasDetalle.CveCuentaPadre)
|
||||
|
||||
trFinicial.Visible = False
|
||||
trLimiteCredito.Visible = True
|
||||
TxtLimiteCredito.Text = ObjCuentasBancariasDetalle.LimiteCredito.ToString
|
||||
@@ -256,7 +289,7 @@ Partial Class Bancos_CuentasBancariasDetalle
|
||||
If ObjCuentasBancariasDetalle.AddBancosCuentas(DdlBanco.SelectedValue.ToEntero, DdlTipoCuenta.SelectedValue.ToEntero, TxtNumCuenta.Text.Trim,
|
||||
TxtCLABE.Text.Trim, DdlMoneda.SelectedValue.ToEntero, 0, TxtFInicial.Text.Trim.ToEntero, 0, 0, TxtLimiteCredito.Text.Trim.ToDouble,
|
||||
"", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, If(ChkLayout.Checked, TxtConvenio.Text, ""), ChkLayout.Checked, ChkUsaTarjeta.Checked, UsaLayoutGrupos:=ChkLayoutGrupos.Checked,
|
||||
TieneTerminal:=ChkTieneTerminal.Checked) Then
|
||||
TieneTerminal:=ChkTieneTerminal.Checked, CveCuentaPadre:=DdlCuentaPadre.SelectedValue.ToEntero) Then
|
||||
ViewState("CveCuenta") = ObjCuentasBancariasDetalle.TCveCuenta
|
||||
Else
|
||||
ErrorUsuarios = True
|
||||
@@ -289,7 +322,7 @@ Partial Class Bancos_CuentasBancariasDetalle
|
||||
Else
|
||||
If ObjCuentasBancariasDetalle.UpdateBancosCuentas(DdlBanco.SelectedValue.ToEntero, DdlTipoCuenta.SelectedValue.ToEntero, TxtNumCuenta.Text.Trim, TxtCLABE.Text.Trim, DdlMoneda.SelectedValue.ToEntero, 0, TxtFInicial.Text.Trim.ToEntero, 0, 0,
|
||||
TxtLimiteCredito.Text.Trim.ToDouble, "", ChkEstatus.Checked, CveCuenta, TxtConvenio.Text,
|
||||
ChkLayout.Checked, ChkUsaTarjeta.Checked, UsaLayoutGrupos:=ChkLayoutGrupos.Checked, TieneTerminal:=ChkTieneTerminal.Checked) Then
|
||||
ChkLayout.Checked, ChkUsaTarjeta.Checked, UsaLayoutGrupos:=ChkLayoutGrupos.Checked, TieneTerminal:=ChkTieneTerminal.Checked, CveCuentaPadre:=DdlCuentaPadre.SelectedValue.ToEntero) Then
|
||||
'CargaDatos()
|
||||
GlobalDTBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa) = Nothing
|
||||
'If ObjCuentasBancariasDetalle.GetBancosCuentasUsuarios(-1) Then
|
||||
@@ -488,12 +521,18 @@ Partial Class Bancos_CuentasBancariasDetalle
|
||||
Dim CuentaContable = DirectCast(sender, Button).CommandArgument.ToString
|
||||
Dim Button = DirectCast(sender, Button)
|
||||
|
||||
Select Case CuentaContable
|
||||
Case "CuentaContable"
|
||||
AgregarCuentaContable(Button, DDlCuentaContable)
|
||||
Case "CuentaContableComplementaria"
|
||||
AgregarCuentaContable(Button, DdlCuentaContableComplementaria)
|
||||
End Select
|
||||
Try
|
||||
Select Case CuentaContable
|
||||
Case "CuentaContable"
|
||||
AgregarCuentaContable(Button, DDlCuentaContable)
|
||||
Case "CuentaContableComplementaria"
|
||||
AgregarCuentaContable(Button, DdlCuentaContableComplementaria)
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub AgregarCuentaContable(btn As Button, ddl As DropDownList)
|
||||
|
||||
Reference in New Issue
Block a user