private void BtnEliminar_Click(object sender, EventArgs e) { if (dgvPresentaciones.SelectedRows.Count > 0) { if (MessageBox.Show("¿Está seguro de eliminar esta Presentación?", "Mensaje", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { string idCategoria = dgvPresentaciones.CurrentRow.Cells[0].Value.ToString(); if (presentacion.EliminarPresentacion(Convert.ToInt32(idCategoria))) { MostrarPresentacion(); } } } else { MessageBox.Show("Debe seleccionar una fila", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }