Accessing Database, Using LINQ, and input Validation
Please design Bing web site and meet the following requirements,
1) Your first page must be similar to the home page of Bing site. You can download all you need from Bing site for your site. Other than the current Bing home page, please place the menu bar on the background image, other than the outside of the background
2) Click the two arrows at the bottom right of your first page, the background will be changed just as Bing home page does. The background images are organized in a database. Each image must be “JPEG” format
3) Instead of displaying the menu “Find computer wallpaper; Find black and white pictures” at Bing site, your image link needs to display the menu “Add one more image; Delete one existing image; Select your image replacing order ”. Keep other links (Videos, Shopping, News, Maps, Travel, Entertainment, Search History) at Bing site as they are in your page. But there is no need to implement the links and its submenu.
4) If “Add one more image” is clicked, a user can upload one more image from local computer to the image database using a “Browser” control. If “Delete one existing image” is selected, a user can delete a selected image from image database. If “Select your image replacing order” is selected, two options are provided: by name; by uploading date and time.
5) If “by name” is selected, the background of your first page will be replaced based on the sorted image file name order (either descending or ascending) as the arrow is pressed. If “by uploading date and time” is selected, the background will be changed based on the images’ uploading date and time (either descending or ascending).
6) Database operation. The purpose of this part is to test if you know how to access database through a website. Please use ASP.NET local express database just like I demonstrated. Please do not use a Separate SQL server. Please use LINQ to SQL server to operate a database and GridView to display all the hotel information.
a) Implement “Booking a Hotel” submenu in Travel Menu of Bing site.
b) Please implement the following functions:
a. Create a database BookHotel which contains one table “HotelInfo” including four columns: Hotel Name, Price per Night, Available Number of Rooms, and Number of Booked Rooms
b. Display all the hotels including Hotel Name, Price per night, Available number of rooms, and the number of Booked rooms. Initially, the hotel table is empty, so no hotel is displayed. If the available number of rooms is not zero, a “Book” button is added to the end of each row. If the available number of rooms is zero, a “Delete” button is added to the end of each row.
c. At the end of the page to display hotel information, please make two buttons “Add” button and “Home” button. If click “Add” button, please redirect to another ASPX page “addHotel.aspx” to add one hotel including Hotel Name, Price per Night, Available Number of Rooms. In default, the number of Booked rooms is 0. As long as a hotel is added, please go back to “Display Page” to show all the hotels. If click “Home” button, please go back to Bing page.
d. If the “Book” button at the end of each row is clicked, the number of Booked Hotel is increased by one, but cannot be more than the initial number of available rooms. And the available number of rooms is decreased by one, but cannot be less than zero.
e. If the “Delete” button at the end of each row is clicked, the record is deleted.