private void btEditarEditora_Click(object sender, EventArgs e) { bool result = false; DialogResult resp = MessageBox.Show("Deseja mesmo atualizar este registro?", "Confirmação", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2); if (resp == System.Windows.Forms.DialogResult.Yes) { configuracoesDTO confdto = new configuracoesDTO(); confdto.idEditoraConf = txtCodigoEditora.Text; confdto.nomeEditoraConf = txtNomeEditora.Text; configuracoesBLL confbll = new configuracoesBLL(); result = confbll.editar_editora(confdto); if (result == true) { MessageBox.Show("Alterações salvas!", "Resultado", MessageBoxButtons.OK); } this.Close(); } }