If e.DataRow.IsNull("开始日期") And e.DataRow.IsNull("结束日期") Then
e.DataRow("请假天数")=Nothing
Else
Dim d1 As Date = e.DataRow("开始日期")
Dim d2 As Date = e.DataRow("结束日期")
If d1>d2
e.DataRow("请假天数") = 0
Else
Dim cnt As Integer = (d2-d1).TotalDays
For i As Integer = 1 To cnt
Dim d3 As Date = d1.adddays(i)
If d3.DayOfWeek = 0 OrElse d3.DayOfWeek = 6 Then '
cnt = cnt - 1
End If
End If
Next
e.DataRow("请假天数") = cnt
End If
End If
法定节假日,节假日调休 不知怎样写进去