示例#1
0
        private void AddClassButton_Click(object sender, EventArgs e)
        {
            // Deploy an empty group edit form.
            EditGroupForm editGroupForm = new EditGroupForm();

            editGroupForm.ShowDialog();
            editGroupForm.Dispose();
            // Simulate a value change to refresh changed data.
            GroupsListBox_SelectedValueChanged(this, e);
        }
示例#2
0
        private void EditClassButton_Click(object sender, EventArgs e)
        {
            // Deploy an edit form with the needed data.
            EditGroupForm editGroupForm = new EditGroupForm(Groups.GroupList[groupsListBox.SelectedIndex], groupsListBox.SelectedIndex + 1);

            editGroupForm.ShowDialog();
            editGroupForm.Dispose();
            // Simulate a value change to refresh changed data.
            GroupsListBox_SelectedValueChanged(this, e);
        }
示例#3
0
 public EditStudentForm(string studentName = null)
 {
     InitializeComponent();
     if (studentName != null)
     {
         studentId = Students.GetStudentIdByName(studentName);
         studentNameTextBox.Text = studentName;
         studentIDTextBox.Text   = Students.GetUsername(studentName);
         EditGroupForm.PopulateYears(academicYearComboBox, Students.GetAcademicYear(studentName));
         GroupList = Students.GetGroups(studentName);
     }
     else
     {
         newStudent = true;
         editStudentTitleLabel.Text = "Add new student";
         EditGroupForm.PopulateYears(academicYearComboBox);
     }
 }