Exemplo n.º 1
0
        private async Task <ContractResult> UpdateContract(Guid id, UpdateProviderContractInput input)
        {
            var co = await Repository.Queryable()
                     .FirstAsync(x => x.Id == id);

            co.InjectFrom <NullableInjection>(input);
            if (input.ContractorStream.HasValue)
            {
                co.ContractorStream = input.ContractorStream.Value;
            }

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

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

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

            co.MaxWeeklyHours = input.MaxWeeklyHours;


            return(await UpdateContract(co));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> UpdateContract([FromRoute] Guid organizationId,
                                                         [FromRoute] Guid contractId, [FromBody] UpdateProviderContractInput model)
        {
            var contract =
                await _contractService
                .UpdateContract
                    (_pao.Value, contractId, model);

            return(Ok(contract));
        }
Exemplo n.º 3
0
 public async Task <ContractResult> UpdateContract(IProviderAgencyOwner ao, Guid contractId, UpdateProviderContractInput input)
 {
     return(await UpdateContract(contractId, input));
 }
Exemplo n.º 4
0
 public async Task <ContractResult> UpdateContract(IOrganizationContractor co, Guid contractId, UpdateProviderContractInput input)
 {
     return(await UpdateContract(contractId, input));
 }
Exemplo n.º 5
0
 public Task <ContractResult> UpdateContract(IOrganizationAccountManager am, Guid contractId, UpdateProviderContractInput input)
 {
     return(UpdateContract(contractId, input));
 }