need to code a linq statement that codes the grade display button so it allows the user to display either all records or only records matching a specific grade. Also it has to calculate a gpa where a=4 b=3 c=2 d=1 f=0 My main problem is with a linq statement how do i define grade into an integer?
This is what I have tried so far:
Private Sub btnDisplay_Click(sender As Object, e As EventArgs) Handles btnDisplay.Click
Dim GPA As Integer = Aggregate CreditHours In CoursesDataSet.tblCourses
Select CreditHours * Grade
Into sum()
MessageBox.Show("GPa:" & GPA.ToString("C2"),
"College Courses", MessageBoxButtons.OK,
MessageBoxIcon.Information)
End Sub
below is a pic of the project
Click Here