コード例 #1
0
 private void CargarBusqueda()
 {
     try
     {
         var profList = commB.GetList <Profesore>().Where(p => p.Activo).ToList();
         var cursList = commB.GetList <Curso>().Where(c => c.Activo).ToList();
         if (profList.Count() > 0)
         {
             LocalData.searchProfesoresList =
                 commB.GetProfesoresSearchDtos(profList);
         }
         else
         {
             btnBuscaProfesor.Enabled = false;
         }
         if (cursList.Count() > 0)
         {
             LocalData.searchCursosHorariosList =
                 commB.GetCursosHorarioSearchDtos();
         }
         else
         {
             btnBuscaCurso.Enabled = false;
         }
     }
     catch (Exception ex)
     {
         General.LogInfo(ex, "Control", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
     }
 }
コード例 #2
0
        private void CargarBusqueda()
        {
            try
            {
                var profListBind = commB.GetBindList <Profesore>();//.ToList();

                profesoreBindingSource.DataSource       = profListBind;
                profesoreBindingNavigator.BindingSource = profesoreBindingSource;

                if (profListBind.Count > 0)
                {
                    CursosBusiness.BusinessHelpers.LocalData.searchProfesoresList =
                        commB.GetProfesoresSearchDtos(profListBind.ToList());
                }
                else
                {
                    btnFind.Enabled = false;
                }
            }
            catch (Exception ex)
            {
                CursosBusiness.BusinessHelpers.General.LogInfo(ex, "Control", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
            }
        }