public IActionResult Edit(ShapeConfigEditModel shapeConfigViewModel) { try { _serviceApi.ModifyShapeConfig(shapeConfigViewModel); return(RedirectToAction("Details", new { id = shapeConfigViewModel.ShapeConfigID })); } catch (BadRequestException) { return(BadRequest()); } }
public IActionResult Edit(Guid id) { ShapeConfigViewModel result = _serviceApi.GetShapeConfig(id); if (result != null) { ShapeConfigEditModel shapeConfigViewModel = new ShapeConfigEditModel() { Name = result.Name, RepositoryID = result.RepositoryID, Shape = result.Shape, ShapeConfigID = result.ShapeConfigID }; return(View(shapeConfigViewModel)); } else { return(NotFound()); } }
public void ModifyShapeConfig(ShapeConfigEditModel repositoryConfigView) { string parameters = $"?name={repositoryConfigView.Name}&repositoryID={repositoryConfigView.RepositoryID}&shapeConfigID={repositoryConfigView.ShapeConfigID}"; string result = _serviceApi.CallPutApi($"{_urlShapeConfigApi}{parameters}", repositoryConfigView.ShapeFile, true); }