private void cmuAdd_Click(object sender, EventArgs e) { if (this.Tag.Equals("Class")) { FrmAddClass frmAddClass = new FrmAddClass(dgvDetails); frmAddClass.ShowDialog(); } else if (this.Tag.Equals("Student")) { if (BusinessRuler.Classes.isInCapacity(_currentClassName)) { FrmAddStudent frmAddStudent = new FrmAddStudent(dgvDetails, _currentClassName); frmAddStudent.ShowDialog(); } } else if (this.Tag.Equals("Subject")) { FrmAddSubject frmAddSubject = new FrmAddSubject(this.dgvDetails); frmAddSubject.ShowDialog(); } else if (this.Tag.Equals("Course")) { FrmAddCourse frmAddCourse = new FrmAddCourse(dgvDetails, _currentClassName); frmAddCourse.ShowDialog(); } else if (this.Tag.Equals("Score")) { BusinessRuler.Classes objClass = new BusinessRuler.Classes(); if (objClass.IsStudentExists(_currentClassName) && objClass.IsCourseExist(_currentClassName)) { FrmAddScore frmAddScore = new FrmAddScore(dgvDetails, _currentClassName); frmAddScore.ShowDialog(); } } }
private void trbAdd_Click(object sender, EventArgs e) { FrmAddScore frmAddScore = new FrmAddScore(this.dgvDetails, _className); frmAddScore.ShowDialog(); }