Esempio n. 1
0
        /*
         * Class list tasks
         */

        //adding data to the class list
        private void Add2_Click(object sender, EventArgs e)
        {
            var editSubjectForm = new EditClassForm();

            editSubjectForm.FormClosing += NewSubjectFormClosing;
            editSubjectForm.ShowDialog(this);
        }
Esempio n. 2
0
        //edit method to edit from the class list
        private void Edit2_Click(object sender, EventArgs e)
        {
            var editSubjectForm = new EditClassForm();

            if (classBox1.SelectedIndex > -1)
            {
                var subjectGrade = (SubjectGrade)classBox1.SelectedItem;
                editSubjectForm.LoadClassGrade(subjectGrade, yearComboBox.SelectedIndex);
                editSubjectForm.FormClosing += EditSubjectFormClosing;
                editSubjectForm.ShowDialog(this);
            }
        }