private void bt_accept_Click(object sender, EventArgs e) { if (ServiceController.ChangeMachine(oldid, selected_id)) { this.DialogResult = DialogResult.OK; } }