<WebMethod()>
Public Function Detailedquery(ByVal scddhm As String, ByVal gdhh As String, ByVal wlbm As String, ByVal kwlb As String, ByVal startdate As String, ByVal enddate As String) As String
Dim cnStr As String = "Data Source=172.16.11.201;Initial Catalog=songjiang;Integrated Security=False;User ID=sa;Password=bdcom103liujy;"
Dim cn As New SqlClient.SqlConnection(cnStr)
cn.Open()
Dim state As String = ""
If scddhm = "" And gdhh = "" And wlbm = "" And kwlb = "" And startdate = "" And enddate = "" Then
Dim adapter As New SqlClient.SqlDataAdapter("se lect * from [可用数量表]", cn)
Dim dt As New DataTable
adapter.Fill(dt)
cn.Close()
For Each dr As DataRow In dt.Rows
state &= "%" & "生产订单号码:" & dr("生产订单号码") & "工单行号:" & dr("工单行号") & "物料编码:" & dr("物料编码") & "库位类别:" & dr("库位类别") & "入库时间:" & dr("入库时间") & "%" & Chr(10) & Chr(13)
Next
End If
Return state
End Function
Chr(10) & Chr(13)改为VBcrlf也没用。