private void btnExcluir_Click(object sender, EventArgs e) { if (MessageBox.Show("Deseja excluir o produto selecionado?", "Atenção", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { produtoBLL.DeletarProduto(produto.ID); AtualizarGrid(); } }
protected void btnDeletar_Click(object sender, EventArgs e) { objProduto.DeletarProduto(txtID.Text); LimparForm(); CarregarGridView(); }