Exemplo n.º 1
0
        public async Task <IActionResult> UpdateContract([FromRoute] Guid organizationId,
                                                         [FromRoute] Guid contractId, [FromBody] UpdateRecruitingContractInput model)
        {
            var contract =
                await _contractService
                .UpdateContract
                    (_rao.Value, contractId, model);

            return(Ok(contract));
        }
Exemplo n.º 2
0
        public async Task <ContractResult> UpdateContract(IRecruitingAgencyOwner ao, Guid contractId, UpdateRecruitingContractInput input)
        {
            var co = await Repository.Queryable().ForAgencyOwner(ao)
                     .FirstAsync(x => x.Id == contractId);

            co.InjectFrom <NullableInjection>(input);

            if (input.RecruiterStream.HasValue)
            {
                co.MarketerStream = input.RecruiterStream.Value;
            }

            if (input.RecruitingAgencyStream.HasValue)
            {
                co.MarketingAgencyStream = input.RecruitingAgencyStream.Value;
            }


            return(await UpdateContract(co));
        }