Beispiel #1
0
        public IActionResult NewFolder(NewFolderViewModel data)
        {
            if (data.ParentId == -1)
            {
                return(RedirectToAction("Index", new { errorId = "NewFolder", errorMsg = "Wybierz rodzica" }));
            }

            var error = treeService.AddNewFolder(data);

            if (error != null)
            {
                return(RedirectToAction("Index", new { errorId = "NewFolder", errorMsg = error }));
            }

            return(RedirectToAction("Index"));
        }