VERSION 5.00
Begin VB.Form FAgregarCarasVendedor 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Asignar Caras"
   ClientHeight    =   3345
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4725
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3345
   ScaleWidth      =   4725
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton cmdcancelar 
      Caption         =   "Cancelar"
      Height          =   735
      Left            =   3140
      Picture         =   "FAgregarCarasVendedor.frx":0000
      Style           =   1  'Graphical
      TabIndex        =   2
      ToolTipText     =   "Cancelar"
      Top             =   2040
      Width           =   1335
   End
   Begin VB.CommandButton cmdaceptar 
      Caption         =   "&Grabar"
      Height          =   735
      Left            =   3140
      Picture         =   "FAgregarCarasVendedor.frx":030A
      Style           =   1  'Graphical
      TabIndex        =   3
      ToolTipText     =   "Grabar Caras"
      Top             =   1320
      Width           =   1335
   End
   Begin VB.Frame fraCaras 
      Caption         =   "Caras de Estación "
      Height          =   3015
      Left            =   240
      TabIndex        =   0
      Top             =   120
      Width           =   2655
      Begin VB.ListBox lstCaras 
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   2220
         Left            =   360
         Style           =   1  'Checkbox
         TabIndex        =   1
         Top             =   360
         Width           =   1935
      End
   End
   Begin VB.Shape Shape1 
      BackColor       =   &H80000003&
      BackStyle       =   1  'Opaque
      BorderColor     =   &H80000002&
      FillColor       =   &H00800000&
      Height          =   1935
      Left            =   3000
      Shape           =   4  'Rounded Rectangle
      Top             =   1080
      Width           =   1575
   End
End
Attribute VB_Name = "FAgregarCarasVendedor"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public GlngCorrelativo As Long
Public objCarasVendedor As DB_OP_MANTENIMIENTOS.C_CARAS_VENDEDOR

Private Sub cmdaceptar_Click()
On Error GoTo ErrorHandler
Dim I As Integer
'  If Trim(txtPlaca.Text) = Empty Then
'     MsgBox "Ingrese Número de Placa", vbDefaultButton1 + vbExclamation, "Faltan Parámetros"
'     txtPlaca.SetFocus
'     Exit Sub
'  End If
  For I = 0 To lstCaras.ListCount - 1
    If lstCaras.Selected(I) = True Then
        objCarasVendedor.AgregaEnTemporalCarasVendedor GlngCorrelativo, Mid(lstCaras.List(I), Len(lstCaras.List(I)) - 1, 2)
    End If
  Next
  
  Unload Me

Exit Sub

ErrorHandler:
    
   MsgBox MensajedeError(Err.Number, Err.Description), vbCritical + vbDefaultButton1, "Advertencia"
End Sub

Private Sub cmdcancelar_Click()
  Unload Me
  Set objCarasVendedor = Nothing
End Sub

Private Sub Form_Load()
    
    Set objCarasVendedor = New DB_OP_MANTENIMIENTOS.C_CARAS_VENDEDOR
    CargaLista
End Sub

Private Sub CargaLista()
Dim I As Integer
For I = 1 To GintCantidadCaras
    If I < 10 Then
        lstCaras.AddItem "Cara 0" & I
    Else
        lstCaras.AddItem "Cara " & I
    End If
Next
End Sub
