示例#1
0
        private void CargarBusqueda()
        {
            try
            {
                var cursListBind = commB.GetBindList <Curso>();//.ToList();

                cursoBindingSource.DataSource       = cursListBind;
                cursoBindingNavigator.BindingSource = cursoBindingSource;

                if (cursListBind.Count > 0)
                {
                    CursosBusiness.BusinessHelpers.LocalData.searchCursosList =
                        commB.GetCursosSearchDtos(cursListBind.ToList());
                }
                else
                {
                    btnFind.Enabled = false;
                }

                var aulasListBind = commB.GetBindList <Aula>();               //.ToList();

                aulaBindingSource.DataSource = aulasListBind;
            }
            catch (Exception ex)
            {
                CursosBusiness.BusinessHelpers.General.LogInfo(ex, "Control", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
            }
        }
示例#2
0
 private void CargarBusqueda()
 {
     try
     {
         var cursList = commB.GetList <Curso>().Where(c => c.Activo).ToList();
         var estuList = commB.GetList <Estudiante>().Where(c => c.Activo).ToList();
         if (cursList.Count() > 0)
         {
             LocalData.searchCursosList =
                 commB.GetCursosSearchDtos(cursList);
         }
         else
         {
             btnBuscarCurso.Enabled = false;
         }
         if (estuList.Count() > 0)
         {
             LocalData.searchEstudiantesList =
                 commB.GetEstudiantesSearchDtos(estuList);
         }
         else
         {
             btnBuscarCurso.Enabled = false;
         }
     }
     catch (Exception ex)
     {
         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);
            }
        }