private void ViewDetails(object sender, EventArgs e) { var dataSource = faceController.GetStudentAttendenceList(faceController.GetStudentID(IDTextBox.Text), subjects.Text); var studentCount = faceController.TotalCount(faceController.GetStudentID(IDTextBox.Text), subjects.Text); Number.Text = studentCount.ToString(); eligibleText.Text = studentCount >= 20 ? "Student is eligible" : "Student is not eligible"; DataTable.DataSource = dataSource; faceController.GenerateReports(dataSource); }