Razor 1
Razor 1
Your task is to complete several web pages to search, view and add data relating to our Water Quality
database. It stores data about water quality measures in Adelaide/SA water. Do not leave this to the
last minute as it is not possible to finish the project without prior thought to the implementation.
Writing queries is one thing but implementing SQL with programming logic in @Razor and HTML
combined with Bootstrap presentation does require serious thought to get the desired functionality and
outcomes!
Task
A web application containing the necessary database and MVC Views has already been created for you.
This can be downloaded from the assessments tab on the course website. Your task is to complete
several pages:
1. Views/System/Index.cshtml
2. Views/Systems/Index.cshtml
3. Views/Systems/Details.cshtml
4. Views/Parameter/Index.cshtml
5. Views/Parameter/Create.cshtml
6. Views/Parameter/Edit.cshtml
7. Views/DisinfectionMethod/Index.cshtml
8. Views/DisinfectionMethod/Details.cshtml
9. Views/DisinfectionMethod/Create.cshtml
10. Views/DisinfectionMethod/Edit.cshtml
with the necessary layout using the WebMatrix data library, HTML, bootstrap v5.x and @Razor code.
Start by working on the /System/Index page that allows a user to search the database for water quality
systems by the region and town/suburb they supply quality water to. You will need to determine the
best layout to present the data to our users and ensure you implement HTML Validation to reduce
errors. Once this is working, start implementing the other pages in the order above.
This page should provide a searching option to list the water quality systems based on the regions and
towns/suburbs they supply water to. The page should:
This page shows the condensed sample data of a water quality system. Each row in the table will show
the minimum, maximum and average of the values of the avgValue attribute recorded for a region
and a test parameter.
The rows will be alphabetically ordered by the name of the regions and then the test parameters and
include a link to the /Systems/Details page so that the user can view all the sample data associated with
a water quality system supplied water to a region and having a test parameter.
This page should display all the sample data in a table for the associated region, water quality system,
and test parameter. The rows in the table should be ordered by the record identification number. Each
row should also be provided to view the disinfection methods used for this record by including a link to
the /DisinfectionMethod/Details page.
3a. Sample Data of a Region, a Water Quality System, and a Test Parameter
Task 4: Listing Disinfection Methods [15%]
url: /DisinfectionMethod/Details?id=xx
This page will display the disinfection methods used for a particular record of the sample data. If there
are no disinfection methods used, it should display appropriate message to the users.
The /Parameter/Edit page will display the existing data of a selected test parameter. The user will be
able to change few values as per the database design.
The /Parameter/Create page will automatically generate the parameter identification number and
display it. The users will need to supply other values as per the database design.
The /DisinfectionMethod/Edit page will display the existing data of a selected disinfection method. The
user will be able to change few values as per the database design.
The /DisinfectionMethod/Create page will automatically generate the disinfection method identification
number and display it. The users will need to supply other values as per the database design.