/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: Gustav Hatvigsson
  • Date: 2013-05-30 12:02:31 UTC
  • mfrom: (85.1.28 lenasys)
  • Revision ID: gustav.hartvigsson@gmail.com-20130530120231-ttqgqjqw2w8enn7g
Merged Ohlsons changes:
added function to get ssn and name for the registrationspages in the user model.
added the registrationpage for students.
edited the registration page for instructors
edited the css for both the registrationpages
minor fix to registration css

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>