private void Buscarbutton_Click(object sender, EventArgs e) { int ID = Convert.ToInt32(AsistenciaIDnumericUpDown.Value); Asistencia asistencia; RepositorioAsistencia repositorio = new RepositorioAsistencia(); asistencia = repositorio.Buscar(ID); if (asistencia != null) { LimpiarCampos(); LlenaCampos(asistencia); } else { MessageBox.Show("Asistencia no encontrada."); } }