Select Case e.DataCol.Name
Case "第1序_配膳日"
Dim dr13 As DataRow = e.DataRow
If dr13.IsNull("部组名") = False AndAlso dr13.IsNull("部品ID") = True
Dim d1 As Date = dr13("第1序_配膳日").AddDays(-1)
If d1.DayOfWeek = 0 Then
d1 = dr13("第1序_配膳日").AddDays(-2)
End If
dr13("子集结日") = d1
End If
Case "子集结日"
Dim dr13 As DataRow = e.DataRow
If dr13.IsNull("部组名") = False AndAlso dr13.IsNull("部品ID") = True AndAlso dr13.IsNull("子集结日") = False
e.DataTable.ReplaceFor("子集结日",e.DataRow("子集结日"),"部组名='" & dr13("部组名") & "' And 部品ID Is not null")
End If
End Select