Dim zsl As Integer
Dim cmd1 As New SQLCommand
cmd1.C
cmd1.CommandText = "Select SUM(件数) As 总数量 f rom [SXCERP].[dbo].[派发工序表] where 订单号='19005801'"
zsl = cmd1.ExecuteScalar()
Dim wcsl As Integer
Dim cmd2 As New SQLCommand
cmd2.C
cmd2.CommandText = "Select SUM(件数) As 完成数量 f rom [SXCERP].[dbo].[派发工序表] where 订单号='19005801' and 单据状态='已完成'"
wcsl = cmd2.ExecuteScalar()
Dim wcl As Double = val(Forms("流水线生产进度").Controls("TextBox3").Text)
wcl=wcsl/zsl