private void btneliminar_Click(object sender, EventArgs e) { try { if (txtID.Text != "") { List <Comedor> li = new List <Comedor>(); li = BDbase.EncontrarComedor(txtID.Text); if (li.Count > 0) { BDbase.EliminarComedor(txtID.Text); MessageBox.Show("Comedor Eliminado..!!"); Limpiar(); } } else { MessageBox.Show("Digite Codigo Para Eliminar"); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }