public async Task <IActionResult> UpdateOrganisationParentCompanyGuarantee()
        {
            var searchModel = _sessionService.GetSearchResults();

            var model = new UpdateOrganisationParentCompanyGuaranteeViewModel
            {
                ParentCompanyGuarantee = searchModel.SelectedResult.OrganisationData.ParentCompanyGuarantee,
                OrganisationId         = searchModel.SelectedResult.Id,
                LegalName = searchModel.SelectedResult.LegalName
            };

            return(View("~/Views/Roatp/UpdateOrganisationParentCompanyGuarantee.cshtml", model));
        }
        public async Task <IActionResult> UpdateParentCompanyGuarantee(UpdateOrganisationParentCompanyGuaranteeViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View("~/Views/Roatp/UpdateOrganisationParentCompanyGuarantee.cshtml", model));
            }

            model.UpdatedBy = HttpContext.User.UserDisplayName();

            var request = Mapper.Map <UpdateOrganisationParentCompanyGuaranteeRequest>(model);
            var result  = await _apiClient.UpdateOrganisationParentCompanyGuarantee(request);

            if (result)
            {
                return(await RefreshSearchResults());
            }

            return(View("~/Views/Roatp/UpdateOrganisationParentCompanyGuarantee.cshtml", model));
        }