VERSION 5.00
Begin VB.Form FSEGURIDAD 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Seguridad - Módulo de Inventarios"
   ClientHeight    =   2775
   ClientLeft      =   5025
   ClientTop       =   4650
   ClientWidth     =   4350
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2775
   ScaleWidth      =   4350
   Begin VB.CommandButton CMD_ACEPTAR 
      Caption         =   "Aceptar"
      Default         =   -1  'True
      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            =   120
      Picture         =   "FSEGURIDAD.frx":0000
      Style           =   1  'Graphical
      TabIndex        =   2
      Tag             =   "R ASDASD"
      Top             =   1800
      Width           =   1815
   End
   Begin VB.CommandButton CMD_CANCELAR 
      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            =   2280
      Picture         =   "FSEGURIDAD.frx":030A
      Style           =   1  'Graphical
      TabIndex        =   3
      Top             =   1800
      Width           =   1935
   End
   Begin VB.TextBox txt_password 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   1680
      PasswordChar    =   "*"
      TabIndex        =   1
      Text            =   "1111"
      Top             =   960
      Width           =   2295
   End
   Begin VB.TextBox txt_usuario 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1680
      TabIndex        =   0
      Text            =   "FRANLEN"
      Top             =   360
      Width           =   2295
   End
   Begin VB.Label Label2 
      Caption         =   "Password:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   360
      TabIndex        =   5
      Top             =   960
      Width           =   1215
   End
   Begin VB.Label Label1 
      Caption         =   "Usuario:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   600
      TabIndex        =   4
      Top             =   360
      Width           =   975
   End
End
Attribute VB_Name = "FSEGURIDAD"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim mobj_cseguridad As DB_SE_MANTENIMIENTOS.c_seguridad

Private Sub CMD_ACEPTAR_Click()
Set mobj_cseguridad = New DB_SE_MANTENIMIENTOS.c_seguridad
Dim qwerty As String
Dim ytrewq As String
Dim cadena As String
Dim clave As String
Dim validar As Integer

qwerty = UCase(Trim(txt_usuario.Text))
ytrewq = UCase(Trim(txt_password.Text))
If Len(qwerty) = 0 Then
    MsgBox ("Debe ingresar un usuario")
    txt_usuario.SetFocus
    Exit Sub
End If
If Len(ytrewq) = 0 Then
    MsgBox ("Debe ingresar un password")
    txt_password.SetFocus
    Exit Sub
End If

validar = mobj_cseguridad.ValidarUsuario(qwerty, ytrewq)
If validar = 1 Then
    MsgBox ("No existe Usuario")
    txt_usuario.SetFocus
    Exit Sub
End If
If validar = 2 Then
    MsgBox ("Clave Incorrecta")
    txt_password.SetFocus
    Exit Sub
End If

If validar = 3 Then
    MsgBox ("Su clave ha expirado")
    txt_password.SetFocus
    Exit Sub
End If

If validar = 4 Then
    MsgBox ("Usuario Desactivado")
    txt_password.SetFocus
    Exit Sub
End If
GCUSERID = qwerty


MDIFInventarios.Show
Unload Me
End Sub

Private Sub CMD_CANCELAR_Click()
    End
End Sub


