Near Miss Form

The process goes as follows for when a user selects a near miss form. After a user selects an option from this list.


1) Sets model EntryPageForm = SelectedForm (in our case, near miss) *DB Call

2) Creates List<EntryPageItems> & gets all entry page items associated with the Entry Form (selected in 1) & stores them in that list. *Db Call

3) Foreach statement for EntryPageItems that:

    a) adds validation classes

    b) Loads query if it has one in the loadFromQuery column

        - DropDownLists

        - Locationdropdowntree

        - Checkbox List

        - Guid Dropdown

4) Saves EntryPageItems to model

5) Repopulate EntryPage Form SelectList

6) Run JavaScript function ShowButtons()

7) Clear ModelState

8) Return View


How ReportedBy populates

1) Runs query from loadFromQuery column, located in entryPageItems

2) Saves result to DropDownListGuidItems in the model, that's then passed to the view.

3) When a location is changed, it runs the locationChanged() JavaScript function. This function has an ajax call that runs a controller JsonResult that populate a new list of employees.