コード例 #1
0
 private void frmEstudiantePorNivel_Load(object sender, EventArgs e)
 {
     try
     {
         btnAñadirEstudiante.Visible = false;
         btnCambiardeNivel.Visible   = false;
         dgvTabla.DataSource         = GruposDB.EstudiantePorGrupo(ID);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
コード例 #2
0
 private void btnSeleccionar_Click(object sender, EventArgs e)
 {
     try
     {
         if (dgvNiveles.SelectedRows.Count == -1)
         {
             MessageBox.Show("No se ha seleccionado un estudiante", "Asistencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         }
         else
         {
             Int32 ID;
             ID = Convert.ToInt32(dgvNiveles.CurrentRow.Cells[0].Value);
             dgvEstudiantes.DataSource = GruposDB.EstudiantePorGrupo(ID);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }