LoginView 用于自定义逻辑
我对 LoginView 控件有些熟悉,并了解如何使用它来创建一页的只读版本和编辑版本。然后,该页面会显示不同的内容,具体取决于您是处于“读者”角色还是被授予“编辑”角色成员资格。 效果很好!
现在,如果例如 editor1 打开表单并开始更新特定数据对象...我认为如果尝试通过页面访问同一对象的所有其他编辑器角色成员都以只读模式显示,那么会很好editor1 仍然打开着。 其他编辑者打开的任何其他对象都应该以编辑模式为他打开。
因此,我正在考虑根据您尝试显示的对象来调整角色成员资格。
怎么会有人做这样的事呢?
谢谢! 拉尔夫
I am somewhat familar with the LoginView control and understand how to use it to create say a read-only version and edit version of one page. The page then displays different depending if you are in a "readers" role or you were granted "editors" role membership.
Works nice!
Now what if for example editor1 opened the form and began updating a particular data object... I think it would be nice if all other editor role members that tried to access the same object through the page would be shown in the read only mode while editor1 still has it open.
Any other object another editor opens should open in edit mode for him.
So I am thinking of messing around with the role memberships depending what object you try to display.
How would someone do something like that?
Thanks!
Ralf
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一次只有一个用户编辑一条记录,这并不是一件容易的事。您必须:
我不相信有一种方法可以使它完美,当另一个用户访问它时,用户会立即被锁定......这将很棘手。
或者,您可以使用冲突解决功能,您可以在其中执行一些操作,例如比较原始值,并查看这些原始值是否被其他用户更改。如果他们这样做了,那么可以合并任何更改,或者您可以提示用户决定要做什么,或类似的事情。
HTH。
That's not very easy to do, to have only one user edit a record at a time. You would have to:
I don't believe there is a way to make it perfect, where the user is instantly locked when another user accesses it... it will be tricky.
Alternatively, you can have a conflict resolution feature, where you can do something like compare the original values, and see if those original values changed by another user. If they did, then any changes can be merged or you can prompt the user to decide what to do, or something like that.
HTH.