private void Filtrar() { if (FiltrarDropDownList.SelectedIndex == 0) { Lista = EstudiantesBLL.GetListAll(); } else if (FiltrarDropDownList.SelectedIndex != 0) { if (FiltrarDropDownList.SelectedIndex == 2) { Lista = EstudiantesBLL.GetList(p => p.Nombre == FiltrarTextBox.Text); } if (FiltrarDropDownList.SelectedIndex == 4) { DateTime FechaDesde = Convert.ToDateTime(FechaDesdeTextBox.Text); DateTime FechaHasta = Convert.ToDateTime(FechaHastaTextBox.Text); Lista = EstudiantesBLL.GetList(p => p.FechaIngreso >= FechaDesde.Date && p.FechaIngreso <= FechaHasta.Date); } if (FiltrarDropDownList.SelectedIndex == 1) { int id = Utilidades.TOINT(FiltrarTextBox.Text); Lista = EstudiantesBLL.GetList(p => p.EstudianteId == id); } } LlenarGriw(); }