If DataTables("日报表").HasChanges Then Dim Result As DialogResult Result = MessageBox.Show("数据已经修改,是否保存?", "提示", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) If Result = DialogResult.Yes Then e.cancel = True If e.Form.Controls("项目简称").value Is Nothing Then MessageBox.Show("项目简称不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information) Else If e.Form.Controls("项目名称").value Is Nothing Then MessageBox.Show("项目名称也不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information) Else If e.Form.Controls("资金可用余额").value Is Nothing Then MessageBox.Show("亲,你们项目一分钱也没有吗!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information) Else e.cancel = False DataTables("日报表").Save() End If Else If Result = DialogResult.NO Then DataTables("日报表").RejectChanges Else If Result = DialogResult.cancel Then e.cancel = True End If End If
|