COMP 31, Lab 9
Assignment 2, Milestone 3 (Final)
Currently your application should allow users to login to the application. After validation the application displays the view associated with the current user’s roles (buyer, seller, or admin). So far, the buyer view should display a table showing the cars for sale. The seller and admin views simply display the user role.
Complete the following requirements in the order given.
1. Modify the User and Car entities classes to implement the foreign key relationship defined by the database schema.
2. Add code to the seller view to display the list of cars for sale as an HTML table.
3. Add a form to the seller view to allow a user to enter input data describing a car for sale. After the form has been completed, the user may click a Send button to POST the data to the server. When the server receives the data, it is added to the CAR table in the database.
4. Add code to the buyer view to allow the list of cars to be filtered by make or year. (Hint: the server-side code can be simplified by making use of methods provided by a Car repository.)
5. Add code to the buyer view to include the name of the seller alongside each car in the table.
6. Add a form to the admin view to display the list of cars for sale as an HTML table. Add a column to the table containing a checkbox. The user can delete cars from the list by checking one or more checkboxes and POSTing the form data to the server. Add server-side code to delete the records corresponding to the checked items from the database. After the items have been deleted the admin view is redisplayed with the updated car list.
本网站支持淘宝 支付宝 微信支付 paypal等等交易。如果不放心可以用淘宝交易！
E-mail: [email protected] 微信:itcsdx