public Manager SignInManager(string name, string password)
        {
            List <Manager> getManagers = repo.GetAllManagers();

            foreach (var manager in getManagers)
            {
                if ((manager.Name.Equals(name)) && (manager.Password.Equals(password)))
                {
                    return(repo.SignInManager(name, password));
                }
                else
                {
                    Log.Error($"Invalid Login. Name: {name} Password: {password}");
                    throw new Exception("\nInvalid Name/Password. Please try again");
                }
            }
            return(repo.SignInManager(name, password));
        }
        public List <Manager> GetAllManagers()
        {
            List <Manager> managers = managerRepo.GetAllManagers();

            return(managers);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Gets all managers from repository
 /// </summary>
 /// <returns>List of Manager</returns>
 public List <Manager> GetAllManagers()
 {
     return(repo.GetAllManagers());
 }