Esempio n. 1
0
        private void TeacherCourseForm_Load(object sender, EventArgs e)
        {
            clsTeacherCourse objTeacherCourse = new clsTeacherCourse();

            ComboBox[] cmb = new ComboBox[] { cmbTeacherID, cmbTeacherName, cmbCourseID, cmbCourseName };
            objTeacherCourse.Load(cmb);
            objTeacherCourse.ViewAll(dgvTeacherCourse);
        }
Esempio n. 2
0
        private void mnuDelete_Click(object sender, EventArgs e)
        {
            if (!clsValidation.ValidateComboBox(cmbTeacherID))
            {
                return;
            }
            if (!clsValidation.ValidateComboBox(cmbCourseID))
            {
                return;
            }
            clsTeacherCourse objTeacherCourse = new clsTeacherCourse(Convert.ToInt32(cmbTeacherID.Text), Convert.ToInt32(cmbCourseID.Text));

            objTeacherCourse.Delete();
            MessageBox.Show("Teacher-Course record successfully deleted!");
            objTeacherCourse.ViewAll(dgvTeacherCourse);
        }
Esempio n. 3
0
        private void mnuViewAll_Click(object sender, EventArgs e)
        {
            clsTeacherCourse objTeacherCourse = new clsTeacherCourse();

            objTeacherCourse.ViewAll(dgvTeacherCourse);
        }