Beispiel #1
0
        public void CompletarCombobox()
        {
            UsuarioLogic   ul            = new UsuarioLogic();
            List <Persona> docentes      = ul.GetDocentes();
            List <string>  datosDocentes = new List <string>();

            foreach (Persona per in docentes)
            {
                string datos;
                datos = per.Legajo + " - " + per.Nombre + " " + per.Apellido + " - " + per.ID;
                datosDocentes.Add(datos);
            }

            this.ddlDocente.DataSource = datosDocentes;
            ddlDocente.DataBind();
        }
Beispiel #2
0
        public void CompletarCombobox()
        {
            try
            {
                UsuarioLogic   ul            = new UsuarioLogic();
                List <Persona> docentes      = ul.GetDocentes();
                List <string>  datosDocentes = new List <string>();

                foreach (Persona per in docentes)
                {
                    string datos;
                    datos = per.Legajo + " - " + per.Nombre + " " + per.Apellido + " - " + per.ID;
                    datosDocentes.Add(datos);
                }

                this.cmbDocente.DataSource = datosDocentes;
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                this.Close();
            }
        }