private void dataGridViewStudent_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { try { var sId = dataGridViewStudent.SelectedCells[0].Value.ToString(); if (String.IsNullOrEmpty(sId)) { throw new Exception("Не выбран студент"); } var Form = new StudentDocumentsForm(); Form.StudentId = sId; Form.Show(); } catch (Exception gg) { MessageBox.Show(gg.Message, "SWA", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void buttonStudentDocuments_Click(object sender, EventArgs e) { var Form = new StudentDocumentsForm(); Form.Show(); }