If e.DataCol.Name = "部门审核" Then
If e.DataRow.IsNull("进货人") Then
msgbox("进货人不能为空")
e.Cancel = True
Else If e.NewValue <> user.name Then
MessageBox.Show("请采购部长审核!")
e.Cancel = True
End If
End If
If e.DataCol.Name = "品管部" Then
If e.DataRow.IsNull("部门审核") Then
msgbox("采购部没审核")
e.Cancel = True
Else If e.NewValue <> user.name Then
MessageBox.Show("品管部检验人员才能进行质量审核!")
e.Cancel = True
End If
End If
If e.DataCol.Name = "结算审核" Then
If e.DataRow.Isnull("品管部") OrElse e.DataRow.IsNull("第三列") OrElse e.DataRow.IsNull("第四列") Then
MessageBox.Show("先由品管部进行质量检查合格后请刘总或徐总审核!")
e.Cancel = True
Else If e.NewValue <> user.name Then
MessageBox.Show("请刘总或徐总审核!")
e.Cancel = True
End If
End If
If e.DataCol.Name = "支付审核" Then
If e.DataRow.IsNull("结算审核") Then
msgbox("没有结算审核")
e.cancel = True
Else If e.DataRow.IsNull("第六列") Then
msgbox("第六列不能为空")
e.Cancel = True
Else If e.NewValue <> user.name Then
MessageBox.Show("请刘总审核!")
e.Cancel = True
End If
End If
If e.DataCol.Name = "财务审核" Then
If e.DataRow.IsNull("支付审核") Then
msgbox("没有支付审核")
e.Cancel = True
Else If e.NewValue=True AndAlso user.group<>"财务" Then
MessageBox.Show("请财务审核!")
e.Cancel = True
End If
End If