private void CargarBusqueda() { try { // aula var aulaListBind = commB.GetBindList <Aula>();//.ToList(); aulaBindingSource.DataSource = aulaListBind; aulaBindingNavigator.BindingSource = aulaBindingSource; if (aulaListBind.Count > 0) { LocalData.searchAulasList = commB.GetAulasSearchDtos(aulaListBind.ToList()); } else { btnFind.Enabled = false; } } catch (Exception ex) { CursosBusiness.BusinessHelpers.General.LogInfo(ex, "Control", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); } }
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); } }