//Saving the class name private async void saveNameButton_Click(object sender, EventArgs e) { string name = nameTextBox.Text; if (name.Length < 3) //Verification on class name, ensures teacher enters an appropiate name. { MessageBox.Show("Name is too short.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { await ApiWrapper.UpdateClass(classObj.Id, name); //If criteria is met, update will also apply to the backend too } }
private async void bunifuThinButton1_Click(object sender, EventArgs e) { string name = nameTextBox.Text; if (name.Length < 3) //Verification on class name, ensures teacher enters an appropiate name. { MessageBox.Show("Name is too short.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { await ApiWrapper.UpdateClass(classObj.Id, name); } }