Dim tbx As WinForm.TextBox=e.Form.controls("jijutiaoma")
Dim str As String=tbx.text
Dim dr As DataRow=DataTables("机具库存资料").find("机具条码 = '" & str & "'")
Dim t As Table = Tables("机具库存资料")
If dr IsNot Nothing Then
Dim idx As Integer=Tables("机具库存资料").findrow(dr)
If idx>=0 And t.Rows(idx)("机具是否绑定") = True Then
MessageBox.Show("机具已绑定客户!", "提示")
e.Form.Controls("bangdingkehu").Enabled=False
Tables("机具库存资料").position = idx
Else
MessageBox.Show("机具未绑定客户!", "提示")
e.Form.Controls("bangdingkehu").Enabled=True
Tables("机具库存资料").position = idx
End If
Else
MessageBox.Show("未查到符合条件的数据!", "提示")
e.Form.Controls("bangdingkehu").Enabled=False
End If