Esempio n. 1
0
        public async Task <ActionResult> Nuisance(NuisanceViewModel viewModel)
        {
            if (!ModelState.IsValid)
            {
                return(View(viewModel));
            }

            var report = new Report();

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

            return(RedirectToAction("ContactRequired"));
        }
Esempio n. 2
0
        public async Task <ActionResult> Nuisance(NuisanceViewModel viewModel)
        {
            if (!ModelState.IsValid)
            {
                return(View(viewModel));
            }

            var report = await GetCurrentReport();

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

            return(RedirectToAction("Vehicle"));
        }
Esempio n. 3
0
 public void Modify(Report report, NuisanceViewModel viewModel)
 {
     report.Description  = viewModel.Description;
     report.Vehicles     = GetVehicles(viewModel.Vehicles);
     report.Perpetrators = GetPerpetrators(viewModel.Perpetrators);
 }
Esempio n. 4
0
 public void Modify(Report report, NuisanceViewModel viewModel)
 {
     report.Description = viewModel.Description;
 }
Esempio n. 5
0
 public void Modify(Report report, NuisanceViewModel viewModel)
 {
     report.Description = viewModel.Description;
 }
Esempio n. 6
0
        public async Task<ActionResult> Nuisance(NuisanceViewModel viewModel)
        {
            if (!ModelState.IsValid)
            {
                return View(viewModel);
            }

            var report = new Report();

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

            return RedirectToAction("Vehicle");
        }