コード例 #1
0
 private void btnExcluir_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Confirma a exclusão?", "Confirmação",
                         MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         //efetua a exclusão no banco
         negocio.Gru_codigo = Convert.ToInt32(mtbCodigo.Text);
         negocio.excluir(out erroRetorno);
         if (erroRetorno != "")
         {
             funcoes.msgErro(erroRetorno);
         }
         //..........................
         btnCancelar_Click(sender, e);
     }
 }