web前端

位置:IT落伍者 >> web前端 >> 浏览文章

12.9远程Web服务—PocketPC应用程序[2]


发布日期:2024年06月15日
 
12.9远程Web服务—PocketPC应用程序[2]

)添加如下的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

[] [] [] []

               

上一篇:XPathExpression类对XML进行排序

下一篇:12.9远程Web服务—PocketPC应用程序[1]