Пример #1
0
        private void resetPasswordButton_Click(object sender, EventArgs e)
        {
            DialogResult dialog = MessageBox.Show("Are you sure you want to reset " + student.forename + "'s password?", "Reset password confirmation", MessageBoxButtons.YesNo);

            if (dialog != DialogResult.Yes)
            {
                return;
            }
            // Reset password here
            Dictionary <string, string> formData = new Dictionary <string, string> {
                { "password", "true" }
            };

            APIHandler.TeacherEditStudent(student, formData);
            MessageBox.Show(student.forename + "'s password has been reset. Please tell them to select the 'first time sign-in' when they next sign-in.");
        }