我在设计的窗口中有个combox5控件它的ValueChanged事件代码如下,窗口中还有个ProgressBar1,我想在下面代码中加相关加载显示进度的代码,试了好几个方法都没效的,请问有没好的方法呢?
try
Dim s As String
s=e.Sender.Text
Dim ids As String
Dim drs As List(Of DataRow)
drs = DataTables("料品资料查询表").Select("type_name = '" & s &"'")
For Each dr As DataRow In drs
ids = ids & ",'" & dr("part_no") & "'"
Next
ids= ids.Trim(",")
DataTables("obas_part_spec").LoadFilter = "part_no In (" & ids & ")"
DataTables("obas_part_spec").Load()
Catch ex As Exception
MessageBox.Show("没找到相关数据!","提示",MessageBoxButtons.OK)
End Try
try
Dim s1 As String = Tables("obas_part_spec").Current("part_no")
Dim s2 As String ="0"
Dim t As WinForm.Table = e.Form.Controls("Table1")
If e.Form.Controls("TextBox1").Text <> "" Then
t.Table.Fill("SELECT parent_part as 内部编码,child_part,Left(unit_qty,4) As 数量,bom_sort As 排序,ov_part.item_no As 物料编码,ov_part.part_name As 名称,ov_part.part_spec As 规格,obas_part1.bom_draw_no As 图号 from obom_stru2 INNER JOIN ov_part on obom_stru2.child_part = ov_part.part_no INNER JOIN obas_part1 on obom_stru2.child_part = obas_part1.part_no where parent_part='" & s1 & "'ORDER BY 排序","erp",True)
t.Table.SetColVisibleWidth("物料编码|75|名称|75|规格|120|数量|18|图号|60")
Else
t.Table.Fill("SELECT parent_part as 内部编码,child_part,Left(unit_qty,4) As 数量,bom_sort As 排序,ov_part.item_no As 物料编码,ov_part.part_name As 名称,ov_part.part_spec As 规格,obas_part1.bom_draw_no As 图号 from obom_stru2 INNER JOIN ov_part on obom_stru2.child_part = ov_part.part_no INNER JOIN obas_part1 on obom_stru2.child_part = obas_part1.part_no where parent_part='" & s2 & "'ORDER BY 排序","erp",True)
t.Table.SetColVisibleWidth("物料编码|75|名称|75|规格|120|数量|18|图号|60")
End If
Catch ex As Exception
Dim s2 As String ="0"
Dim t As WinForm.Table = e.Form.Controls("Table1")
t.Table.Fill("SELECT parent_part as 内部编码,child_part,Left(unit_qty,4) As 数量,bom_sort As 排序,ov_part.item_no As 物料编码,ov_part.part_name As 名称,ov_part.part_spec As 规格,obas_part1.bom_draw_no As 图号 from obom_stru2 INNER JOIN ov_part on obom_stru2.child_part = ov_part.part_no INNER JOIN obas_part1 on obom_stru2.child_part = obas_part1.part_no where parent_part='" & s2 & "'ORDER BY 排序","erp",True)
t.Table.SetColVisibleWidth("物料编码|75|名称|75|规格|120|数量|18|图号|60")
MessageBox.Show("没找到相关数据!","提示",MessageBoxButtons.OK)
End Try
[此贴子已经被作者于2012-5-30 11:09:40编辑过]