Dim drf As DataRow = e.DataRow
Select Case e.DataCol.Name
Case "完整路径"
If Tables("表A").Rows.Count >0 And drf.IsNull("完整路径") = False Then
Dim s1 As String = Tables("表A").current("完整路径")
If e.DataRow("完整路径") Like "*\\*" Then
Tables("表A").current("完整路径") = s1.replace("\\","\")
End If
If e.DataRow("完整路径") Like "*__*" Then
Tables("表A").current("完整路径") = s1.replace("__","_")
End If
If e.DataRow("完整路径") Like "*_00:00:00*" Then
Tables("表A").current("完整路径") = s1.replace("_00:00:00","")
End If
If e.DataRow("完整路径") Like "*:00*" Then
Tables("表A").current("完整路径") = s1.replace(":00","")
End If
If e.DataRow("完整路径") Like "*_00*" Then
Tables("表A").current("完整路径") = s1.replace(":","-")
End If
If s1.EndsWith("_")
Tables("表A").current("完整路径") = s1.replace("_"," ")
End If
End If
End Select
上面和下面2组代码,表空白时新增行,系统自动关闭,求助
Select Case e.DataCol.Name
Case "存储路径","项目名称","项目分类","项目具体名称","发文单位部门","干系人","发文日期","发文时间","上传者角色","上传者","上传日期","上传时间","动作措施","批注","上次查阅日期"
drf("完整路径") = drf("存储路径") & "\" & drf("项目名称") & "_" & drf("项目分类") & "_" & drf("项目具体名称") & "\" & drf("发文单位部门") & "_" & drf("干系人") & "_" & drf("发文日期") & "_" & cstr(drf("发文时间")).Replace(":","_") & "\" & drf("上传者角色") & "_" & drf("上传者") & "_" & drf("上传日期") & "_" & cstr(drf("上传时间")).Replace(":","_") & "\" & drf("动作措施") & "_" & drf("批注") & "_" & drf("上次查阅日期")
End Select
[此贴子已经被作者于2020/8/3 16:14:51编辑过]