Example #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);
        }
Example #2
0
 //gets a list over groups with the option for complete or not
 public List<Models.Group> GetGroupList(bool complete)
 {
     return sql.GetGroupList(complete);
 }