Select Case e.DataCol.Name
Case "编号","考勤日期_1_考勤","考勤日期_1_小时"
If e.DataRow.IsNull("编号") = True Then
DataTables("平时出勤").DeleteFor("编号='" & e.DataRow("编号") & "'")
Else
Dim ndr1 As DataRow = DataTables("平时出勤").Find("编号='" & e.DataRow("编号") & "'")
If e.DataRow("考勤日期_1_考勤").Contains("/") = True AndAlso 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.IsNull("考勤日期_1_小时") = True Then
ndr("出勤时长_1") = "8"
Else
If e.DataRow.IsNull("考勤日期_1_小时") = False Then
ndr("出勤时长_1") = e.DataRow("考勤日期_1_小时")
End If
End If
ndr.Move(0)
End If
If ndr1 IsNot Nothing Then
If e.DataRow.IsNull("考勤日期_1_小时") = True Then
ndr1("出勤时长_1") = "8"
Else
If e.DataRow.IsNull("考勤日期_1_小时") = False Then
ndr1("出勤时长_1") = e.DataRow("考勤日期_1_小时")
End If
End If
End If
End If
End Select