谢谢!
还有下面的代码需要合并的,有的地方不知道怎么改,请老师再帮忙看看
Select Case e.DataCol.Name
Case "编号","考勤日期_2_休息日","考勤日期_2_小时","考勤日期_2_考勤"
If e.DataRow.IsNull("编号") = True Then
DataTables("双休加班").DeleteFor("编号='" & e.DataRow("编号") & "'")
Else
Dim ndr1 As DataRow = DataTables("双休加班").Find("编号='" & e.DataRow("编号") & "'")
If ndr1 Is Nothing Then
Dim ndr As Row = Tables("双休加班").AddNew
ndr("编号") = e.DataRow("编号")
ndr("考勤年份") = e.DataRow("考勤年份")
ndr("考勤月份") = e.DataRow("考勤月份")
ndr("班组") = e.DataRow("班组")
ndr("用工性质") = e.DataRow("用工性质")
ndr("姓名") = e.DataRow("姓名")
If e.DataRow("考勤日期_2_考勤").Contains("⊕") = False OrElse e.DataRow("考勤日期_2_休息日") <> "周末" Then
ndr("考勤日期_2_小时") = Nothing
Else
If e.DataRow("考勤日期_2_考勤").Contains("⊕") = True AndAlso e.DataRow("考勤日期_2_休息日") = "周末" AndAlso e.DataRow.IsNull("考勤日期_2_小时") = True Then
ndr("考勤日期_2_小时") = "8"
End If
If e.DataRow("考勤日期_2_考勤").Contains("⊕") = True AndAlso e.DataRow("考勤日期_2_休息日") = "周末" AndAlso e.DataRow.IsNull("考勤日期_2_小时") = False Then
ndr("考勤日期_2_小时") = e.DataRow("考勤日期_2_小时")
End If
End If
ndr.Move(0)
End If