예제 #1
0
        private void btnRetrieve_Click(object sender, EventArgs e)
        {
            try
            {
                IDBManager db = new MySQLDBManager();

                gridStudents.DataSource = db.RetrieveStudents();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
예제 #2
0
        private void btnDeleteStudent_Click(object sender, EventArgs e)
        {
            try
            {
                Student student = RetrieveStudentInformation();

                IDBManager db = new MySQLDBManager();
                db.DeleteStudent(student);
                gridStudents.DataSource = db.RetrieveStudents();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }