Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.ComponentModel
' 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消对下行的注释。
' <System.Web.Script.Services.ScriptService()> _
<System.Web.Services.WebService(Namespace:="mywebservices2")> _
<System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<ToolboxItem(False)> _
Public Class myWebService2
Inherits System.Web.Services.WebService
<WebMethod()> _
Public Function GetState(ByVal ddh As String, ByVal ddhh As String, ByVal lhbbh As String, ByVal rjbb As String) As String
Dim cnStr As String = "Data Source=(local);Initial Catalog=songjiang;Integrated Security=False;User ID=sa;Password=bdcom103liujy;"
Dim cn As New SqlClient.SqlConnection(cnStr)
cn.Open()
Dim cm As New SqlClient.SqlCommand("s elect 数量 from [可用数量表] where 订单号 ='" & ddh & "' and 订单行号 = '" & ddhh & "' and 两化表编号 = '" & lhbbh & "' and 软件版本 = '" & rjbb & "'", cn)
Dim state As String = cm.ExecuteScalar
cn.Close()
Return state
End Function
End Class
此主题相关图片如下:error.png
![dvubb 图片点击可在新窗口打开查看](UploadFile/2016-11/201611171595688030.png)