/lenasys/0.1

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/0.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<span class="description">
<br>
<div class="descriptionheading">Overview</div>

The bookings list is a variation on the traditional shopping cart model that lists all bookings made by a certain user. 
A form contains a field for writing the customer ID, and a list of bookings made by the customer with that ID is retrieved.

<div class="descriptionheading">processinputbox</div>
The function called <span class="interestingdescription">processinputbox</span> is executed by the keyup and onchange events for the text box in the form. 
Events connected to a specific dialog component are suitable for this type of application since attaching code to those events allows the capture of text written 
into a dialog box while the user keeps typing.<br>

<div class="descriptionheading">ResultCustomer</div>

The other function <span class="interestingdescription">ResultCustomer</span> is called automatically by jQuery when the data has been returned.
<br>
The function it iterates over the Booking elements that have been returned and adds an on-screen table row (composed of the attributes of the booking) for each of the bookings.
<br> 
The result is placed in a div with the ID <span class="interestingdescription">OutputDiv</span>

<br><br><div class="descriptionheading">booking/getcustomerbookings_XML.php</div>

The <span class="interestingdescription">getCustomerBookings</span> function collects all bookings made by a certain customer. No error handling is performed at all. If the ResourceType (i.e. application name) 
"None" is given, all bookings for the customer is returned including bookings made in other applications.<br>

<br><div class='exampleheading'>Call Example:<br><br>
<pre class="codeexample">
$.ajax({
	type: 'POST',
	url: 'booking/getcustomerbookings_XML.php',
	data: {
		customerID: escape(customer)
	},
	success:  ResultBookingCustomer,
});
</pre>
</div>

<br>

<br><div class='exampleheading'>Returned Data Example:<br>
<pre><span class="codeexample">
&lt;bookings&gt;
&lt;booking 
    application='Hotell_Demo'
    customerID='Haakon'
    resourceID='1008'
    name='Karl Hotel and Resort'
    company='Karls'
    location='Exmouth'
    date='2001-07-20 00:00:00'
    position='13'
    cost='280'
 /&gt;
&lt;/bookings&gt;
</span>
</div>
																	
</span></pre>