If e.DataCol.Name = "piao据号码" Then
If e.NewValue Is Nothing Then
e.DataRow("piao据原件") = Nothing
Else
Dim dr As DataRow
dr = DataTables("应收款").Find("[piao据号码] = '" & e.NewValue & "'")
If dr IsNot Nothing
e.DataRow("piao据原件") = dr("piao据原件")
Dim path As String
If DataTables("应收款").DataCols("piao据原件").DefaultFolder > "" Then
path = DataTables("应收款").DataCols("piao据原件").DefaultFolder.trim("\")
Else
path = ProjectPath & "Attachments"
End If
Dim path2 As String
If e.DataTable.DataCols("piao据原件").DefaultFolder > "" Then
path2 = e.DataTable.DataCols("piao据原件").DefaultFolder.trim("\")
Else
path2 = ProjectPath & "Attachments\"
End If
For Each s As String In e.DataRow.Lines("piao据原件")
If FileSys.FileExists(path & "\" & s) Then
FileSys.CopyFile(path & "\" & s, path2 & "\" & s, True)
End If
Next
End If
End If
End If
老师,删除标出的把代码添加进去,是吗。添不进啊。