Esempio n. 1
0
        private void CoursesGridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            Enabled = false;
            InfoCourseForm infoCourseForm = new InfoCourseForm(this, (int)CoursesGridView.SelectedRows[0].Cells[0].Value);

            infoCourseForm.Show();
        }
Esempio n. 2
0
        private void GridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            string name = ((DataGridView)sender).Name;

            switch (name)
            {
            case "TeachersGridView":
            {
                InfoTeacher infoTeacher = new InfoTeacher(this, (int)TeachersGridView.SelectedRows[0].Cells[0].Value);
                infoTeacher.Show();
                break;
            }

            case "CoursesGridView":
            {
                InfoCourseForm infoCourseForm = new InfoCourseForm(this, (int)CoursesGridView.SelectedRows[0].Cells[0].Value);
                infoCourseForm.Show();
                break;
            }

            case "SchoolsGridView":
            {
                InfoSchool infoSchool = new InfoSchool(this, (int)SchoolsGridView.SelectedRows[0].Cells[0].Value);
                infoSchool.Show();
                break;
            }

            case "SubjectsGridView":
            {
                InfoSubject infoSubject = new InfoSubject(this, (int)SubjectsGridView.SelectedRows[0].Cells[0].Value);
                infoSubject.Show();
                break;
            }

            case "StudentsGridView":
            {
                InfoStudent infoStudent = new InfoStudent(this, (int)StudentsGridView.SelectedRows[0].Cells[0].Value);
                infoStudent.Show();
                break;
            }
            }
            Enabled = false;
        }