validar si en la fecha ingresada en el txt hay datos en la base de datos
public List<Reporte> TraerReportePorFecha(string fecha) { List<Reporte> reportes = new List<Reporte>(); string consulta = "SELECT * FROM Reporte WHERE fecha = @fecha"; SqlCommand comando = new SqlCommand(consulta, conexion); comando.Parameters.AddWithValue("@fecha", fecha); conexion.Open(); SqlDataReader reader = comando.ExecuteReader(); while (reader.Read()) { Reporte reporte = new Reporte(); reporte.Id = reader.GetInt32(0); reporte.Fecha = reader.GetString(1); reporte.NombreEstudiante = reader.GetString(2); reporte.No_control = reader.GetString(3); reporte.NombreMaestro = reader.GetString(4); reporte.Materia = reader.GetString(5);