private void selectedStuRowDetails() { if (isSelected == true) { Subjects objSubjects = new Subjects(); objSubjects.SubjectName = txtSubjectName.Text; objSubjects.SubjectCode = txtSubjectCode.Text; objSubjects.SubjectID = selectedSubID; systemManager objSystemManager = new systemManager(); if (updateSelected == true) { objSystemManager.updateSubjects(objSubjects); updateSelected = false; } if (deleteSelected == true) { objSystemManager.deleteSubjects(objSubjects); deleteSelected = false; } } }