Case "审核"
If e.NewValue IsNot Nothing Then
If e.DataRow.GetChildRows("采购合同明细").count>0 Then
For Each drr As DataRow In e.DataRow.getchildrows("采购合同明细")
drr("审核")=e.DataRow("审核")
drr.save
Next
End If
If e.NewValue=True Then
MessageBox.show("审核成功!")
e.DataRow("审核人")=_username
e.DataRow("审核日期")=Functions.Execute("stime","A5 ERP")
If MessageBox.Show("是否发送信息通知相关操作员?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question)=DialogResult.Yes Then
djlx="采购合同"
bhlx="采购合同号"
djbh=e.DataRow("采购合同号")
msg="编号为:【" & e.DataRow("采购合同号") & "】的【" & e.DataTable.Name & "】通过审核,请尽快处理!"
Forms("信息").show
End If
Else
If e.DataRow.RowState<>DataRowState.Detached Then
MessageBox.show("反审核成功!")
e.DataRow("审核人")=Nothing
e.DataRow("审核日期")=Nothing
End If
End If
e.DataRow.save
End If
这个代码目前有个问题 经常出现父行的审核=true了 子行却还是false 但大部分时候都是运作正常 非常郁闷