<OperationContract()> _
Public Sub updatedataSin(ByVal myid As String)
Dim db2 As New trigTrainer6.Web.DataClasses1DataContext
Dim temp As result
Dim mylist As New List(Of result)
'what this does is get data from the database in results which is a list undeclared 'variant
'with this list I populate each record into an existing class.
Dim myresults = (From p In db2.results _
Where p.id = myid _
Select p)
If myresults.Count > 0 Then 'only bother if the user name exists which it will
For Each p As result In myresults
p.sin = p.sin + 1
Next
db2.SubmitChanges()
End If
|