Пример #1
0
        public async Task <IActionResult> OnPostAsync(int colifomsEscherichiaId, int?sampleId)
        {
            _colifomsEscherichia.Id = colifomsEscherichiaId;
            await _escherichiaColiformsController.Update(_colifomsEscherichia);

            return(Redirect($"/Exam/ColifomsEscherichia/ThirdStep/?colifomsEscherichiaId={_colifomsEscherichia.Id}&sampleId={sampleId}"));
        }
Пример #2
0
        public async Task <IActionResult> OnPostAsync(int colifomsEscherichiaId, int sampleId)
        {
            Alert alert = new Alert(AlertType.success);


            ResponseDto responseDto = (ResponseDto)((ObjectResult)(await _dilutionSampleController.List(sampleId))).Value;
            IList <DilutionSampleDto> dilutionSampleDto = (List <DilutionSampleDto>)responseDto.detail;

            _sampleName   = $"{dilutionSampleDto.FirstOrDefault().Sample.Id} - {dilutionSampleDto.FirstOrDefault().Sample.Description}";
            _sampleClient = $"{dilutionSampleDto.FirstOrDefault().Sample.Client.Name}";


            _colifomsEscherichia.Id = colifomsEscherichiaId;
            await _escherichiaColiformsController.Update(_colifomsEscherichia);

            alert.Text = "Coliformes criado com sucesso!";
            alert.ShowAlert(PageContext);
            return(Page());
        }