/lenasys/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/trunk

« back to all changes in this revision

Viewing changes to Code Viewer Alt/AJAX/AjaxDemoApp8_getResourceAvailability_description.html

  • Committer: b11johgu
  • Date: 2013-05-16 12:50:39 UTC
  • mto: This revision was merged to the branch mainline in revision 74.
  • Revision ID: b11johgu@student.his.se-20130516125039-2vlxix2829z1hchh
deleted files not used
Added data in table "Users"

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<span class="description">
2
 
<br>
3
 
<div class="descriptionheading">Overview</div>
4
 
 
5
 
Since no error correction is done for the bookings (i.e. it is possible to book resources that are not available at the requested date) all
6
 
applications must check resource availability. This function passes a resource ID to the API which returns a set of available dates, 
7
 
and for each date the number of available positions and the cost for making a booking is returned.
8
 
 
9
 
<div class="descriptionheading">ResultAvailability</div>
10
 
<span class="interestingdescription">booking/getavailability_XML.php</span> shows the availability information for all available dates for the given resourceID.
11
 
 
12
 
<br><br>
13
 
 
14
 
<br><br><div class='exampleheading'>Call Example:<br><br>
15
 
<pre><span class="codeexample">$.ajax({
16
 
        type: 'POST',
17
 
        url: 'booking/getavailability_XML.php',
18
 
        data: {
19
 
        //      type: escape("Hotell_Demo"), // Optional: You can specify the application?
20
 
                resourceID: resource
21
 
        },
22
 
        success:  ResultAvailability
23
 
});                                                             
24
 
</span></pre>
25
 
</div>
26
 
 
27
 
<br>
28
 
 
29
 
<br><div class='exampleheading'>Returned Data Example:<br>
30
 
<pre><span class="codeexample">
31
 
&lt;avail&gt;
32
 
&lt;availability 
33
 
    resourceID='1008'
34
 
    name='The Laszlo Plaza'
35
 
    location='Athens'
36
 
    company='Laszlo Inc'
37
 
    size='96'
38
 
    cost='110'
39
 
    category='1'
40
 
    date='2001-01-01'
41
 
    bookingcount='0'
42
 
    bookingcost='28.99'
43
 
    bookingclass='1'
44
 
    remaining='96'
45
 
 /&gt;
46
 
</span>
47
 
 
48
 
</div>
49
 
                                                                                                                                        
50
 
</span></pre>