如何在关闭记录之前确保用户已保存记录 [英] How do I make sure that the user has saved the record before closing it

查看:58
本文介绍了如何在关闭记录之前确保用户已保存记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计我有一个带有保存和关闭形式按钮的表单。如何在关闭记录之前确保用户已保存记录。我正在寻找的是我想修改''关闭表单''按钮,这样如果用户选择''关闭表单''按钮而不保存记录,它会弹出一个框,说明这样的事情;你没有保存你的记录,你想现在保存;是或否


感谢您考虑我的请求。

Hulas

解决方案


伙计我有一个带有''save''和''close form''按钮的表单。如何在关闭记录之前确保用户已保存记录。我正在寻找的是我想修改''关闭表单''按钮,这样如果用户选择''关闭表单''按钮而不保存记录,它会弹出一个框,说明这样的事情;你没有保存你的记录,你想现在保存;是或否


感谢您考虑我的要求。

Hulas



逻辑将类似于这个:

展开 | 选择 | Wrap | 行号


嗯,我在这种情况下使用另一种方法。

收到消息保存是让我烦恼的用户,我只是给他们两个按钮:

[确定](用于保存)和[取消](用于中止更新)。

最后在更新表格中,我有时会添加[重置]按钮,从而使用户可以返回原始内容。对于此按钮,可以使用此代码:

展开 | 选择 | Wrap | 行号


如果他们只是移动到另一条记录或关闭表单, 尼克; O)吗?记录可能仍会保存,具体取决于是否有必填字段,无论用户的意图是什么。


Linq ; 0 )>

Guys I have a form with a ''save'' and ''close form'' button. How do I make sure that the user has saved the record before closing it. What I am looking for is that I want to modify the ''close form'' button such that if a user selects the ''close form'' button without saving the record, it will pop up a box that will say something like this" You haven''t saved your record, do you want to save now;Yes or No"

Thanks you for considering my request.
Hulas

解决方案

Guys I have a form with a ''save'' and ''close form'' button. How do I make sure that the user has saved the record before closing it. What I am looking for is that I want to modify the ''close form'' button such that if a user selects the ''close form'' button without saving the record, it will pop up a box that will say something like this" You haven''t saved your record, do you want to save now;Yes or No"

Thanks you for considering my request.
Hulas

The logic would be something like this:

Expand|Select|Wrap|Line Numbers


Hmm, I use in this case another approach.
Getting a message to save is for me annoying for the users, I just offer them two buttons:
[OK] (for saving) and [Cancel] (for aborting the update).
Finally on an update form I sometimes add a [Reset] button, thus enabling the user to return to the original content. For this button this code can be used:

Expand|Select|Wrap|Line Numbers


And what if they simply move to another record or close the form, Nic;o)? The record may still be saved, depending on whether there are required fields that are/aren''t filled, regardless of the user''s intentions.

Linq ;0)>


这篇关于如何在关闭记录之前确保用户已保存记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