Exemplo n.º 1
0
        public ActionResult FileProperties(string tabId, int parentId, string id, string successfulActionCode)
        {
            var file  = SiteFolderService.GetFile(parentId, id);
            var model = FileViewModel.Create(file, tabId, parentId, true);

            model.SuccesfulActionCode = successfulActionCode;
            return(JsonHtml("FileProperties", model));
        }
Exemplo n.º 2
0
        public ActionResult FileProperties(string tabId, int parentId, string id, FormCollection collection)
        {
            var file  = SiteFolderService.GetFile(parentId, id);
            var model = FileViewModel.Create(file, tabId, parentId, true);

            TryUpdateModel(model);
            model.Validate(ModelState);
            if (ModelState.IsValid)
            {
                SiteFolderService.SaveFile(model.File);
                return(Redirect("FileProperties", new { tabId, parentId, id = model.Id, successfulActionCode = ActionCode.UpdateSiteFile }));
            }

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