private void CargarBusqueda() { try { var horaList = commB.GetList <Horario>().ToList(); var cursList = commB.GetList <Curso>().Where(c => c.Activo).ToList(); var aulaList = commB.GetList <Aula>().Where(a => a.Disponible).ToList(); if (horaList.Count() > 0) { LocalData.searchHorariosList = commB.GetHorariosSearchDtos(horaList); } else { btnBuscaHorario.Enabled = false; } if (cursList.Count() > 0) { LocalData.searchCursosList = commB.GetCursosSearchDtos(cursList); } else { btnBuscaCurso.Enabled = false; } if (aulaList.Count() > 0) { LocalData.searchAulasList = commB.GetAulasSearchDtos(aulaList); } else { btnBuscaAula.Enabled = false; } } catch (Exception ex) { General.LogInfo(ex, "Control", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); } }
private void CargarBusqueda() { try { var horarioListBind = commB.GetBindList <Horario>();//.ToList(); horarioBindingSource.DataSource = horarioListBind; horarioBindingNavigator.BindingSource = horarioBindingSource; if (horarioListBind.Count > 0) { CursosBusiness.BusinessHelpers.LocalData.searchHorariosList = commB.GetHorariosSearchDtos(horarioListBind.ToList()); } else { btnFind.Enabled = false; } } catch (Exception ex) { CursosBusiness.BusinessHelpers.General.LogInfo(ex, "Control", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); } }