Select Case e.DataCol.name
Case "第一列","第二列"
Dim s1 As String = e.DataRow("第一列")
Dim s2 As String = e.DataRow("第二列")
Dim a1 As String() = s1.Split(".")
Dim a2 As String() = s2.Split(".")
If a1.length = 2 AndAlso a2.length = 2 Then
Dim d1 As Date = new Date(a1(0), a1(1), 1)
Dim d2 As Date = new Date(a2(0), a2(1), 1)
Dim y,m,d As Integer
DateYMD(d2,d1,y,m,d)
e.DataRow("第三列") = y & "." & format(m, "00")
Else
e.DataRow("第三列") = Nothing
End If
Case "第四列"
Dim d1 As Double = 0.6
Dim d2 As Integer = val(e.NewValue)
Dim s As String = format(d1 * d2, "#.00")
Dim ary() As String = s.split(".")
s = ary(0) & "." & format(ary(1) / 10, "00")
e.DataRow("第五列") = s
Case "第三列","第五列"
Dim s1 As String = e.DataRow("第三列")
Dim s2 As String = e.DataRow("第五列")
Dim a1 As String() = s1.Split(".")
Dim a2 As String() = s2.Split(".")
If a1.length = 2 AndAlso a2.length = 2 Then
Dim d1 As Integer = val(a1(0)) + val(a2(0))
Dim d2 As Integer = val(a1(1)) + val(a2(1))
d1 += Math.Floor(d2 / 12)
d2 = d2 Mod 12
e.DataRow("第六列") = d1 & "." & Format(d2,"00")
Else
e.DataRow("第六列") = Nothing
End If
End Select