Ejemplo n.º 1
0
 public ActionResult CreateCatalog(CatalogView catalog)
 {
     try
     {
         var article = new Article() { Category = Category.Catalog, Name = catalog.Name, Order = catalog.Order, ParentId = catalog.ParentId };
         article.Create();
         return this.Json(new ActionResultStatus(), JsonRequestBehavior.AllowGet);
     }
     catch (Exception ex)
     {
         return this.Json(new ActionResultStatus(ex), JsonRequestBehavior.AllowGet);
     }
 }
Ejemplo n.º 2
0
 public ActionResult CreateArticle(ArticleView article)
 {
     try
     {
         var item = new Article() { Category = Category.Articles, Name = article.Name, Order = article.Order, ParentId = article.ParentId, Content = article.Content };
         item.Create();
         return this.Json(new ActionResultStatus(), JsonRequestBehavior.AllowGet);
     }
     catch (Exception ex)
     {
         return this.Json(new ActionResultStatus(ex), JsonRequestBehavior.AllowGet);
     }
 }
Ejemplo n.º 3
0
 public ActionResult CreateColumn(ColumnView column)
 {
     try
     {
         var article = new Article() { Category = Category.Columns, Name = column.Name, Order = column.Order };
         article.Create();
         return this.Json(new ActionResultStatus(), JsonRequestBehavior.AllowGet);
     }
     catch (Exception ex)
     {
         return this.Json(new ActionResultStatus(ex), JsonRequestBehavior.AllowGet);
     }
 }