public List <User> RetrieveAll()
        {
            List <User> lstUser = UCrud.RetrieveAll <User>();

            foreach (User u in lstUser)
            {
                u.Roleslist = RCrud.RetrieveRolesByUser <Role>(u);
                if (u.UserTerminal.IdTerminal != -1)
                {
                    u.UserTerminal = TCrud.Retrieve <Terminal>(u.UserTerminal);
                }
            }

            return(lstUser);
        }
Exemple #2
0
        public void ValidateNonExistingRole(Role role)
        {
            List <Role> ListRol = CrudFactory.RetrieveRolesByUser <Role>(role);

            if (ListRol != null)
            {
                throw new BusinessException(3);
            }
        }