private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { var tutorId = Convert.ToInt32(dataGridView1.Rows[e.RowIndex].Cells[0].Value); SSS_Library.IS2G10_DBSSSDataSet.SEARCH_TUTORRow tutor; if (isAssignedGroupCheckBox.Checked) { tutor = sEARCH_TUTORTableAdapter.GetData(_groupId).FindBytutor_id(tutorId); } else { tutor = sEARCH_TUTORTableAdapter.GetDataAll().FindBytutor_id(tutorId); } if (!_isUpdateTutor) { DisplayStudentInformation(tutor); } else { Coordinator coordinator = (Coordinator)Application.OpenForms["Coordinator"]; var updateTutorModal = new UpdateTutorModal(tutorId); coordinator.SetModal(updateTutorModal); this.Hide(); updateTutorModal.Show(); } }
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { var studentId = Convert.ToInt32(dataGridView1.Rows[e.RowIndex].Cells[0].Value); SSS_Library.IS2G10_DBSSSDataSet.SEARCH_STUDENTRow student = sEARCH_STUDENTTableAdapter.GetData(_coordinatorId).FindBystudent_id(studentId); if (!_isUpdateStudent || !_isUpdateStudentConsultation) { DisplayStudentInformation(student); } else if (_isUpdateStudent) { Coordinator coordinator = (Coordinator)Application.OpenForms["Coordinator"]; var updateStudentProfileModalModal = new UpdateStudentProfileModal(studentId); coordinator.SetModal(updateStudentProfileModalModal); this.Hide(); updateStudentProfileModalModal.Show(); } else if (_isUpdateStudentConsultation) { //todo throw new NotImplementedException(); } }