用于多用户环境中的员工的计划程序,并提供对更新的计划程序的访问权限 [英] Scheduler for employees in a multi-user environment and give access to updated scheduler

查看:38
本文介绍了用于多用户环境中的员工的计划程序,并提供对更新的计划程序的访问权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我现在正在使用ASP.NET,c#和SQL Server 2008为多用户环境中的因果关系雇员开发调度程序(网格视图,动态创建的标签和按钮).雇员可以选择和使用三个功能.插槽,它们是可用的.每天有6个时段,每个时段都有可以工作的最大员工人数.我想从sql表中获取数据,并显示当员工选择一个功能时该时隙是否可用.如果可能,我还希望其他登录并同时访问调度程序的员工.该员工最终提交了一周的调度程序后,我还希望其他员工看到更新后的调度程序.我是否需要刷新页面并从数据库中获取数据?我的应用程序将在将来极大地增加员工数量.请问我将如何开发我的模块?非常感谢您的建议.

Hi
I am now developing the scheduler(Grid view, dynamically created labels and buttons) for causal employees in a multi-user environment by using ASP.NET, c# and SQL Server 2008. There are three functions which employees can select and work in the time slot they are available. On each day, there are 6 slots and in each time slot, there is the maximum number of employees who can work. I would like to fetch the data from the sql table and show whether that time slot is available, when the employee chooses one function. I also want other employees who logged in view and access the scheduler at the same time, if possible. After that employee finally submits one week scheduler, I also want other employees see the updated scheduler. Do I need to refresh the page and fetch the data from the database? My application will increase the number of employees in the future tremendously. Please how would I develop my module? Thank you very much for your suggestions and advice.

推荐答案

如果一个客户必须看另一客户做了什么(我认为这是您的情况),那么您确实需要刷新数据,而不是整个页面. Ajax是一个非常好的方法.您可以安排对服务器的轮询(例如,如果您的环境支持,则每10秒钟轮询一次);如果某些数据比更改,则可以根据响应更新屏幕.但是不要忘了在提交时检查服务器端,因为有可能在计划时间内更改了数据.
您还可以在中间添加一个状态:当用户选择一个时间图时,您将进行ajax调用,如果它仍处于打开状态,则将其置于待处理状态;如果已经处于待处理状态或已被占用,则显示抱歉,请选择另一个"消息;如果用户提交表单,则将选定的插槽置于占用状态.如果会话时间已到或用户取消了该操作,则可以将插槽放回打开状态.因此,您可以快速处理并发.
这些技术通常在票务预订系统中使用.
If one client has to see what an other client has done (I think this is your case), than you really need to refresh the data, but not the whole page. Ajax is a really good approach for that. You can schedule a poll to the server (every 10s for example, if your environment supports it); if some of the data changed than the you can update the screen based on the response. But don''t forget to check on serverside on submit, because it can happen that data changed during the schedule time.
You can also add a state in the middle: when a user selects a timesplot, you make an ajax call, and put it in pending state if it is still open; if it is already in pending state or occupied, than you display a "sorry, choose another" message; if the user submits the form, you put the selected slot in occupied state. If the session time is out or the user canceled the operation, you put the slot back in open state. Thus you can handle concurrency quickly.
These techniques are often used in ticket reservation systems.


这篇关于用于多用户环境中的员工的计划程序,并提供对更新的计划程序的访问权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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