private void btnConfrmar_Click(object sender, EventArgs e) { if (txtCodigo.Text != "") { bloquear = "1"; int regAfetados; a = Convert.ToInt32(txtCodigo.Text); p.codpost = a; p.bloqpost = bloquear; regAfetados = pc.BloquearPost(p); if (regAfetados > 0) { MessageBox.Show("Post Bloqueado com Sucesso", "", MessageBoxButtons.OK, MessageBoxIcon.Information); txtBusca.Text = ""; txtCodigo.Text = ""; } } else { MessageBox.Show("Digite o Código do Post"); } }