If e.DataCol.name = "领用人员" Then
Dim dr As DataRow = datatables("表A").find("设备编号=\'" & e.datarow("设备编号") & "\'")
if dr isnot nothing then
Dim pr As DataRow = e.datatable.find("设备编号=\'" & e.datarow("设备编号") & "\'","_sortkey desc")
If pr IsNot Nothing Then
dr("现使用人") = pr("领用人员")
End If
End If
End If