protected void loadStudent(long studentId) { Student student = (Student)userModule.getUserByUserId(studentId); if (student != null) { Session["studentid"] = student.USER_ID; student_id_holder.Text = student.USER_ID.ToString(); first_name.Text = student.FIRSTNAME; last_name.Text = student.LASTNAME; email.Text = student.EMAIL; phone.Text = student.PHONE; address1.Text = student.ADDRESS1; address2.Text = student.ADDRESS2; city_town.Text = student.CITY_TOWN; state.Text = student.STATE; zipcode.Text = student.ZIP_CODE; country.Text = student.COUNTRY; //populate projects applied for Session["applied_projects"] = student.PROJECTS_APPLIED; project_application_list.DataSource = Session["applied_projects"]; project_application_list.DataBind(); //populate assigned project if (student.TEAM_ASSIGNMENT.Count >= 1) { TeamAssignment tAssignment = student.TEAM_ASSIGNMENT.First(); //assume that there will only be 1 assignment per student Team assignedTeam = tAssignment.TEAM; ProjectAssignment pAssignment = assignedTeam.ASSIGNED_TO_PROJECT.First(); Project assignedProject = pAssignment.PROJECT; project_title.Text = assignedProject.PROJECT_TITLE; project_company.Text = assignedProject.PROJECT_OWNER.USERNAME; contact_person.Text = assignedProject.CONTACT_NAME; contact_number.Text = assignedProject.CONTACT_NUMBER; } //load profile pic FileModule fileModule = new FileModule(); string profile_pic_address = fileModule.getProfilePicLocation(student.USER_ID); if (profile_pic_address.Length > 0) { profile_pic.ImageUrl = "~/" + fileModule.getProfilePicLocation(student.USER_ID); } else { profile_pic.ImageUrl = ""; } //load course enrolled course_list.DataSource = student.COURSE_ENROLLED; course_list.DataBind(); } }
private void loadStudent(long studentId) { UserModule userModule = new UserModule(); FileModule fileModule = new FileModule(); Student student = (Student) userModule.getUserByUserId(studentId); student_id.Text = student.USER_ID.ToString(); first_name.Text = student.FIRSTNAME; last_name.Text = student.LASTNAME; email.Text = student.EMAIL; //get profile pic string profilePicLocation = fileModule.getProfilePicLocation(studentId); if(profilePicLocation.Length > 0) profile_pic.ImageUrl = "~/" + profilePicLocation; //get courses attended IList<Enrollment> courseEnrolled = student.COURSE_ENROLLED; foreach (Enrollment enrollment in courseEnrolled) { Course course = enrollment.COURSE; student_writeup.Text += course.COURSE_NAME + "<br />"; } }
protected void loadUC(long UCId) { CourseModule courseModule = new CourseModule(); UnitCoordinator uc = (UnitCoordinator)userModule.getUserByUserId(UCId); if (uc != null) { Session["ucid"] = uc.USER_ID; uc_id_holder.Text = uc.USER_ID.ToString(); first_name.Text = uc.FIRSTNAME; last_name.Text = uc.LASTNAME; email.Text = uc.EMAIL; phone.Text = uc.PHONE; address1.Text = uc.ADDRESS1; address2.Text = uc.ADDRESS2; city_town.Text = uc.CITY_TOWN; state.Text = uc.STATE; zipcode.Text = uc.ZIP_CODE; country.Text = uc.COUNTRY; //populate course under UC Session["courses"] = courseModule.getCoursesUnderUC(uc.USER_ID); course_list.DataSource = Session["courses"]; course_list.DataBind(); //load profile pic FileModule fileModule = new FileModule(); string profile_pic_address = fileModule.getProfilePicLocation(uc.USER_ID); if (profile_pic_address.Length > 0) { profile_pic.ImageUrl = "~/" + fileModule.getProfilePicLocation(uc.USER_ID); } else { profile_pic.ImageUrl = ""; } } }
private void loadStudent(long studentId) { UserModule userModule = new UserModule(); FileModule fileModule = new FileModule(); Student student = (Student) userModule.getUserByUserId(studentId); student_id.Text = student.USER_ID.ToString(); first_name.Text = student.FIRSTNAME; last_name.Text = student.LASTNAME; email.Text = student.EMAIL; student_writeup.Text = student.WRITE_UP; //get profile pic string profilePicLocation = fileModule.getProfilePicLocation(studentId); if (profilePicLocation.Length > 0) profile_pic.ImageUrl = "~/" + profilePicLocation; }