Пример #1
0
        private void carregarComboBox()
        {
            dt = ClsAlunos.listar();
            cbxAluno.DataSource    = dt; //carrega comboBox
            cbxAluno.DisplayMember = "nome";
            cbxAluno.ValueMember   = "id_aluno";
            cbxAluno.SelectAll();

            dd = ClsDisciplinas.listar();

            ds = clsSemestres.listar();
            cbxSemestre.DataSource    = ds; //carrega comboBox
            cbxSemestre.DisplayMember = "descricao";
            cbxSemestre.ValueMember   = "id";
        }//carrega todos os comboBox
Пример #2
0
        public static DataTable ds; //dataTable para guardar semestres

        public frmAlunos()
        {
            InitializeComponent();

            dd = ClsDisciplinas.listar();
            dgvDisciplinas.DataSource = dd;

            dt = ClsAlunos.listar();
            dgvAlunos.DataSource = dt;

            ds = clsSemestres.listar();
            dgvSemestres.DataSource = ds;

            comboBox1.DataSource    = dd;
            comboBox1.ValueMember   = "id_disciplina";
            comboBox1.DisplayMember = "";
        }
Пример #3
0
 private void carregarDataGrid()
 {
     dd = ClsDisciplinas.listar();
     dgvDisciplinas.DataSource = dd;
 }