public List <OpportunitySectionStudent> GetOpportunityStudentListReport(int quarterID) { var reader = dbHelper.GetOpportunityStudentListReport(Constant.sp_GetOpportunityStudentListReport, quarterID); List <OpportunitySectionStudent> opportunitySectionStudentList = new List <OpportunitySectionStudent>(); OpportunitySectionStudent oppSectionStudent = null; while (reader.Read()) { oppSectionStudent = new OpportunitySectionStudent(); oppSectionStudent.OpportunityID = Convert.ToInt32(reader["OpportunityID"]); oppSectionStudent.OpportunityName = reader["OpportunityName"].ToString(); oppSectionStudent.OrganizationName = reader["OrganizationName"].ToString(); oppSectionStudent.OpportunityTypeName = reader["OpportunityTypeName"].ToString(); oppSectionStudent.SectionName = reader["SectionName"].ToString(); oppSectionStudent.CourseShortName = reader["CourseShortName"].ToString(); oppSectionStudent.QuarterShortName = reader["QuarterShortName"].ToString(); oppSectionStudent.ProfessorName = reader["ProfessorName"].ToString(); oppSectionStudent.StudentName = reader["StudentName"].ToString(); oppSectionStudent.StudentEmail = reader["StudentEmail"].ToString(); oppSectionStudent.PartnerApprovedHours = reader["PartnerApprovedHours"].ToString(); opportunitySectionStudentList.Add(oppSectionStudent); } return(opportunitySectionStudentList); }
private void DataBind() { int quarterID = Convert.ToInt32(ddlQuarters.SelectedValue); OpportunitySectionStudent opp = new OpportunitySectionStudent(); oppList = opp.GetOpportunityStudentListReport(quarterID); }
protected void tbnClick_Assign(Object sender, EventArgs e) { Button clickedButton = (Button)sender; int opportunityID = Convert.ToInt32(ddlOtherOpportunity.SelectedValue); string studentEmail = tbStudentEmail.Text; OpportunitySectionStudent oss = new OpportunitySectionStudent(); oss.AssignOpportunityToStudentByAdmin(opportunityID, studentEmail); tbLabel.Text = "Succeed!"; }