private IActionResult RedirectToOriginForDelete(DeleteDraftApprenticeshipOrigin origin,
                                                 string accountHashedId,
                                                 string cohortReference,
                                                 string draftApprenticeshipHashedId)
 {
     return((origin == DeleteDraftApprenticeshipOrigin.CohortDetails)
         ? RedirectToCohortDetails(accountHashedId, cohortReference)
         : RedirectToAction("Details", new { accountHashedId, cohortReference, draftApprenticeshipHashedId }));
 }
예제 #2
0
 public DeleteDraftApprenticeshipTestsFixture WithDeleteDraftApprenticeshipRequest(DeleteDraftApprenticeshipOrigin origin)
 {
     DeleteDraftApprenticeshipRequest = new DeleteApprenticeshipRequest
     {
         AccountHashedId       = AccountHashedId,
         CohortId              = CohortId,
         DraftApprenticeshipId = DraftApprenticeshipId,
         Origin                      = origin,
         CohortReference             = CohortReference,
         DraftApprenticeshipHashedId = DraftApprenticeshipHashedId
     };
     return(this);
 }