If e.DataCol.Name = "产品效果图" Then
If e.NewValue <> Nothing Then
Dim file As String = ProjectPath & "Attachments/" & e.NewValue
Dim img As image = getImage(file)
Dim bmp As new bitmap(getImage(file), img.width / 30, img.height / 30)
file = "d:\天禧家产品缩略图\" & e.NewValue
Dim path As String = file.Replace(FileSys.GetName(file),"")
If FileSys.DirectoryExists(path) = False Then '如果目录C:\MyFolder存在
FileSys.CreateDirectory(path)
End If
bmp.save(file)
bmp.Dispose
End If
e.DataRow("缩略图") = e.NewValue
End If