Case "计划交期","计划数量"
If e.DataRow.IsNull("计划交期") = False Then
Dim dr As DataRow = e.DataTable.Find("实际交期 > #" & e.DataRow("计划交期") & "#","实际交期")
If dr IsNot Nothing Then
Dim jhsl As Integer = e.DataTable.Compute("sum(计划数量)","计划交期 <=#" & e.DataRow("计划交期") & "#")
Dim sjsl As Integer = e.DataTable.Compute("sum(实际数量)","实际交期 <#" & dr("实际交期") & "#")
If jhsl > sjsl Then
Dim sp As TimeSpan = cdate(dr("实际交期")) - cdate(e.DataRow("计划交期"))
dr("延期天数") = sp.TotalDays
dr("延期数量") = jhsl - sjsl
End If
e.DataTable.DataCols("实际交期").RaiseDataColChanged("实际交期 >= #" & e.DataRow("计划交期") & "#")
End If
End If