If Tables("obas_part_spec").Visible=True Then
If CurrentTable.Name = "osal_ord2" Then
Dim s As String =CurrentTable.Current("part_no")
Dim t As WinForm.Table = Forms("销售订单管理").Controls("Table1")
If t.Table.Rows.Count > 0 Then
Dim ids As String
For Each r As Row In t.Table.Rows
ids = ids & ",'" & r("part_no") & "'"
Next
ids= ids.Trim(",")
'Try
DataTables("obas_part_spec").LoadFilter = "part_no In (" & ids & ")"
DataTables("obas_part_spec").Load()
'Catch ex As Exception
'MessageBox.Show("没有找到符合条件的行!")
'End Try
e.Form.Visible=False
Tables("临时表")(0)("第一列")="osal_ord1"
MainTable = Tables("obas_part_spec")
DataTables("obas_part_spec").DataCols("产品编码").RaiseDataColChanged()
DataTables("obas_part_spec").Save()
'Syscmd.Project.Save()
'Application.DoEvents()
With Tables("obas_part_spec")
.Sort="订单ID"
Dim r As Integer
r = .Find(s, 0, "part_no", False, False, True)
If r > - 1 Then '如果找到符合条件的行
.Position = r '则选择该行
Dim cpph As String = Tables("obas_part_spec").Current("part_no")
Dim dr As DataRow
dr = DataTables("料品资料查询表").Find("part_no = '" & cpph & "'")
If dr IsNot Nothing Then
'Select Case Tables("obas_part_spec").Current("产品类别")
Select Case dr("type_name")
Case "铝门锁","鹅旦锁","有尾门锁"
' SystemReady = False
Forms("产品规格表2").Show
' SystemReady = True
Case Else
' SystemReady = False
Forms("产品规格表").Show
' SystemReady = True
End Select
Else
Return
End If
Else
If Messagebox.Show("规格表中还没录入此项数据,是否反回销售订单窗口?","提示",MessageBoxButtons.YesNo, MessageBoxIcon.Information)=DialogResult.Yes Then
'e.Form.Close
MainTable = Tables("osal_ord1")
Else
Select Case Tables("obas_part_spec").Current("产品类别")
Case "铝门锁","鹅旦锁","有尾门锁"
'SystemReady = False
Forms("产品规格表2").Open
'SystemReady = True
Case Else
'SystemReady = False
Forms("产品规格表").Open
'SystemReady = True
End Select
'If Forms("产品规格表").Opened=False Then
'SystemReady = False
'Forms("产品规格表").Open
'SystemReady = True
'ElseIf Forms("产品规格表").Visible=False Then
'Forms("产品规格表").Visible=True
'End If
End If
End If
End With
Else
Messagebox.Show("订单明细表中没数据!,如有疑问,请与管理员联系","提示",MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
Else
MessageBox.Show("请你先在下表中选择要查询的产品,再进行点击查询!")
End If
Else
Messagebox.Show("你不能查看此表!,如有疑问,请与管理员联系","提示",MessageBoxButtons.OK, MessageBoxIcon.Information)
End If