VERSION 5.00
Begin VB.Form FClientePlaca 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Agregar Placa"
   ClientHeight    =   1830
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4995
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1830
   ScaleWidth      =   4995
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton cmdcancelar 
      Cancel          =   -1  'True
      Caption         =   "Cancelar"
      Height          =   735
      Left            =   3600
      Picture         =   "FClientePlaca.frx":0000
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   840
      Width           =   1215
   End
   Begin VB.CommandButton cmdaceptar 
      Caption         =   "&Grabar"
      Default         =   -1  'True
      Height          =   735
      Left            =   2280
      Picture         =   "FClientePlaca.frx":030A
      Style           =   1  'Graphical
      TabIndex        =   1
      Top             =   840
      Width           =   1335
   End
   Begin VB.TextBox txtPlaca 
      Height          =   285
      Left            =   960
      TabIndex        =   0
      Top             =   240
      Width           =   2535
   End
   Begin VB.Image Image1 
      Height          =   480
      Left            =   3720
      Picture         =   "FClientePlaca.frx":0614
      Top             =   0
      Width           =   480
   End
   Begin VB.Label lblPlaca 
      AutoSize        =   -1  'True
      Caption         =   "Placa"
      Height          =   195
      Left            =   240
      TabIndex        =   3
      Top             =   240
      Width           =   405
   End
End
Attribute VB_Name = "FClientePlaca"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public GlngCorrelativo As Long
Public GstrcodCliente As String
Public objCliente As DB_MA_MANTENIMIENTOS.C_CLIENTE

Private Sub cmdAceptar_Click()
On Error GoTo ErrorHandler

  If Trim(txtPlaca.Text) = Empty Then
     MsgBox "Ingrese Número de Placa", vbDefaultButton1 + vbExclamation, "Faltan Parámetros"
     txtPlaca.SetFocus
     Exit Sub
  End If

  objCliente.AgregarPlacaEnTmp GlngCorrelativo, Trim(txtPlaca.Text)
  Unload Me

Exit Sub

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

Private Sub cmdCancelar_Click()
  Unload Me
  Set objCliente = Nothing
End Sub

Private Sub Form_Load()
 Me.Top = 4300
 Me.Left = 4800
 Set objCliente = New DB_MA_MANTENIMIENTOS.C_CLIENTE
End Sub

Private Sub txtPlaca_KeyPress(KeyAscii As Integer)
    KeyAscii = GBloqueaCaracter(KeyAscii)
    If KeyAscii = 13 Then
        cmdaceptar.SetFocus
    End If
End Sub
