private void StudentCourseForm_Load(object sender, EventArgs e) { clsStudentCourse objStudentCourse = new clsStudentCourse(); ComboBox[] cmb = new ComboBox[] { cmbStudentID, cmbStudentName, cmbCourseID, cmbCourseName }; objStudentCourse.Load(cmb); objStudentCourse.ViewAll(dgvStudentCourse); }
private void mnuDelete_Click(object sender, EventArgs e) { if (!clsValidation.ValidateComboBox(cmbStudentID)) { return; } if (!clsValidation.ValidateComboBox(cmbCourseID)) { return; } clsStudentCourse objStudentCourse = new clsStudentCourse(Convert.ToInt32(cmbStudentID.Text), Convert.ToInt32(cmbCourseID.Text)); objStudentCourse.Delete(); MessageBox.Show("Student-Course record successfully deleted!"); objStudentCourse.ViewAll(dgvStudentCourse); }
private void mnuViewAll_Click(object sender, EventArgs e) { clsStudentCourse objStudentCourse = new clsStudentCourse(); objStudentCourse.ViewAll(dgvStudentCourse); }