Links
That stupid LINQ that Andrew won't shut up about:
public enum ClassPermission {
Student = 0,
//Dropped = 2,
//Audit = 16,
Grader = 1,
//Assistant = 256,
Teacher = 2
};
...
studentList.DataSource = from s in ldc.GroupUsers
where s.GroupId == ClassId
orderby s.Permissions, s.User.LastName, s.User.FirstName
select new { s.User.LastName, s.User.FirstName, s.User.Id, s.Grade, s.GradeDrop, classId = ClassId, Permission = Enum.Parse(typeof(ClassPermission), s.Permissions.GetValueOrDefault(0).ToString()) }; ;