If e.DataCol.Name = "支出账户" Then
If e.NewValue IsNot Nothing Then
Dim Result As DialogResult
Result = MessageBox.Show("确定支出吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If Result = DialogResult.No Then
e.DataRow("支出账户") = Nothing
End If
If Result = DialogResult.Yes Then
e.DataRow("录入日期") = Date.Today()
e.DataRow.Locked = True
End If
End If
End If
如上代码,输入支出账户时都会有提示(感觉很烦),那我这张表还有一个“支出项目”例,我的想法是如果”支出项目“包含“杂费”那么提示,不包含则不提示。
高手帮忙,