Public Function GetState1(ByVal ddh As String, ByVal ddhh As String, ByVal wlbm 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 adapter As New SqlClient.SqlDataAdapter("select * from [可用数量表] where 订单号 = '" & ddh & "' and 订单行号 = '" & ddhh & "' and 物料编码 = '" & wlbm & "' and 两化表编号 = '" & lhbbh & "' and 软件版本 = '" & rjbb & "'", cn)
Dim dt As New DataTable
adapter.Fill(dt)
cn.Close()
Dim state As String = ""
For Each dr As DataRow In dt.Rows
state += "工单号:" + dr("工单号") + ",工单行号:" + dr("工单行号") + ",物料编码:" + dr("物料编码") + ",数量:" + dr("数量")
Next
Return state
End Function