Пример #1
0
        private void CargarBusqueda()
        {
            try
            {
                var estudListBind = commB.GetBindList <Estudiante>();//.ToList();

                estudianteBindingSource.DataSource       = estudListBind;
                estudianteBindingNavigator.BindingSource = estudianteBindingSource;

                if (estudListBind.Count > 0)
                {
                    CursosBusiness.BusinessHelpers.LocalData.searchEstudiantesList =
                        commB.GetEstudiantesSearchDtos(estudListBind.ToList());
                }
                else
                {
                    btnFind.Enabled = false;
                }
                var currTipo = commB.SetEntity <TipoId>(tipoIdBindingSource.Current);
                if (currTipo != null)
                {
                    identificacionMaskedTextBox.Mask = currTipo.Mask;
                }
            }
            catch (Exception ex)
            {
                CursosBusiness.BusinessHelpers.General.LogInfo(ex, "Control", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
            }
        }
Пример #2
0
 private void CargarBusqueda()
 {
     try
     {
         var estList  = commB.GetList <Estudiante>().Where(p => p.Activo).ToList();
         var cursList = commB.GetList <Curso>().Where(c => c.Activo).ToList();
         if (estList.Count() > 0)
         {
             LocalData.searchEstudiantesList =
                 commB.GetEstudiantesSearchDtos(estList);
         }
         else
         {
             btnBuscarEstudiante.Enabled = false;
         }
         if (cursList.Count() > 0)
         {
             LocalData.searchCursosHorariosList =
                 commB.GetCursosHorarioSearchDtos();
         }
         else
         {
             btnBuscarCurso.Enabled = false;
         }
     }
     catch (Exception ex)
     {
         General.LogInfo(ex, "Control", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
     }
 }