Dotnet fork project for Databaskonstruktion
- C# 58.4%
- HTML 38.8%
- CSS 1.7%
- JavaScript 1.1%
| Controllers | ||
| Models | ||
| obj | ||
| Properties | ||
| Views | ||
| wwwroot | ||
| .gitignore | ||
| appsettings.Development.json | ||
| appsettings.json | ||
| Program.cs | ||
| README.md | ||
| WebApplication1.csproj | ||
| WebApplication1.csproj.user | ||
Dotnet Applikation
Dotnet MVC application for retrieving, displaying and modifying data from the B25MAREM database.
Requirements
- Field agents can read information about previous incidents.
- It must be possible to calculate the total number of operations a field agent has participated in.
- Field agents can read information about previous incidents and their resulting operations.
- Field agents can search for incidents by name.
- Field agents can select an incident and view its related operations.
- Field agents can add equipment to their favorite equipment list.
- Field agents can delete equipment from their favorite equipment list.
- Field agents can change their favorite equipment using a stored procedure.
Implementation
- The application displays all rows from the INCIDENT table in an HTML table without joins.
- The application uses GETFIELDAGENTOPERATIONCOUNT to show the total number of operations for a field agent.
- The application uses a JOIN between INCIDENT and OPERATION to display incidents and their operations in a nested HTML table with kolumnlayout.
- The application provides a search form where users can search for incidents by name.
- The SearchIncidents method retrieves matching incidents from the database using a parameterized SQL query with LIKE.
- The application provides a dropdown list containing incidents.
- The SelectOperations action displays all operations related to the selected incident.
- The SelectOperation method retrieves operations from the OPERATION table using the selected incident number and a parameterized SQL query.
- The application displays the current favorite equipment of a field agent in an HTML table.
- The application provides a dropdown list containing equipment from the EQUIPMENT table.
- The AddFavoriteEquipment method uses INSERT to add equipment to the FIELDAGENTFAVOURITEEQUIPMENT table.
- The AddFavoriteEquipment method checks if the selected equipment is already a favorite before inserting it.
- The DeleteFavoriteEquipment method uses DELETE to remove selected equipment from the favorite equipment list.
- The ChangeFavoriteEquipment method uses the stored procedure CHANGEFAVORITEEQUIPMENT to update favorite equipment.
- The application uses parameterized SQL queries for INSERT, DELETE and UPDATE.
- After adding, deleting or changing favorite equipment, the application redirects to the Index page to display the updated information.