有一列为“扫描件”,想将扫描件列的数据存储到指定的文件夹内,但总弄不成,例如:
BeforeAddFile事件
If e.DataCol.Name = "扫描件" Then
vars("path") = e.DataRow.Lines("扫描件")
End If
BeforeAttachFile事件
Dim dr As DataRow = e.DataRow
If dr.IsNull("年度") Or Dr.IsNull("工伤认定文号") Or dr.IsNull("受伤害职工姓名") Then
MessageBox.Show("不能为空!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
e.Cancel = True
Else
If e.DataCol.Name = "扫描件" Then
Dim ls = vars("path")
e.SubFolder = e.DataCol.name & "\" & dr("年度") & "\" & dr("工伤认定文号") & "_" & dr("受伤害职工姓名")
e.FileName = dr("受伤害职工姓名") & "_" & (ls.Count +1) & ".jpg"
ls.add(e.FileName)
End If
End If
上述代码中,想将文件存储到:reports\工伤认定卷宗扫描件\
将 这段代码改为:e.SubFolder = ProjectPath & "reports\工伤认定卷宗扫描件\" & e.DataCol.name & "\" & dr("年度") & "\" & dr("工伤认定文号") & "_" & dr("受伤害职工姓名")
可是不行,请问怎么改代码,谢谢