Пример #1
0
        public ActionResult New(string tabId, int parentId, int id, FormCollection collection)
        {
            var folder = SiteFolderService.NewForSave(parentId, id);
            var model  = SiteFolderViewModel.Create(folder, tabId, parentId);

            TryUpdateModel(model);
            model.Validate(ModelState);
            if (ModelState.IsValid)
            {
                model.Data = SiteFolderService.Save(model.Data);
                PersistResultId(model.Data.Id);
                return(Redirect("Properties", new { tabId, parentId, id = model.Data.Id, successfulActionCode = ActionCode.SaveSiteFolder }));
            }

            return(JsonHtml("FolderProperties", model));
        }