VERSION 5.00
Begin VB.Form FAgregaCodAlter 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Agregar Código Alternativo"
   ClientHeight    =   1665
   ClientLeft      =   5940
   ClientTop       =   5670
   ClientWidth     =   5295
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1665
   ScaleWidth      =   5295
   Begin VB.CommandButton cmdcancelar 
      Cancel          =   -1  'True
      Caption         =   "Cancelar"
      Height          =   735
      Left            =   3960
      Picture         =   "FAgregaCodAlter.frx":0000
      Style           =   1  'Graphical
      TabIndex        =   3
      Top             =   840
      Width           =   1215
   End
   Begin VB.CommandButton cmdaceptar 
      Caption         =   "&Grabar"
      Default         =   -1  'True
      Height          =   735
      Left            =   2640
      Picture         =   "FAgregaCodAlter.frx":030A
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   840
      Width           =   1335
   End
   Begin VB.TextBox txtcodalter 
      Height          =   375
      Left            =   1800
      MaxLength       =   20
      TabIndex        =   1
      Top             =   120
      Width           =   2655
   End
   Begin VB.Label lblcodalter 
      Caption         =   "Código Alternativo"
      Height          =   375
      Left            =   240
      TabIndex        =   0
      Top             =   240
      Width           =   1455
   End
End
Attribute VB_Name = "FAgregaCodAlter"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public GDblIdentificador As Double
Public GstrcodArticulo As String
Private MobjArticulo As DB_INV_ARTICULO.C_ARTICULO

Private Sub cmdAceptar_Click()
On Error GoTo ErrorHandler

  If Trim(txtcodalter.Text) = Empty Then
     MsgBox "Ingrese código alternativo", vbDefaultButton1 + vbExclamation, "Faltan Parámetros"
     txtcodalter.SetFocus
     Exit Sub
  End If

  MobjArticulo.GrabarCodigoAlterenTemp GDblIdentificador, GstrcodArticulo, txtcodalter.Text
  Unload Me

Exit Sub

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

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

Private Sub Form_Load()
 Me.Top = 4300
 Me.Left = 4800
 Set MobjArticulo = New DB_INV_ARTICULO.C_ARTICULO
End Sub

Private Sub txtcodalter_KeyPress(KeyAscii As Integer)
  KeyAscii = GBloqueaCaracter(KeyAscii)
End Sub
