VERSION 5.00
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form FPago 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Pago"
   ClientHeight    =   3270
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4995
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3270
   ScaleWidth      =   4995
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton cmdcancelar 
      Caption         =   "Cancelar"
      Height          =   735
      Left            =   3330
      Picture         =   "FPago.frx":0000
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   2310
      Width           =   1215
   End
   Begin VB.CommandButton cmdaceptar 
      Caption         =   "&Grabar"
      Height          =   735
      Left            =   2010
      Picture         =   "FPago.frx":030A
      Style           =   1  'Graphical
      TabIndex        =   3
      Top             =   2310
      Width           =   1335
   End
   Begin MSDataListLib.DataCombo dtcTipoPago 
      Height          =   315
      Left            =   1650
      TabIndex        =   0
      Top             =   330
      Width           =   2865
      _ExtentX        =   5054
      _ExtentY        =   556
      _Version        =   393216
      Style           =   2
      Text            =   ""
   End
   Begin VB.Label Label1 
      Caption         =   "Tipo de Pago"
      Height          =   255
      Left            =   300
      TabIndex        =   1
      Top             =   360
      Width           =   1425
   End
End
Attribute VB_Name = "FPago"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private objCobranza As DB_AR_CUENTASCOBRAR.C_CANCELACION

Public Sub CargaDataCombo(objDataCombo As DataCombo, rsSource As Recordset, istrCampo1 As String, istrCampo2 As String)

    Set objDataCombo.DataSource = rsSource
    objDataCombo.DataField = istrCampo2
    Set objDataCombo.RowSource = rsSource
    objDataCombo.ListField = istrCampo2
    objDataCombo.BoundColumn = istrCampo1
    
    If Not rsSource.EOF Then
        objDataCombo.BoundText = rsSource.Fields(istrCampo2)
    End If

End Sub

Private Sub cmdcancelar_Click()
    Unload Me
End Sub

Private Sub dtcTipoPago_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 27 Then
        Unload Me
    End If
End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 27 Then
        Unload Me
    End If
End Sub

'Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
'    If KeyCode =  Then
'        Unload Me
'    End If
'End Sub

Private Sub Form_Load()
    KeyPreview = True
    
    Set objCobranza = New DB_AR_CUENTASCOBRAR.C_CANCELACION
    Call CargaDataCombo(dtcTipoPago, objCobranza.ListarCondicionesPago, "TYPEPAYMENTID", "descr")
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Set objCobranza = Nothing
End Sub
