private void VerCalificacionesForm_Load(object sender, EventArgs e)
        {
            DataBaseControl DBControl = new DataBaseControl(DataBaseControl.cPath, "ProjectDataBase.mdf");
            BindingSource   CalSource = new BindingSource();

            CalSource.DataSource                = DBControl.ObtenerTabla("Select * from Calificaciones");
            DGVCalificacion.DataSource          = CalSource;
            DGVCalificacion.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
            DGVCalificacion.ReadOnly            = true;
        }
Exemple #2
0
        private void VerAlumnosForm_Load_1(object sender, EventArgs e)
        {
            DataBaseControl DBControl   = new DataBaseControl(DataBaseControl.cPath, "ProjectDataBase.mdf");
            BindingSource   AlumnSource = new BindingSource();

            AlumnSource.DataSource        = DBControl.ObtenerTabla("Select * from Alumnos");
            DGVAlumno.DataSource          = AlumnSource;
            DGVAlumno.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
            DGVAlumno.ReadOnly            = true;
        }
        private void VerMateriasForm_Load(object sender, EventArgs e)
        {
            DataBaseControl DBControl = new DataBaseControl(DataBaseControl.cPath, "ProjectDataBase.mdf");
            BindingSource   MatSource = new BindingSource();

            MatSource.DataSource            = DBControl.ObtenerTabla("Select * from Materias");
            DGVMaterias.DataSource          = MatSource;
            DGVMaterias.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
            DGVMaterias.ReadOnly            = true;
        }
        private void TxtBuscar_TextChanged(object sender, EventArgs e)
        {
            DataBaseControl DBControl = new DataBaseControl(DataBaseControl.cPath, "ProjectDataBase.mdf");
            BindingSource   AlmSource = new BindingSource();

            string[] parameters = { "@word" };
            string[] value      = { TxtBuscar.Text };
            AlmSource.DataSource           = DBControl.ObtenerTabla("Select * from Alumnos where [Nombre] like '%'+@word+'%' or [ID] like '%'+@word+'%' ", parameters, value);
            DGVAlumnos.DataSource          = AlmSource;
            DGVAlumnos.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
            DGVAlumnos.ReadOnly            = true;
        }