private void btnRetrieve_Click(object sender, EventArgs e)
        {
            try
            {
                IDBManager dbManager = new MySQLDBManager();

                gridStudents.DataSource = dbManager.RetrieveStudents();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemplo n.º 2
0
 private void btnListStudents_Click(object sender, EventArgs e)
 {
     try
     {
         IDBManager dbManager = new MySQLDBManager();
         int        CourseId  = Convert.ToInt32(textBox7.Text);
         gridStudents.DataSource = dbManager.RetrieveStudents(CourseId);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }