示例#1
0
        private void deleteStudentButton_Click(object sender, EventArgs e)
        {
            DialogResult dialog = MessageBox.Show("Are you sure you want to delete " + student.forename + "'s account?", "Delete account confirmation", MessageBoxButtons.YesNo);

            if (dialog != DialogResult.Yes)
            {
                return;
            }
            // Delete account
            APIHandler.TeacherDeleteStudentAccount(student);
            MessageBox.Show(student.forename + "'s account has been deleted.");
            this.studentPanelNeedsRefresh = true;
            this.Close();
        }