public async Task <ActionResult> SubmitNewCommitment(string hashedAccountId, string legalEntityCode, string legalEntityName, string legalEntityAddress, short legalEntitySource, string providerId, string providerName, string cohortRef, SaveStatus?saveStatus) { if (!await IsUserRoleAuthorized(hashedAccountId, Role.Owner, Role.Transactor)) { return(View("AccessDenied")); } if (string.IsNullOrWhiteSpace(legalEntityCode) || string.IsNullOrWhiteSpace(legalEntityName) || string.IsNullOrWhiteSpace(providerId) || string.IsNullOrWhiteSpace(providerName) || string.IsNullOrWhiteSpace(cohortRef) || string.IsNullOrWhiteSpace(legalEntityAddress) || !saveStatus.HasValue) { return(RedirectToAction("Inform", new { hashedAccountId })); } var response = await _employerCommitmentsOrchestrator.GetSubmitNewCommitmentModel (hashedAccountId, OwinWrapper.GetClaimValue(@"sub"), legalEntityCode, legalEntityName, legalEntityAddress, legalEntitySource, providerId, providerName, cohortRef, saveStatus.Value); return(View("SubmitCommitmentEntry", response)); }