private void UpdateTextBoxes() { if (comboBox1.SelectedItem == null || comboBox2.SelectedItem == null) { return; } Student student = (Student)comboBox1.SelectedItem; Assignment assignment = (Assignment)comboBox2.SelectedItem; List<CompletedAssignment> completedAssignment = dbManager.GetCompletedAssignments(assignment.AssignmentID, student.StudentID); textBox1.Text = completedAssignment.EarnedPoints.ToString(); textBox2.Text = assignment.TotalPoints.ToString(); } }}
private void UpdateTextBoxes() { if (comboBox1.SelectedItem == null || comboBox2.SelectedItem == null) { return; } Student student = (Student)comboBox1.SelectedItem; Assignment assignment = (Assignment)comboBox2.SelectedItem; string completedAssignment = dbManager.GetCompletedAssignments(assignment.AssignmentID, student.StudentID).ToString(); textBox1.Text = completedAssignment; textBox2.Text = assignment.TotalPoints.ToString(); }