private void button4_Click(object sender, EventArgs e) { foreach (DataGridViewRow row in dataGridViewStudents.SelectedRows) { StudentSectionDirect st = new StudentSectionDirect(row.Cells[0].Value.ToString()); st.ShowDialog(); } }
private void Open_Click(object sender, EventArgs e) { DataTable dt = std.Get_Courses(Project_Sce.CodeLayer.StudentID_txt.Text); try { if (dt.Rows.Count > 0) { StudentSectionDirect st = new StudentSectionDirect(Project_Sce.CodeLayer.StudentID_txt.Text); st.ShowDialog(); } } catch (Exception exp) { MessageBox.Show("Incorrect ID", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } StudentID_txt.Clear(); }