Ejemplo n.º 1
0
        public List <Models.Group> GetGroupListFull(Dal.AD ad, Dal.SQL sql)
        {
            List <Models.Group> groups = sql.GetGroupList(false);

            for (int i = 0; i < groups.Count; i++)
            {
                groups[i].Members = sql.GetMemberList(groups[i].Id);
                for (int j = 0; j < groups[i].Members.Count; j++)
                {
                    Models.Person person       = new Models.Person();
                    Models.Course personCourse = sql.GetPersonsCourse(groups[i].Members[j].UNI);
                    if (personCourse.StartCourse < DateTime.Now && personCourse.EndCourse > DateTime.Now)
                    {
                        person.OnCourse = true;
                    }
                    else
                    {
                        person.OnCourse = false;
                    }
                    person.Name          = ad.GetUserInfo(groups[i].Members[j].UNI).Name;
                    groups[i].Members[j] = person;
                }
            }
            return(groups);
        }