예제 #1
0
        public ActionResult Create(Guid id, IdeaCreateModel model)
        {
            if (!ModelState.IsValid)
            {
                model.Categories = _categories;
                return View(model);
            }

            string url = CreateIdea(id, model.Title, model.Abstract, model.Text, User.Identity.Name, model.IsActive,
                                    _categories[model.CategoryId], 0, model.SortOrder, model.DisplayOnMainMenu,
                                    model.DisplayOnSideMenu);

            return Redirect(url);
        }
예제 #2
0
 public ActionResult Create(Guid id)
 {
     SiteMapItem parentNode = GetSiteMapItem(id);
     var model = new IdeaCreateModel
                     {
                         Categories = _categories,
                         ParentId = id,
                         ParentUrl = parentNode.Url,
                         ParentTitle = parentNode.Title,
                         Title = "Идея",
                         IsActive = true,
                         SortOrder = 500
                     };
     return View(model);
 }