If e.DataCol.Name = "确认考勤" Then
Dim r As DataRow = e.DataRow
If r("确认考勤")=True Then
Dim Ls As String() = {"一","二","三","四","五","六","日"}
Dim chuqin,fadingchuqin As Decimal
Dim n,n1 As integer
For n = 0 to 4
for each s as string in Ls
chuqin+ = r("第" & Ls(n) & "周_" & s )
Next
Next
If r("班组") = "27保安" Then
chuqin=Math.Floor((chuqin/8+r("调休") + r("年休假"))*100+0.5)/100
Else
fadingchuqin= Tables("法定出勤").Compute("Sum(出勤天数)", "日期= #" & r("考勤日期") & "#")
chuqin=Math.Floor((fadingchuqin-chuqin/8+r("调休") + r("年休假"))*100+0.5)/100
End If
r("出勤1")=chuqin
chuqin = 0
For n = 0 To 4
For n1 = 5 To 6
chuqin+ = r("第" & Ls(n) & "周加班_" & Ls(n1) )
Next
Next
If chuqin/8+r("节日加班1")>4Then
r("双休轮休1") = Math.Floor(chuqin/8 - r("双休加班1")*100+0.5) / 100
End If
End If
If r("确认考勤")<>True Then
r("出勤1")=Nothing
End If
End If