想列出当前行科目详细明称,好像名称列哪样自动生成。
此主题相关图片如下:qq截图20201201112703.png
Dim dr1 As DataRow = e.DataRow
Dim str1 As String
Dim st As String
Select Case e.DataCol.Name
Case e.DataRow("科目编码").length >= 4
Dim strr As String = e.DataRow("科目编码").substring(0,4)
Dim fdr As DataRow = DataTables("科目表").find("科目编码='" & strr & "'")
st = fdr("科目名称")
' MessageBox.Show("4")
Case e.DataRow("科目编码").length >= 8
Dim strr As String = e.DataRow("科目编码").substring(0,8)
Dim fdr As DataRow = DataTables("科目表").find("科目编码='" & strr & "'")
'Dim fdr As DataRow = DataTables("科目表").find("& strr &='" & dr1("科目编码") & "'")
st = fdr("科目名称")
str1 &= "-"& st
Case e.DataRow("科目编码").length >= 12
Dim strr As String = e.DataRow("科目编码").substring(0,12)
Dim fdr As DataRow = DataTables("科目表").find("科目编码='" & strr & "'")
'Dim fdr As DataRow = DataTables("科目表").find("& strr &='" & dr1("科目编码") & "'")
st = fdr("科目名称")
str1 &= "-"& st
Case e.DataRow("科目编码").length >= 16
Dim strr As String = e.DataRow("科目编码").substring(0,16)
Dim fdr As DataRow = DataTables("科目表").find("科目编码='" & strr & "'")
'Dim fdr As DataRow = DataTables("科目表").find("& strr &='" & dr1("科目编码") & "'")
st = fdr("科目名称")
str1 &= "-"& st
Case e.DataRow("科目编码").length >= 18
Dim strr As String= e.DataRow("科目编码").substring(0,18)
Dim fdr As DataRow = DataTables("科目表").find("科目编码='" & strr & "'")
'Dim fdr As DataRow = DataTables("科目表").find("& strr &='" & dr1("科目编码") & "'")
st = fdr("科目名称")
str1 &= "-"& st
Case Else
e.DataRow("科目详细名称")= str1
End Select
老是提示字符串转换出问题