Ejemplo n.º 1
0
        public ActionResult Create(CreateMeasurementViewModel viewModel)
        {
            var request = viewModel.MapTo<CreateMeasurementRequest>();
            var response = _measurementService.Create(request);
            TempData["IsSuccess"] = response.IsSuccess;
            TempData["Message"] = response.Message;
            if (response.IsSuccess)
            {
                return RedirectToAction("Index");
            }

            return View("Create", viewModel);
        }
Ejemplo n.º 2
0
 public ActionResult Create()
 {
     var viewModel = new CreateMeasurementViewModel();
     viewModel.IsActive = true;
     return View(viewModel);
 }