VB.NET多用户提示,提醒用户其他用户正在做同样的事情 [英] VB.NET Multi User tips for alerting users that other users are doing the same thing
问题描述
下午好,
我对VB.Net中的多用户应用程序有疑问。
在我的应用程序中的某些点上我想根据其他用户的操作给出一条消息。
例如:
1用户点击按钮打印来自选定客户的发票。
这意味着其他用户无法打印发票(或修改与发票相匹配的记录)。
主要原因是我有一个我从数据库得到的发票编号,你不希望这会搞砸。
所以当用户2点击相同的按钮时,我希望我的应用程序显示一个消息框并告诉当前用户用户...正在处理发票,必须等待。
有没有人可以指出我在这方面的正确方向?
我想我必须在特定的whay中使用某种锁定?
Good afternoon all,
I have a question about Multi User applications in VB.Net.
On certain points in my application I want to give a message based on other users actions.
For example:
1 user clicks a button to print invoices from selected clients.
This means that other users can´t have the possibility to print invoices (or modifying the records that matches the invoice).
The main reason is that I have an invoice number wich I get from a database and you don't want this messes up.
So when user 2 click´s the same button I want my application to show a messagebox and tells the current user that user ... is processing the invoices and have to wait.
Is there somebody who can point me in the wright direction for this?
I think I have to use some sort of locking in a specific whay?
推荐答案
请检查这个le $ />
在.NET中做出锁定的6种方式(悲观和乐观)
Please check this article
6 ways of doing locking in .NET (Pessimistic and optimistic)
这篇关于VB.NET多用户提示,提醒用户其他用户正在做同样的事情的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!