private void BindPrincipals() { int courseID = Convert.ToInt32(Request.Params["CourseID"]); Courses courseda = new Courses(Globals.CurrentIdentity); User.UserList users = courseda.GetMembers(courseID, null); CourseRole.CourseRoleList roles = courseda.GetRoles(courseID, null); ddlPrins.Items.Clear(); //Add roles foreach (CourseRole role in roles) { ListItem item = new ListItem("Role: " + role.Name, role.PrincipalID.ToString()); ddlPrins.Items.Add(item); } //Add users foreach (User user in users) { ListItem item = new ListItem(user.FullName + " (" + user.UserName + ")", user.PrincipalID.ToString()); ddlPrins.Items.Add(item); } }
private void BindData() { Courses courseda = new Courses(Globals.CurrentIdentity); Assignment asst = new Assignments(Globals.CurrentIdentity).GetInfo(GetAsstID()); Course course = courseda.GetInfo(asst.CourseID); Section.SectionList sections = courseda.GetSections(course.ID); CourseMember.CourseMemberList mems = courseda.GetMembers(course.ID, null); ArrayList secmems = sections; secmems.AddRange(mems); dgUsers.DataSource = secmems; dgUsers.DataBind(); cmdEvaluate.Enabled = asst.ResultRelease; lblEvaluate.Visible = !asst.ResultRelease; lnkSecExpl.Attributes.Add("onClick", @"window.open('sectionexpl.aspx?CourseID=" + course.ID + @"', '"+ course.ID+@"', 'width=430, height=530')"); }