Exemplo n.º 1
0
        public ActionResult Edit(int id, GenericDefinitionEditModel editModel)
        {
            if (editModel.IsValid() == false)
            {
                Response.StatusCode = 500;
                return(PartialView("_ValidationErrorSummary", new ValidationErrorSummaryViewModel(editModel.GetValidationErrors())));
            }

            GenericDefinitionViewModel viewModel = _noiseProtectionDefinitionService.Edit(id, editModel);

            return(PartialView("_GenericDefinitionTableRow", viewModel));
        }
Exemplo n.º 2
0
        public ActionResult Create(GenericDefinitionEditModel editModel)
        {
            if (editModel.IsValid() == false)
            {
                Response.StatusCode = 500;
                return(PartialView("_ValidationErrorSummary", new ValidationErrorSummaryViewModel(editModel.GetValidationErrors())));
            }

            GenericDefinitionViewModel viewModel = _helicopterWorkCategoryService.Create(editModel);

            return(PartialView("_GenericDefinitionTableRow", viewModel));
        }