……
Dim dr1 As DataRow = DataTables("充值凭证表").Find("充值凭证ID= '" & shID & "'" )
Dim str As String = dr1("充值凭证原始名称")
dim lst as list(of string)
if dr1.isnull("充值凭证") then
lst = new list(of string)
else
lst =dr1.Lines("充值凭证")
end if
For Each file As String In FileSys.GetFiles(ProjectPath & "照片\充值凭证截图\" & wjjmc & "\" )
Dim name As String = FileSys.GetName(file)
If name.Contains(str) andalso lst.contains(name) = False Then
lst.add(name)
End If
Next
dr1.lines("充值凭证") = lst
DataTables("充值凭证表").Save
……