怎么从当前表中获取记录状态为借出,且没有归还的所有借出状态数据行呢?
Dim kh As WinForm.TextBox = Forms("一键归还").Controls("TextBox1")
kh.Select()
Tables("一键归还_table1").Filter="记录状态='借出' And 卡号='" & kh.text & "'"
Dim Products As List(Of String)
Products = DataTables("设备信息").SQLGetValues("uuid","设备状态='借出'")
For Each Product As String In Products
Dim br As Table=Tables("使用记录")
Dim dr As DataRow = DataTables("使用记录").Find("设备uuid='" & Product & "' and 卡号='" & kh.text & "' And _Identify <> " & br.Current("_identify"), "_Identify desc")
If dr IsNot Nothing And dr("记录状态") = "借出" Then
br.AddNew
br.Current("卡号")= kh.text
br.Current("设备uuid")= Product
br.Current("记录时间")=Date.now
br.Current("记录状态")="归还"
br.Current("设备状态")="库存"
End If
Next
代码怎么修正为直接从当前表【使用记录】中获取卡号等于kh.text值 设备uuid=Product 且记录状态为“借出”,又没有归还数据行的数据,然后将整个记录状态为“借出”数据行全部显示出来,并且全部新增使用记录数据为 记录状态为归还。
[此贴子已经被作者于2021/12/13 17:47:32编辑过]