VERSION 5.00
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Object = "{69F9D01E-F1DE-11D4-9536-002018603DA2}#7.0#0"; "ControlNumber.ocx"
Begin VB.UserControl CTRL_PAGOTARJETAS 
   ClientHeight    =   330
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   6765
   ScaleHeight     =   330
   ScaleWidth      =   6765
   Begin MiControl.CtrlNumber ctrl_monto 
      Height          =   375
      Left            =   5400
      TabIndex        =   4
      Top             =   0
      Width           =   1335
      _ExtentX        =   2355
      _ExtentY        =   661
      BackColor       =   -2147483643
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin VB.TextBox TXT_NTARJETA 
      Height          =   315
      Left            =   3480
      MaxLength       =   20
      TabIndex        =   3
      Top             =   0
      Width           =   1935
   End
   Begin VB.TextBox TXT_SEQ 
      Alignment       =   1  'Right Justify
      Enabled         =   0   'False
      Height          =   315
      Left            =   0
      MaxLength       =   11
      TabIndex        =   2
      TabStop         =   0   'False
      Top             =   0
      Visible         =   0   'False
      Width           =   375
   End
   Begin MSDataListLib.DataCombo DTC_TARJETA 
      BeginProperty DataFormat 
         Type            =   0
         Format          =   """S/."" #,##0.00"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   10250
         SubFormatType   =   0
      EndProperty
      Height          =   315
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   2055
      _ExtentX        =   3625
      _ExtentY        =   556
      _Version        =   393216
      IntegralHeight  =   0   'False
      MatchEntry      =   -1  'True
      Style           =   2
      Text            =   ""
   End
   Begin MSDataListLib.DataCombo DTC_MONEDA 
      BeginProperty DataFormat 
         Type            =   0
         Format          =   """S/."" #,##0.00"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   10250
         SubFormatType   =   0
      EndProperty
      Height          =   315
      Left            =   2040
      TabIndex        =   1
      Top             =   0
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   556
      _Version        =   393216
      IntegralHeight  =   0   'False
      MatchEntry      =   -1  'True
      Style           =   2
      Text            =   ""
   End
End
Attribute VB_Name = "CTRL_PAGOTARJETAS"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
Dim rs_comboT As ADODB.Recordset
Dim rs_comboM As ADODB.Recordset
Dim cnx As ADODB.Connection
Dim bln_vuelta As Boolean

Private Sub ctrl_monto_GotFocus()
ctrl_monto.BackColor = vbCyan
ctrl_monto.SelStart = 0
ctrl_monto.SelLength = Len(ctrl_monto.Text)
bln_vuelta = True
End Sub


Private Sub ctrl_monto_KeyPress(KeyAscii As Integer)
If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or KeyAscii = 13 Or KeyAscii = 8) Then
   KeyAscii = 0
End If
If KeyAscii = 13 Then
DTC_TARJETA.SetFocus

End If
End Sub

Private Sub ctrl_monto_LostFocus()
ctrl_monto.BackColor = vbWhite
End Sub

Private Sub ctrl_monto_Validate(Cancel As Boolean)
If ctrl_monto.Text = "" Or Len(ctrl_monto.Text) = 0 Then
    ctrl_monto.Text = "0"
End If
End Sub

Private Sub DTC_MONEDA_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    TXT_NTARJETA.SetFocus
End If
End Sub

Private Sub DTC_TARJETA_GotFocus()
 bln_vuelta = False
End Sub

Private Sub DTC_TARJETA_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    DTC_MONEDA.SetFocus
End If
End Sub

Private Sub TXT_NTARJETA_GotFocus()
TXT_NTARJETA.BackColor = vbCyan
End Sub

Private Sub TXT_NTARJETA_KeyPress(KeyAscii As Integer)
If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or KeyAscii = 13 Or KeyAscii = 8) Then
   KeyAscii = 0
End If

If KeyAscii = 13 Then
    ctrl_monto.SetFocus
