Registration Approval Use Case

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The Registration Approval use case occurs when a manager approves or rejects a registration approval request that is submitted by an employee. The code that implements this use case demonstrates how to update a field of a list item and how to query for tasks.

Managers begin by selecting an approval task on their dashboards. Figure 1 illustrates the manager dashboard.

Ff648266.managerdashboard_v1p2(en-us,PandP.10).png

Figure 1
The manager dashboard

Selecting an item from the Registration Approval Tasks Web Part generates an HTTP request. This request initiates the Page_Load handler that validates the request and calculates the fields that are used in the ASPX page. If the request passes this process, the manager sees the approval form that is illustrated in Figure 2.

Ff648266.registrationapproval_v1p2(en-us,PandP.10).png

Figure 2
Manager approval form

Selecting either Approved or Rejected from the drop-down list and clicking Submit causes the registration to be updated in the SharePoint list. The workflow process automatically generates the appropriate accounting entries. For more information, see Registration Workflow Implementation.

Classes Used by the Registration Approval Use Case

Figure 3 illustrates the control flow for handling HTTP requests for the Registration Approval use case.

Ff648266.training_manage_registration_approval(en-us,PandP.10).png

Figure 3
Registration approval control flow

The arrows in the preceding diagram represent the direction of the control flow. The following five classes are involved:

  • RegistrationApproval. This class is the ASPX page definition produced by the Visual Studio designer. Internet Information Services (IIS) invokes handler methods of the RegistrationApproval class when it receives HTTP requests.
  • RegistrationApprovalPresenter. This class is the presenter for the RegistrationApproval.aspx.
  • TrainingCourseRepository. This class is the interface to the SharePoint list of available courses.
  • RegistrationRepository. This class provides an Update method that modifies the field values of an existing registration.
  • ListItemRepository. This class encapsulates some of the details of interacting with SharePoint lists.

Registration Phases

The Registration Approval use case occurs in two phases. They are the Page_Load phase and the Submit_Click phase. These phases correspond to rendering the initial approval form in response to the initial HTTP request from the manager and processing the button click when the manager confirms the request for a new registration. The second phase updates the registration list item.

The Registration use case discusses the following topics:

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Show: