Dim ks As WinForm.Label = e.Form.Controls("款号")
Dim yk As WinForm.Label = e.Form.Controls("样衣款号")
Dim lb As WinForm.Label = e.Form.Controls("类别")
Dim jh As WinForm.Label = e.Form.Controls("计划交期")
Dim bj As WinForm.TextBox = e.Form.Controls("报价金额")
Dim zz As WinForm.TextBox = e.Form.Controls("最终价格")
Dim gps() As String = {"面料","辅料","二次加工"} '定义分组名称
Dim te() As String = {"客户","客户担当","类别","品名","款号","样衣款号","报价数量","计划交期","原料费用","辅料费用","二次加工费用","工缴费用","其他费用","管理费用","核价金额","技术担当"}
Dim cls() As String = {"款号","样衣款号","项目名称","规格","成份或质地","克重","门幅","单位","单耗","单价","金额","供应商","分类"} '定义列名
Dim lxs() As Object = {"String","String","String","String","String","Short","String","String","Double","Double","Double","String","String"} '定义Type类型
Dim cds() As String = {"55","55","55","55","55","","16","16","","","","50","40"}
Dim wdh() As String = {140,140,140,135,90,45,45,45,58,65,67,88,85}
Dim dtb As New DataTableBuilder("临时核价表")
For i As Integer = 0 To cls.Length - 1
If lxs(i) = "String" Then
dtb.AddDef(cls(i),Gettype(String),cds(i))
ElseIf lxs(i) = "Double" Then
dtb.AddDef(cls(i),Gettype(Double),cds(i))
ElseIf lxs(i) = "Short" Then
dtb.AddDef(cls(i),Gettype(Short),cds(i))
End If
Next
dtb.Build()
For i As Integer = 0 To cls.Length - 1
Tables("临时核价表").Cols(cls(i)).Width = wdh(i)
Next
For i As Integer = 0 To gps.Length - 1
Dim dt As DataTable = DataTables(gps(i) &"核价")
msgbox(dt.name)
Dim drs = dt.Select("款号 = '" & ks.Text & "'and 样衣号 like '%" & yk.Text & "%'","_sortkey")
msgbox(drs.count)
For Each dr As DataRow In drs
Dim r As DataRow = DataTables("临时核价表").AddNew()
r("款号") = ks.Text
r("样衣款号") = yk.Text
r("项目名称") = dr(gps(i) & "名称")
r("分类") = dt.name
Next
Next
MainTable = Tables("临时核价表")
这个为什么没有被筛选出来呢?哪里错了?