public override void OnNewObjButtonClick(object sender, EventArgs e) { EditStudent edit = new EditStudent(); // Create a new student DialogResult dialog = edit.ShowDialog(this); if (dialog != DialogResult.OK) { return; } string username = edit.newUsername; string forename = edit.newForename; string surname = edit.newSurname; int alps = edit.newAlps; APIHandler.CreateStudent(forename, surname, username, alps); // TODO: Perhaps make these return a boolean, to denote whether the creation has been succesful or not MessageBox.Show(username + "'s account has been created successfully! Please tell them to use the 'first time sign-in' when they try to sign-in."); RefreshList(); }