-- 作者:yankunhao
-- 发布时间:2014/3/31 14:20:00
--
Dim s As String s=e.Sender.Value \'s=Forms("产品规格表").Controls("ComboBox5").text
\'try Dim ids As String Dim drs As List(Of DataRow) drs = DataTables("料品资料查询表").Select("type_name = \'" & s &"\'") \' 发现如果用这样的代码就没上面的提示! \'drs = DataTables("料品资料查询表").SQLSelect("type_name = \'" & s & "\'") ’ 如果用这样的代码就有个别的的会出现上面的提示! For Each dr As DataRow In drs ids = ids & ",\'" & dr("part_no") & "\'" Next ids = ids.Trim(",") \'MessageBox.Show(ids,"提示",MessageBoxButtons.OK) If ids <> "" Then DataTables("obas_part_spec").LoadFilter = "part_no In (" & ids & ")" \'SystemReady = False DataTables("obas_part_spec").Load() \'SystemReady = True End If \'Catch ex As Exception \'MessageBox.Show("没找到相关数据!","提示",MessageBoxButtons.OK) \'End Try
Select Case s Case "铝门锁","鹅旦锁","有尾门锁" \'If Forms("产品规格表2").Opened = False Then SystemReady = False Forms("产品规格表2").Show SystemReady = True If Forms("产品规格表2").Opened Then \'SystemReady = False Forms("产品规格表").Close \' SystemReady = True End If \' End If \'Case Else \' Return Case Else \'try Dim t As WinForm.Table = e.Form.Controls("Table1")
If Tables("obas_part_spec").Current IsNot Nothing Then Dim s1 As String = Tables("obas_part_spec").Current("part_no") \'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 图号,obas_part1.bom_draw_no_wf as 备注,wf_zh 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("物料编码|70|名称|70|规格|150|数量|19|图号|99|珠号|25|备注|30") Else Dim s2 As String ="0" 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 图号,obas_part1.bom_draw_no_wf as 备注,wf_zh 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("物料编码|70|名称|70|规格|150|数量|19|图号|99|珠号|25|备注|30") 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 图号,obas_part1.bom_draw_no_wf as 备注,wf_zh 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("物料编码|70|名称|70|规格|150|数量|19|图号|99|珠号|25|备注|30") \'MessageBox.Show("没找到相关数据!","提示",MessageBoxButtons.OK) \'End Try If Forms("产品规格表").Opened=True Then Dim f As WinForm.Form = Forms("产品规格表") If Tables("obas_part_spec").Current IsNot Nothing Then Dim zt As String If Tables("obas_part_spec").Current("sheet_sta")="0" Then zt="未审核" ElseIf Tables("obas_part_spec").Current("sheet_sta")="1" Then zt="已审核" End If f.Text="产品规格表 (" & zt & ")" If Tables("obas_part_spec").Current IsNot Nothing Then Dim b As Boolean = Tables("obas_part_spec").Current("act_sw") Select Case b Case True e.Form.BackColor = Color.WhiteSmoke Case Else e.Form.BackColor = Color.LemonChiffon End Select End If Else f.Text="产品规格表" End If End If End Select
|