Esempio n. 1
0
 public void Modify(Report report, LocationViewModel viewModel)
 {
     if (report.Location == null)
     {
         report.Location = new Location();
     }
     report.Location.Building = viewModel.Building;
 }
Esempio n. 2
0
        public async Task<ActionResult> Location(LocationViewModel viewModel)
        {
            if (!ModelState.IsValid)
            {
                return View(viewModel);
            }

            var reportId = GetCurrentReportId();
            var report = new Report();

            _modelFactory.Modify(report, viewModel);
            var responseReport = await _reportProxy.PatchAsync(reportId, report);

            return RedirectToAction("AdditionalLocation");
        }