If e.DataCol.Name = "凭证流水号" Then Dim s As String = e.DataRow("凭证流水号") If s.length >= 9 Then e.DataRow("凭证期间") = s.SubString(3,6) Else e.DataRow("凭证期间") = Nothing End If If s.length > 11 Then e.DataRow("凭证号") = s.SubString(11) Else e.DataRow("凭证号") = Nothing End If End If