Dim lstbox As WinForm.ListBox = e.Form.Controls("zjListBox1")
Dim fdr As Row = Tables("桩基资料").current
If fdr IsNot Nothing Then
If fdr.IsNull("桩位编号") Then
MessageBox.Show("请先输入桩位编号!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else
For Each flt As String In lstbox.Items
Dim ndr As Row = Tables("桩基资料.现场图像").AddNew
Dim i As Integer = Tables("桩基资料.现场图像").rows.count
Dim fl = fdr("桩位编号") & fdr("工程部位") & format(i, "000") & ".jpg"
ndr("图像名称") = fl
ndr.Save '必须先保存
ndr.DataRow.SQLInsertFile("图像资料",flt) '插入文件
ndr.DataRow.SQLSetValue("CRC", CRCCheckFile(flt)) '保存crc检验值
Next
End If
End If