Dim lst As new List(of String) For Each r As DataRow In DataTables("员工").DataRows If r.IsNull("照片") = False Then lst.add(r("照片").Tolower) End If Next For Each fl As String In filesys.GetFiles(ProjectPath & "\Attachments") fl = filesys.getname(fl).Tolower If fl.EndsWith(".jpg") Then If lst.Contains(fl)=False Then Dim dr As DataRow = DataTables("员工").AddNew dr("照片") = fl End If End If Next