Exemple #1
0
        public async Task <ActionResult> Victim(VictimViewModel viewModel)
        {
            if (!ModelState.IsValid)
            {
                return(View(viewModel));
            }

            var report = await GetCurrentReport();

            _modelFactory.Modify(report, viewModel);
            await _reportProxy.PatchAsync(report.Id, report);

            // TODO: add error handling
            return(RedirectToAction("Vehicle"));
        }
Exemple #2
0
 public void Modify(Report report, VictimViewModel viewModel)
 {
     report.Victim = viewModel.Victim;
 }
Exemple #3
0
 public void Modify(Report report, VictimViewModel viewModel)
 {
     report.Victim = viewModel.Victim;
 }
        public async Task<ActionResult> Victim(VictimViewModel viewModel)
        {
            if (!ModelState.IsValid)
            {
                return View(viewModel);
            }

            var report = new Report();
            _modelFactory.Modify(report, viewModel);
            await _reportProxy.PatchAsync(GetCurrentReportId(), report);

            // TODO: add error handling
            return RedirectToAction("Vehicle");
        }