如何检查预订是否存在 [英] How to check if booking exists

查看:65
本文介绍了如何检查预订是否存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好



我有一个问题,希望你能帮忙解决。



我建立了一个资产预订系统,让员工可以预订设备。预订时,工作人员必须使用提供的日历选择时间,然后使用复选框选择资产。一切正常,但我希望PostBack一旦用户选择时间,然后检查是否有任何同时预订的资产,然后显示'不可用'标签框而不是复选框。



如果您对如何实现这一目标有任何建议,我将不胜感激。

Hello

I have a problem that I hope you will be able to help resolve.

I have built an asset booking system to enable staff to book out equipment. When booking, staff have to choose the time using the provided calendar, and then assets using a checkbox. All is working, but I would like to PostBack once the user choose time, then check if there are any assets that are booked for the same time, then display 'Unavailable' label box instead of the checkbox.

I would greatly appreciate it if you have any suggestions on how to go about achieving this.

推荐答案

嗯。也许你需要混合使用异步Javascript和Xml?那是满口的。让它缩短为AJAX:Þ



这是一篇好文章:

如何使用ASP.NET AJAX从客户端JavaScript调用Web服务 [ ^ ]





基本上,此调用将发送到Web服务并接收返回的内容。这一切都通过javascript发生,因此页面不需要重新加载或任何东西。



您发送的数据以及如何处理返回值是唯一的挑战,因为您需要通过javascript完成所有操作。



玩得开心^ _ ^
hmm. maybe you need a mix of Asynchronous Javascript And Xml? That's a mouthful. lets shorten it to AJAX :Þ

Here is a good article:
How to call a Web Service from client-side JavaScript using ASP.NET AJAX[^]


Basically, this call will send to a webservice and receive what is returned. This all happens via javascript so the page doesn't need to reload or anything.

The data you send and how to handle the returned values is the only challenge here as you need to do this all from javascript.

Have fun ^_^


问题是你需要在回发之前填充数据和时间,但是你想要回发一旦这些细节完成。这是一种可行的方法:



The issue is that you need both the data and the time to be populated before you do a postback, but you want to postback as soon as these details are complete. Here's one way this can be done:


。( function (){
// 使用jquery获取文本框控件选择器
var startTextBox =
.(function(){ //get the textbox control with a jquery selector var startTextBox =


这篇关于如何检查预订是否存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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