Exemplo n.º 1
0
        public ActionResult Propose(Guid id, IdeaProposeModel model)
        {
            if (User.Identity.IsAuthenticated)
            {
                if (!ModelState.IsValid)
                {
                    model.Categories = _categories;
                    return View(model);
                }

                CreateIdea(id, model.Title, model.Abstract, InputDataUtilities.TextAreaHtmlEncode(model.Text), User.Identity.Name,
                           false, _categories[model.CategoryId], 0, 500, false, false);

                var ideaCreatedModel = new IdeaSuccessfullyCreatedModel {ParentId = id};
                return View("IdeaCreated", ideaCreatedModel);
            }

            model.Categories = _categories;
            return View(model);
        }
Exemplo n.º 2
0
 public ActionResult Propose(Guid id)
 {
     var model = new IdeaProposeModel
                     {
                         Categories = _categories
                     };
     return View(model);
 }