Пример #1
0
        private void LoadGrid()
        {
            PersonaLogic docente = new PersonaLogic();
            CursoLogic   curso   = new CursoLogic();

            this.gridView.DataSource = this.Logic.GetAll();
            this.gridView.DataBind();

            if (this.DocenteDropDown.Items.Count == 1)
            {
                this.DocenteDropDown.DataSource     = docente.GetAllPersonasByType(Persona.TipoPersonas.Docente);
                this.DocenteDropDown.DataTextField  = "Legajo";
                this.DocenteDropDown.DataValueField = "ID";
                this.DocenteDropDown.DataBind();
            }
            if (this.CursoDropDown.Items.Count == 1)
            {
                this.CursoDropDown.DataSource     = curso.GetAll();
                this.CursoDropDown.DataTextField  = "CursoDescripcion";
                this.CursoDropDown.DataValueField = "ID";
                this.CursoDropDown.DataBind();
            }

            if (this.TipoDropDown.Items.Count == 1)
            {
                this.TipoDropDown.DataSource = Enum.GetNames(typeof(DocenteCurso.TiposCargos));
                this.TipoDropDown.DataBind();
            }
        }
Пример #2
0
 private void Listar()
 {
     try
     {
         PersonaLogic personaLogic = new PersonaLogic();
         this.dgvDocentes.DataSource = personaLogic.GetAllPersonasByType(Persona.TipoPersonas.Docente);
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error al recuperar los datos de los docentes", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         throw ex;
     }
 }
Пример #3
0
        public DocenteCursoDesktop()
        {
            InitializeComponent();
            CursoLogic curso = new CursoLogic();

            listaCursos = curso.GetAll();
            this.cboCurso.DataSource    = listaCursos;
            this.cboCurso.ValueMember   = "CursoDescripcion";
            this.cboCurso.DisplayMember = "CursoDescripcion";
            PersonaLogic docente = new PersonaLogic();

            listaDocentes = docente.GetAllPersonasByType(Persona.TipoPersonas.Docente);
            this.cboDocente.DataSource    = listaDocentes;
            this.cboDocente.ValueMember   = "Legajo";
            this.cboDocente.DisplayMember = "Legajo";

            this.cboCargos.DataSource = Enum.GetNames(typeof(DocenteCurso.TiposCargos));
            //this.cboCargos.ValueMember = "Cargo";
            //this.cboCargos.DisplayMember = "Cargo";
        }