private void Internships_ComboBox_SelectedIndexChanged(object sender, EventArgs e) { if (Internships_ComboBox.SelectedItem.ToString() == "Accepted") { MyProfileDetails PD = new MyProfileDetails(); Student_Login S = new Student_Login(); PD.textBox1.Text = " The internships that are accepted are:"; PD.YourName_Label.Text = YourName_Label.Text; object O = controllerObj.GetStudentUsernameFromName(YourName_Label.Text.ToString()); DataTable dt = controllerObj.GetAcceptedInternshipsOfAStudentByUsername(O.ToString()); PD.DataGridView1.DataSource = dt; PD.DataGridView1.Refresh(); PD.Show(); } else if (Internships_ComboBox.SelectedItem.ToString() == "Pending") { MyProfileDetails PD = new MyProfileDetails(); Student_Login S = new Student_Login(); PD.textBox1.Text = " The internships that are still pending are:"; PD.YourName_Label.Text = YourName_Label.Text; object O = controllerObj.GetStudentUsernameFromName(YourName_Label.Text.ToString()); DataTable dt = controllerObj.GetPendingInternshipsOfAStudentByUsername(O.ToString()); PD.DataGridView1.DataSource = dt; PD.DataGridView1.Refresh(); PD.Show(); } }
private void MyCourses_Button_Click(object sender, EventArgs e) { MyProfileDetails PD = new MyProfileDetails(); Student_Login S = new Student_Login(); PD.textBox1.Text = " Choose which courses to show"; PD.YourName_Label.Text = YourName_Label.Text; PD.comboBox1.Visible = true; PD.Show(); }
private void Contest_Button_Click(object sender, EventArgs e) { MyProfileDetails PD = new MyProfileDetails(); Student_Login S = new Student_Login(); PD.textBox1.Text = " The contests that you joined are:"; PD.YourName_Label.Text = YourName_Label.Text; object O = controllerObj.GetStudentUsernameFromName(YourName_Label.Text.ToString()); DataTable dt = controllerObj.GetContestsNameJoinedByASpecificStudentByUsername(O.ToString()); PD.DataGridView1.DataSource = dt; PD.DataGridView1.Refresh(); PD.Show(); }