protected void BindGV()
        {
            List <PersonaMostrar> personasMostrar = new List <PersonaMostrar>();
            List <Personas>       personas        = new List <Personas>();

            personas = cp.dameTodosAlumnos();
            foreach (Personas per in personas)
            {
                PersonaMostrar    p     = new PersonaMostrar();
                ControladorPlanes cplan = new ControladorPlanes();

                p.NombrePersona   = per.Nombre;
                p.ApellidoPersona = per.Apellido;
                p.Direccion       = per.Direccion;
                p.Email           = per.Email;
                p.Legajo          = per.Legajo.ToString();
                p.Telefono        = per.Telefono;
                p.Fecha           = per.FechaNacimiento.ToString();
                p.Id   = per.Id;
                p.Plan = per.Plan.DescripcionPlan;
                personasMostrar.Add(p);
            }
            this.gridView.DataSource = personasMostrar;
            this.gridView.DataBind();
        }
Beispiel #2
0
        public void Listar()
        {
            ControladorPlanes ul = new ControladorPlanes();

            dgvPlanes.DataSource = ul.dameTodos();  //asignaremos el resultado a la propiedad DataSource de la grilla
        }