Dim Result As DialogResult
If Tables("员工表").Current.DataRow.RowState <> DataRowState.Unchanged Then '如果当前行已经修改过
result = MessageBox.Show("需要保存吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If Result = DialogResult.Yes Then
Tables("员工表").DataTable.Save()
Tables("员工表").DataTable.Load()
Else If Result = DialogResult.No Then
Tables("员工表").DataTable.RejectChanges()
Tables("员工表").DataTable.Load()
End If
End If