Select Case e.DataCol.name
Case "预算编号"
If e.DataRow.IsNull("预算编号") Then
DataTables("原材料采购明细表").DeleteFor("预算编号='" & e.DataRow("预算编号") & "'")
e.DataRow("当前进展_完成") = False
Else
MsgBox("count=" & e.DataRow.GetChildRows("原材料采购明细表").Count)
If e.DataRow.GetChildRows("原材料采购明细表").Count > 0
Dim cnt As Integer = DataTables("原材料采购明细表").Compute("count(预算编号)", "预算编号='" & e.NewValue & "' and (到全 = False )")
MsgBox("cnt=" & cnt)
e.DataRow("当前进展_完成") = (cnt=0)
End If
End If
End Select
Select Case e.DataCol.name
Case "预算编号"
If e.DataRow.IsNull("预算编号") Then
DataTables("机械外购件采购明细表").DeleteFor("预算编号='" & e.DataRow("预算编号") & "'")
e.DataRow("当前进展_完成") = False
Else
If e.DataRow.GetChildRows("机械外购件采购明细表").Count > 0
Dim cnt As Integer = DataTables("机械外购件采购明细表").Compute("count(预算编号)","预算编号='" & e.NewValue & "' and (到全 = False)")
e.DataRow("当前进展_完成") = (cnt=0)
End If
End If
End Select
Select Case e.DataCol.name
Case "预算编号"
If e.DataRow.IsNull("预算编号") Then
DataTables("电气外购件采购明细表").DeleteFor("预算编号='" & e.DataRow("预算编号") & "'")
e.DataRow("当前进展_完成") = False
Else
If e.DataRow.GetChildRows("电气外购件采购明细表").Count > 0
Dim cnt As Integer = DataTables("电气外购件采购明细表").Compute("count(预算编号)","预算编号='" & e.NewValue & "' and (到全 = False)")
e.DataRow("当前进展_完成") = (cnt=0)
End If
End If
End Select