Beispiel #1
0
        private void btnExcluir_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Confirma a exclusão do contato selecionado?", "Excluir Contato", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                int CodigoContatoLinhaSelecionada = int.Parse(dgvContato.CurrentRow.Cells["ColumnID_CONTATO"].Value.ToString());

                ContatoBLL.ExcluirContatoBLL(CodigoContatoLinhaSelecionada);

                dgvContato.Rows.RemoveAt(dgvContato.CurrentRow.Index);
            }
        }