End If
End Sub

Private Sub TXT_NTARJETA_LostFocus()
TXT_NTARJETA.BackColor = vbWhite
End Sub

Private Sub UserControl_Initialize()
Dim STRSQL_T As String
Dim STRSQL_M As String
Dim LS_CAMPOID, LS_CAMPODESCR As String
Set rs_comboT = New ADODB.Recordset
Set rs_comboM = New ADODB.Recordset

STRSQL_T = "SELECT CARDid,descr FROM Op_CARD"
rs_comboT.CursorLocation = adUseClient
rs_comboT.Open STRSQL_T, "DATA SOURCE=SIES;USER ID=SA;PWD=", adOpenDynamic, adLockBatchOptimistic
Set DTC_TARJETA.RowSource = rs_comboT
DTC_TARJETA.ListField = "DESCR"
DTC_TARJETA.BoundColumn = "CARDID"

STRSQL_M = "SELECT CURYID,descr FROM CURRENCY"
rs_comboM.CursorLocation = adUseClient
rs_comboM.Open STRSQL_M, "DATA SOURCE=SIES;USER ID=SA;PWD=", adOpenDynamic, adLockBatchOptimistic
Set DTC_MONEDA.RowSource = rs_comboM
DTC_MONEDA.ListField = "DESCR"
DTC_MONEDA.BoundColumn = "CURYID"
ctrl_monto.Enteros = 10
ctrl_monto.Decimales = 2
ctrl_monto.PermitirNegativos = False
End Sub
Private Sub DTC_TARJETA_Change()
PropertyChanged "P_TARJETA"
End Sub
Public Property Get P_TARJETA() As String
Attribute P_TARJETA.VB_MemberFlags = "14"
P_TARJETA = DTC_TARJETA.BoundText
End Property
Public Property Let P_TARJETA(ByVal NEWPTARJETA As String)
    DTC_TARJETA.BoundText = NEWPTARJETA
End Property
Private Sub DTC_MONEDA_Change()
PropertyChanged "P_MONEDA"
End Sub
Public Property Get P_MONEDA() As String
Attribute P_MONEDA.VB_MemberFlags = "14"
P_MONEDA = DTC_MONEDA.BoundText
End Property
Public Property Let P_MONEDA(ByVal NEWPMONEDA As String)
    DTC_MONEDA.BoundText = NEWPMONEDA
End Property
Private Sub TXT_NTARJETA_Change()
PropertyChanged "P_NTARJETA"
End Sub
Public Property Get P_NTARJETA() As String
Attribute P_NTARJETA.VB_MemberFlags = "14"
P_NTARJETA = TXT_NTARJETA.Text
End Property
Public Property Let P_NTARJETA(ByVal NEWPNTARJETA As String)
    TXT_NTARJETA.Text = NEWPNTARJETA
End Property

Public Property Get P_MONTO() As String
Attribute P_MONTO.VB_MemberFlags = "14"
P_MONTO = ctrl_monto.Text
End Property
Public Property Let P_MONTO(ByVal NEWPMONTO As String)
    ctrl_monto.Text = NEWPMONTO
End Property

Private Sub CTRL_MONTO_Change()
If Len(Trim(ctrl_monto.Text)) = 0 Then
    ctrl_monto.Text = "0"
End If
PropertyChanged "P_MONTO"
End Sub
Private Sub TXT_SEQ_Change()
PropertyChanged "P_SEQ"
End Sub
Public Property Get P_SEQ() As String
Attribute P_SEQ.VB_MemberFlags = "14"
P_SEQ = TXT_SEQ.Text
End Property
Public Property Let P_SEQ(ByVal NEWPSEQ As String)
    TXT_SEQ.Text = NEWPSEQ
End Property
Public Sub enfoque()
DTC_TARJETA.SetFocus
End Sub

Public Property Get vuelta() As Boolean
vuelta = bln_vuelta
End Property
