Package controller

Source Code of controller.ControllerLogIn

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/

package controller;

import dao.DaoUser;
import model.User;

/**
*
* @author GuillermoLuis
*/
public class ControllerLogIn {
    public boolean LogIn(String user, String pass){
        DaoUser daoUser = new DaoUser();
        for(User u: daoUser.FindAllUser()){
            if(u.getUser().equals(user)&& u.getPass().equals(pass)){
                return true;
            }
        }
        return false;
    }
   
    public User getUsuario(String user, String pass){
        DaoUser daoUser = new DaoUser();
        for(User u: daoUser.FindAllUser()){
            if(u.getUser().equals(user)&& u.getPass().equals(pass)){
                return u;
            }
        }
        return null;
    }
}
TOP

Related Classes of controller.ControllerLogIn

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.