--
扫描窗口的提交入库的click代码。
Dim fd1,fd2 As Integer
fd1 = yrkdh.text.IndexOf(":")
fd2 = yrkdh.text.IndexOf("-")
Dim str As String
str = yrkdh.text.SubString(fd1 + 1,fd2 -1 -fd1)
msgbox(str)
If str1 = str2 Then
MessageBox.show("扫描统计的数量" & str1 & "和入库单预入库数量" & str2 & "一致","扫描入库结果",MessageBoxButtons.OK,MessageBoxIcon.Information)
Dim dr As DataRow =DataTables("预入库单").Find("入库单号 = \'" & str & "\'")
If dr IsNot Nothing Then
dr("标志") = True
End If
Else
MessageBox.show("扫描统计的数量" & str1 & "和入库单预入库数量不一致" & str2,"扫描入库结果",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
Dim shhs As WinForm.Button = Forms("库存管理界面").Controls("收货核实")
Dim sum1 As Integer
sum1 = DataTables("预入库单").Compute("count(入库单号)","标志 = false")
shhs.text = "收货核实(" & sum1 & ")"
Dim p As WinForm.TabPage = Forms("库存管理界面").Controls("TabControl1").tabpages(0)
\'Dim p As WinForm.TabPage = e.form.controls("TabControl1").tabpages(0)
Dim rkd As List(of String)
rkd = DataTables("预入库单").GetValues("入库单号","标志 = false")
Dim idx As Integer = 1
For Each rk As String In rkd
Dim sum2 As String = Tables("预入库单").Compute("sum(数量)","入库单号 = \'" & rk & "\'")
Dim btn As WinForm.button
btn = e.Form.CreateControl("btn" & rk, ControlTypeEnum.Button)
btn.Text = "预入库单号" & idx & ":" & rk & "- - -(" & sum2 & ")台"
btn.Left = 300
btn.Top = idx * 100
p.AddControl(btn)
idx += 1
btn.width = 400
btn.height = 60
btn.font = new font("方正粗圆简体", 15,fontstyle.bold)
btn.FlatStyle = FlatStyle.flat
btn.BackColor = Color.Aquamarine
btn.BorderSize = 0
Next