Exemplo n.º 1
0
 private void populateGridView(DataGridView dgw, string dataType)
 {
     try
     {
         if (dataType.Equals("note") && eleviDataSet != null)
         {
             noteDataSet = service.getGradesByUser(eleviDataSet.Tables[0].Rows[elevi_box.SelectedIndex]["username"].ToString());
             if (noteDataSet != null)
             {
                 dgw.DataSource = noteDataSet.Tables[0];
             }
         }
         if (dataType.Equals("absente") && eleviDataSet != null)
         {
             absenteDataSet = service.getAbsente(eleviDataSet.Tables[0].Rows[elevi_box.SelectedIndex]["username"].ToString());
             if (absenteDataSet != null)
             {
                 dgw.DataSource = absenteDataSet.Tables[0];
             }
         }
     }
     catch (Exception ex)
     {
         string err = ex.GetType().ToString();
     }
 }
Exemplo n.º 2
0
 private void populateGridView(DataGridView dgw)
 {
     try
     {
         noteDataSet    = service.getGradesByUser(eleviDataSet.Tables[0].Rows[elevi_box.SelectedIndex]["username"].ToString());
         dgw.DataSource = noteDataSet.Tables[0];
     }
     catch (IndexOutOfRangeException ex)
     {
         string err = ex.GetType().ToString();
     }
 }
Exemplo n.º 3
0
 //Note
 private void populateDataGridWithNote()
 {
     noteDataSet = service.getGradesByUser(username);
     dataGridView1.DataSource = noteDataSet.Tables[0];
 }