Exemplo n.º 1
0
        public async Task <UserGrantMapping> GrantDetails(UserGrantMappingDto mappingDto)
        {
            string applicationStatus;

            if (await _education.EducationDetailsExistsForApplicant(mappingDto.UserId))
            {
                applicationStatus = "Completed";
            }
            else
            {
                applicationStatus = "Submitted";
            }

            var mappingDetails = new UserGrantMapping
            {
                UserId            = mappingDto.UserId,
                GrantId           = mappingDto.GrantId,
                ApplicationStatus = applicationStatus
            };

            return(await _applicant.SaveGrantDetails(mappingDetails));
        }