Example #1
0
        public async Task <ActionResult> Create(CreateScanViewModel createScanViewModel)
        {
            // mapped the data from one place to the other
            Scan newScan = new Scan();

            Mapper.Map <CreateScanViewModel, Scan>(createScanViewModel, newScan);
            string RAW_URL = await _blobService.UploadRAWFileAsync(createScanViewModel.file, createScanViewModel.PatientNumber);

            newScan.RAW_URL = RAW_URL;
            _dbContext.Scans.Add(newScan);
            return(RedirectToAction("Index", new { PatientNumber = createScanViewModel.PatientNumber }));
        }
Example #2
0
        public ActionResult Create(string PatientNumber)
        {
            if (PatientNumber == null)
            {
                return(HttpNotFound());
            }

            CreateScanViewModel createScanViewModel = new CreateScanViewModel
            {
                PatientNumber = PatientNumber
            };

            return(View(createScanViewModel));
        }