コード例 #1
0
        public IActionResult Edit(ShapeConfigEditModel shapeConfigViewModel)
        {
            try
            {
                _serviceApi.ModifyShapeConfig(shapeConfigViewModel);

                return(RedirectToAction("Details", new { id = shapeConfigViewModel.ShapeConfigID }));
            }
            catch (BadRequestException)
            {
                return(BadRequest());
            }
        }
コード例 #2
0
        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());
            }
        }
コード例 #3
0
 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);
 }