Exemplo 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"));
        }
Exemplo 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"));
        }
Exemplo n.º 3
0
 public void Modify(Report report, NuisanceViewModel viewModel)
 {
     report.Description  = viewModel.Description;
     report.Vehicles     = GetVehicles(viewModel.Vehicles);
     report.Perpetrators = GetPerpetrators(viewModel.Perpetrators);
 }
Exemplo n.º 4
0
 public void Modify(Report report, NuisanceViewModel viewModel)
 {
     report.Description = viewModel.Description;
 }
Exemplo n.º 5
0
 public void Modify(Report report, NuisanceViewModel viewModel)
 {
     report.Description = viewModel.Description;
 }
Exemplo 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");
        }