()添加如下的Web方法
<WebMethod()> _
Public Sub UpdateGoals(ByVal FixtureID As Integer ByVal GoalFor As Boolean ByVal PlayerID As Integer ByVal GoalTime As Integer)
Dim conn As New SqlConnection(ConfigurationManagerConnectionStrings(WroxUnited)ConnectionString)
connOpen()
Dim cmd As New SqlCommand(usp_UpdateScore conn)
cmdCommandType = CommandTypeStoredProcedure
cmdParametersAdd(@FixtureID SqlDbTypeInt)Value = FixtureID
cmdParametersAdd(@GoalFor SqlDbTypeBit)Value = GoalFor
cmdExecuteNonQuery()
If GoalFor Then
Goal(FixtureID PlayerID GoalTime)
End If
End Sub
()接下来在前一个Web方法的下面添加另一个Web方法
<WebMethod()> _
Public Sub Goal(ByVal FixtureID As Integer ByVal PlayerID As Integer ByVal GoalTime As Integer)
Dim conn As New SqlConnection(ConfigurationManagerConnectionStrings(WroxUnited)ConnectionString)
connOpen()
Dim cmd As New SqlCommand(usp_Goal conn)
cmdCommandType = CommandTypeStoredProcedure
cmdParametersAdd(@FixtureID SqlDbTypeInt)Value = FixtureID
cmdParametersAdd(@PlayerID SqlDbTypeInt)Value = PlayerID
cmdParametersAdd(@GoalTime SqlDbTypeInt)Value = GoalTime
cmdExecuteNonQuery()
End Sub
[] [] [] []