培训类别如果没有内容呢,如果有内容但是长度不够呢,这些都是编码必须考虑的。
If e.DataCol.Name ="培训类别" Then Dim dr As DataRow=e.DataRow If dr.Isnull("培训类别") Then dr("培训类别1") = Nothing ElseIf dr("培训类别").Length >=3 Then dr("培训类别1")= dr("培训类别").Substring(1,2) & "@" & dr("培训类别").Substring(3) End IfEnd If