Exemplo n.º 1
0
 public void Modify(Report report, DrugsViewModel viewModel)
 {
     report.DrugsAction  = viewModel.Action;
     report.Description  = viewModel.Description;
     report.Vehicles     = GetVehicles(viewModel.Vehicles);
     report.Perpetrators = GetPerpetrators(viewModel.Perpetrators);
 }
Exemplo n.º 2
0
        public async Task <ActionResult> Drugs(DrugsViewModel viewModel)
        {
            if (!ModelState.IsValid)
            {
                return(View(viewModel));
            }

            var report = new Report();

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

            return(RedirectToAction("Contact"));
        }
Exemplo n.º 3
0
 public void Modify(Report report, DrugsViewModel viewModel)
 {
     report.DrugsAction = viewModel.Action;
     report.Description = viewModel.Description;
 }
Exemplo n.º 4
0
 public void Modify(Report report, DrugsViewModel viewModel)
 {
     report.DrugsAction = viewModel.Action;
     report.Description = viewModel.Description;
 }
Exemplo n.º 5
0
        public async Task<ActionResult> Drugs(DrugsViewModel viewModel)
        {
            if (!ModelState.IsValid)
            {
                return View(viewModel);
            }

            var report = new Report();

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

            return RedirectToAction("Perpetrator");
        }