private void jBtnLoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnLoginActionPerformed
        // TODO add your handling code here:
        String username = this.jTxtFldUsername.getText();
        String password = this.jTxtFldPassword.getText();
        
        Connection conn = Conexion.GetConnection();
            try {
                if (username != null && password!=null){
                    
                    String sql = ("SELECT Puesto_idPuesto FROM empleados WHERE idEmpleados='" + username + "' AND telefono='" + password + "'");
                    st = conn.createStatement();
                    rs = st.executeQuery(sql);
                    if( rs.next()){
                        //in this case enter when at least one result comes it means user is valid
                        JOptionPane.showMessageDialog(this,"Usuario Encontrado");
                        String [] val = {rs.getString(1)};
                        
                        if("2".equals(val[0])){
                            JOptionPane.showMessageDialog(this, "Bienvenido Vendedor!");
                            Ventas vent = new Ventas();
                            vent.setVisible(true);
                            this.dispose();
                        }else{
                            JOptionPane.showMessageDialog(this, "Bienvenido Administrador");
                            Administrador admin = new Administrador();
                            admin.setVisible(true);
                            this.dispose();
                        }
                    } else {
                        //in this case enter when  result size is zero  it means user is invalid
                        JOptionPane.showMessageDialog(this,"Usuario No Encontrado");
                    }
                }   
            } catch (SQLException e) {
                JOptionPane.showMessageDialog(this, e.getErrorCode()+": "+e.getMessage());
            }
        
        
    }//GEN-LAST:event_jBtnLoginActionPerformed