HTML and CSS Reference
In-Depth Information
The Order History application lets the user specify a customer ID along with a date range. It then
fetches all the existing order data from the Orders and Order Details tables of the Northwind database
and returns them to the view. The Entity Framework data model for the Orders and Order Details tables is
shown in Figure 10-9.
Figure 10-9. Entity Framework data model for the Orders table
Although the Order and Order_Detail classes have several properties. For the purpose of this example,
you use only some of them: OrderID , CustomerID , OrderDate , Quantity , and UnitPrice . The total amount of
an order is calculated in the JavaScript code.
Order History View
The view displays the order information in an HTML table. The task of fetching Order records from the SQL
Server database is accomplished using a web worker. The HTML markup from the view is shown in Listing
Listing 10-8. HTML Markup of the Order History View
<form id="form1" runat="server">
<h3>Order History</h3>
<div>Customer ID :</div>
<input id="customerID" type="text" />
Search WWH ::

Custom Search