Select Case e.DataCol.name
Case "起日期","止日期","月利率","本金金额"
If e.DataRow.IsNull("起日期") OrElse e.DataRow.IsNull("止日期") Then
e.DataRow("天数") = Nothing
Else
Dim dt1 As Date = e.DataRow("起日期")
Dim dt2 As Date = e.DataRow("止日期")
Dim d= (dt2- dt1).TotalDays()
e.DataRow("天数") = d
e.DataRow("月利率") =10
e.DataRow("利息")= e.DataRow("本金金额")* e.DataRow("月利率") * e.DataRow("天数") /30000
End If
End Select