-- 作者:有点甜
-- 发布时间:2018/4/6 15:36:00
--
如,休假天数,这样写
iif(日1=\'休\', 1, 0) + iif(日2=\'休\', 1, 0) + iif(日3=\'休\', 1, 0)
|
-- 作者:有点甜
-- 发布时间:2018/4/8 10:14:00
--
DrawCell事件,写代码
If e.Col.name.StartsWith("日") Then Dim y As String = e.Row("年份") Dim m As String = e.Row("月份") Dim d As Integer = e.Col.name.replace("日", "") If y <> Nothing AndAlso m <> Nothing Then If Date.DaysInMonth(y, m) >= d Then Dim dy As Date = new Date(y, m, d) If dy.DayOfWeek = 6 Then e.Table.DataTable.AddUserStyle("绿", color.green, color.black) e.style = "绿" ElseIf dy.DayOfWeek = 0 Then e.Table.DataTable.AddUserStyle("红", color.red, color.black) e.style = "红" End If End If End If End If
|