VERSION 5.00
Begin VB.Form FingresoCodVend 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Ingrese Código de Vendedor"
   ClientHeight    =   1905
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5400
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1905
   ScaleWidth      =   5400
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton cmdaceptarprodadi 
      Caption         =   "Aceptar"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   855
      Left            =   1920
      Picture         =   "FingresoCodVend.frx":0000
      Style           =   1  'Graphical
      TabIndex        =   2
      Tag             =   "R ASDASD"
      Top             =   960
      Width           =   1575
   End
   Begin VB.CommandButton cmdcancelar 
      Cancel          =   -1  'True
      Caption         =   "Cancelar"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   855
      Left            =   3600
      Picture         =   "FingresoCodVend.frx":030A
      Style           =   1  'Graphical
      TabIndex        =   3
      Top             =   960
      Width           =   1575
   End
   Begin VB.TextBox txtcodvendedor 
      Height          =   375
      Left            =   1800
      MaxLength       =   20
      TabIndex        =   1
      Top             =   240
      Width           =   3375
   End
   Begin VB.Label Label1 
      Caption         =   "Código de Vendedor"
      Height          =   375
      Left            =   120
      TabIndex        =   0
      Top             =   240
      Width           =   1815
   End
End
Attribute VB_Name = "FingresoCodVend"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim MobjVentasPlaya As DB_OP_FACTURACION.C_VENTASPLAYA
Dim MobjSeguridadUsuario As DB_OP_FACTURACION.C_VENTASGENERAL
Public GIntdepantalla As Integer
Private Sub cmdaceptarprodadi_Click()
  Dim validar As Integer
'@ Modifificado por Jorge Illescas. para no estar ingresando cada rato la contraseña del
'@ vendedor PERO AQUI TAMBIEN LUEGO EDAGAR MODIFICO!!!.

'  validar = MobjVentasPlaya.Validarvendedor(txtcodvendedor.Text, "")
  'validar = MobjVentasPlaya.Validarvendedor(ytrewq2, "")
  validar = 0
  Call MENSAJES_VENDEDOR(validar)
  If validar <> 0 Then
     Exit Sub
  End If
  
  GStrCodVendedorVentaCombus = qwerty 'ytrewq2   ALMACENA EL CODIGO DE USUARIO VENDEDOR NO CLAVE(CAJA01)
          
  GStrCodUsuarioVentaCombus = MobjSeguridadUsuario.obtenerusuariovendedor(qwerty)  'ytrewq2 OBTIENE EL USUARIO DE SISTEMA AL Q PERTENECE EL VENDEDOR
   
  validar = MobjSeguridadUsuario.ValidarUsuario(GStrCodUsuarioVentaCombus) 'GCUSERID VALIDA SI USUARIO ESTA REGISTRADO

  Call MENSAJES_USUARIO(validar)
  If validar <> 0 Then
     Exit Sub
  End If
    
  If GIntdepantalla = 0 Then
     FDatosClientCombust.GBlnUsuarioEfectivoOK = True
  End If
  
  If GIntdepantalla = 1 Then
     FtarjetaCredito.GBlnUsuarioTarjetaOK = True
  End If

  If GIntdepantalla = 2 Then
     FIngresoVales.GBlnUsuarioCreditoOK = True
  End If
  
  Unload Me
End Sub

Private Sub cmdCancelar_Click()
   Unload Me
End Sub

Private Sub Form_Load()
    Me.Top = (Screen.Width - Me.Width) / 2
    Me.Left = (Screen.Height - Me.Height) / 2
    
    Set MobjVentasPlaya = New DB_OP_FACTURACION.C_VENTASPLAYA
    Set MobjSeguridadUsuario = New DB_OP_FACTURACION.C_VENTASGENERAL
    
    txtcodvendedor.Text = GStrCodVendedorVentaCombus
End Sub

Private Sub Form_Unload(Cancel As Integer)

    Set MobjVentasPlaya = Nothing
    Set MobjSeguridadUsuario = Nothing
End Sub
Private Sub txtcodvendedor_KeyPress(KeyAscii As Integer)
  KeyAscii = GBloqueaCaracter(KeyAscii)
  If KeyAscii = 13 Then
     cmdaceptarprodadi_Click
  End If
End Sub
