错误提示:
.NET Framework 版本:4.0.30319.1
Foxtable 版本:2019.9.20.1
错误所在事件:窗口,采购需求计算,Button22,Click
详细错误信息:
Unable to cast object of type 'Foxtable.WinForm.Label' to type 'Foxtable.WinForm.ComboBox'.
按钮代码:
Dim mc As WinForm.ComboBox = Forms("采购需求计算").Controls("物料名称")
Dim bm As WinForm.ComboBox = Forms("采购需求计算").Controls("物料编码")
Dim ps As WinForm.ComboBox = Forms("采购需求计算").Controls("物料配色")
Dim filter As String = " _identify>0 "
If mc.Text > "" Then
filter= filter & " and 物料名称 = '" & mc.Text & "'"
End If
If bm.Text > "" Then
filter= filter & " And 物料编码 = '" & bm.Text & "'"
End If
If ps.Text > "" Then
filter= filter & " And 物料配色 = '" & ps.Text & "'"
End If
Dim cmd As New SQLCommand
Dim dt As DataTable
cmd.C
cmd.CommandText = "select * f rom 大货用量表 where 物供号='" & Tables("采购需求计算_table1").Current("物供号") & "'"
dt = cmd.ExecuteReader()
Tables("采购需求计算_table5").DataSource =dt