Dim frm As WinForm.Form
frm = Forms("新增任务")
If Tables("工作任务").Current Is Nothing Then
Dim Result As DialogResult
MessageBox.Show("没有添加添加任何内容,是否退出!","提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If Result = DialogResult.Yes Then
frm.close()
'e.Form.close
End If
Else
Return
End If
If Tables("工作任务").Current IsNot Nothing Then
For Each r1 As Row In Tables("工作任务").Rows
r1.Save
Next
If Tables("工作任务明细").Current IsNot Nothing Then
For Each r As Row In Tables("工作任务明细").Rows
r.Save
Next
End If
frm.close()
End If
红色这部分代码,不管是选择yes没有关闭,选择NO 也没有退出,不知道什么原因