- Open form Depts.aspx in previous chapter and modify the interface as below:
- When Page_Load list box Department should be filled with data in Depts table
- When select each item in list Department, the appropriate data should be filled in text box control beside
- Create a web form name Repeater.aspx as below (using Repeater control):
- When Page_Load, two DropDownList should be filled with data in table Customer and Room
- When click button Show data , the Repeater control will display the data in table Bookings according to selection in DropDownList. If user choose radio button All, display all data in table Bookings. If user choose radio button Customer, display all data in table Bookings according to Customer choose in DropDownList Customers. If user choose radio button Room, display all data in table Bookings according to Room choose in DropDownList Rooms.
- Create form name EmpsSearch.aspx as below:
– Check all validation in form if necessary, From birthday and To birthday must be date.
– When Page_Load, load data from table Depts to DropDownList Department.
- When click Search:
– Check whether user enter search condition in Employee name, From birthday and To birthday. If not, search only with sex and department condition, otherwise search with condition user enter.
– When click Search, fill the result in DataList.
- When click Update, link to Emps.aspx and fill all data corresponding with employee.
After edit data, click Save to update data to table Employees.
- Create new Class Library name DataHandling. Change name of Class1 to DataConn.
- Write some method to interaction with database:
– A method to add new booking room.
– A method to update booking room.
– A method to delete booking room.
– A method to set datasource for dropdown list.
– A method to get price of a room.
- Create form name Bookings.aspx as below:
- Make reference to above Class Library.
- In PageLoad, set datasource for Customer and Room.
- In Save button click, before saving, check from date must be greater than current date, to date must be greater than from date, and Price must be greater than or equal price for room in database.