private void DeclineButton_Click(object sender, EventArgs e) { if (New) { NameTextbox.Text = ""; CodenameTextbox.Text = ""; } else if (CustomMessages.YesNoDelete(this)) { Deleted = controller.Delete(subject); if (!Deleted) { CustomMessages.DeleteFail(this, "subject"); } Close(); } }
private void DeclineButton_Click(object sender, EventArgs e) { if (New) { BuildingTextbox.Text = ""; FloorNumericUpdown.Value = 0; RoomTextbox.Text = ""; } else if (CustomMessages.YesNoDelete(this)) { Deleted = controller.Delete(hall); if (!Deleted) { CustomMessages.DeleteFail(this, "lecture hall"); } Close(); } }